From 37742043a93d2a3158feb3b7e40582d584d43bdb Mon Sep 17 00:00:00 2001 From: oliver Date: Sat, 5 Sep 2026 19:10:07 +0800 Subject: [PATCH] Show WhatsApp channel peer next to Agent Preset in session header (4.9.1-ops.20). Plugins inject conversation.session.header.actions; resolve sessionId back to the bound chat and render nickname/phone or group title. Co-authored-by: Cursor --- lib/client.js | 319 +++++++++----- lib/index.js | 416 +++++++++--------- package.json | 2 +- plugin-src/client/channel-peer-label.js | 95 ++++ plugin-src/client/channels/whatsapp/api.js | 1 + plugin-src/client/i18n.js | 1 + plugin-src/client/index.js | 16 + plugin-src/client/styles.js | 28 ++ .../host/channels/whatsapp/production.mjs | 1 + plugin-src/host/channels/whatsapp/rpc.mjs | 13 + src/channels/shared/bot-workspace-store.mjs | 39 +- src/channels/shared/channel-peer.mjs | 115 +++++ .../shared/conversation-state-store.mjs | 13 + test/channels/shared/channel-peer.test.mjs | 80 ++++ test/client-ui.test.mjs | 39 +- 15 files changed, 852 insertions(+), 326 deletions(-) create mode 100644 plugin-src/client/channel-peer-label.js create mode 100644 src/channels/shared/channel-peer.mjs create mode 100644 test/channels/shared/channel-peer.test.mjs diff --git a/lib/client.js b/lib/client.js index ac450eb..e00298e 100644 --- a/lib/client.js +++ b/lib/client.js @@ -566,12 +566,12 @@ __export(index_exports, { name: () => name }); module.exports = __toCommonJS(index_exports); -var React24 = __toESM(require("react"), 1); +var React25 = __toESM(require("react"), 1); // package.json var package_default = { name: "dsh-im-ops", - version: "4.9.1-ops.19", + version: "4.9.1-ops.20", description: "Ops fork of dsh-im (all channels kept). Based on @xmanrui/dsh-im@4.9.1 \u2014 access/session policies owned here.", keywords: [ "deepseek-harness", @@ -852,6 +852,7 @@ var EN = Object.freeze({ "\u673A\u5668\u4EBA\u8BBE\u7F6E\u9875\u7B7E": "Bot settings tabs", "\u6295\u9012\u8BBE\u7F6E": "Delivery settings", "\u8BBF\u95EE\u8BBE\u7F6E": "Access settings", + "\u6E20\u9053\u7528\u6237": "Channel user", "\uFF08\u4E0D\u53EF\u7528\uFF09": " (unavailable)", "\u7FA4 Agent Preset": "Group Agent Preset", "\u8DDF\u968F\u5168\u5C40": "Follow global", @@ -11353,7 +11354,8 @@ var WHATSAPP_ENDPOINTS = Object.freeze({ setGroupSessionScope: "bot.group-session-scope.set", setWorkspace: "bot.workspace.set", setAgentPreset: SET_AGENT_PRESET_ENDPOINT, - setContextEnhancement: "bot.context-enhancement.set" + setContextEnhancement: "bot.context-enhancement.set", + resolveChannelPeer: "bot.session.channel-peer" }); var PROVISION_STATES5 = /* @__PURE__ */ new Set(["starting", "pending", "connecting", "connected", "failed", "cancelled"]); var BOT_STATES = /* @__PURE__ */ new Set(["connected", "connecting", "offline", "error"]); @@ -12113,11 +12115,83 @@ function WhatsappSettingsTab({ rpcCall }) { )); } +// plugin-src/client/channel-peer-label.js +var React20 = __toESM(require("react"), 1); +var CHANNEL_LABELS = Object.freeze({ + whatsapp: "WhatsApp", + feishu: "\u98DE\u4E66", + dingtalk: "\u9489\u9489", + wecom: "\u4F01\u4E1A\u5FAE\u4FE1", + weixin: "\u5FAE\u4FE1", + qq: "QQ", + telegram: "Telegram", + discord: "Discord", + slack: "Slack", + office: "AI Office" +}); +function ChannelPeerLabel({ sessionId, resolveChannelPeer }) { + const [peer, setPeer] = React20.useState(null); + React20.useEffect(() => { + if (typeof resolveChannelPeer !== "function" || typeof sessionId !== "string" || !sessionId) { + setPeer(null); + return void 0; + } + const controller = new AbortController(); + let active = true; + void (async () => { + try { + const next = await resolveChannelPeer(sessionId, controller.signal); + if (active && !controller.signal.aborted) setPeer(next && typeof next === "object" ? next : null); + } catch { + if (active && !controller.signal.aborted) setPeer(null); + } + })(); + return () => { + active = false; + controller.abort(); + }; + }, [sessionId, resolveChannelPeer]); + if (!peer?.label) return null; + const channelName2 = CHANNEL_LABELS[peer.channel] || peer.channel || "IM"; + const title = peer.kind === "group" ? `${channelName2} \xB7 ${peer.label}` : `${channelName2} \xB7 ${peer.label}`; + return h2( + "span", + { + className: "dim-channelPeerLabel", + title, + "aria-label": localizeText("\u6E20\u9053\u7528\u6237") + ` \xB7 ${title}` + }, + h2("span", { className: "dim-channelPeerChannel", "aria-hidden": "true" }, channelName2), + h2("span", { className: "dim-channelPeerText" }, peer.label) + ); +} +async function resolveWhatsappChannelPeer(whatsappRpcCall, sessionId, signal) { + if (typeof whatsappRpcCall !== "function") return null; + const result = await whatsappRpcCall( + WHATSAPP_ENDPOINTS.resolveChannelPeer, + { sessionId }, + signal + ); + const value = unwrapRpcResult9(result); + if (!value || typeof value !== "object") return null; + const label = typeof value.label === "string" ? value.label.trim() : ""; + if (!label) return null; + return { + channel: typeof value.channel === "string" ? value.channel : "whatsapp", + botId: typeof value.botId === "string" ? value.botId : "", + kind: value.kind === "group" ? "group" : "direct", + label, + phone: typeof value.phone === "string" ? value.phone : null, + pushName: typeof value.pushName === "string" ? value.pushName : null, + groupTitle: typeof value.groupTitle === "string" ? value.groupTitle : null + }; +} + // plugin-src/client/delivery-settings.js -var React22 = __toESM(require("react"), 1); +var React23 = __toESM(require("react"), 1); // plugin-src/client/access-policy-settings.js -var React20 = __toESM(require("react"), 1); +var React21 = __toESM(require("react"), 1); var ACCESS_POLICY_ENDPOINT = "bot.access-policy.set"; var GROUP_SESSION_SCOPE_ENDPOINT = "bot.group-session-scope.set"; var ACCESS_CHANNEL_DEFINITIONS = Object.freeze({ @@ -12220,8 +12294,8 @@ function ScenePolicyEditor({ unsupported = false, onChange }) { - const ownerHelpId = React20.useId(); - const emptyAllowlistHelpId = React20.useId(); + const ownerHelpId = React21.useId(); + const emptyAllowlistHelpId = React21.useId(); const allowlist = policy.mode === "allowlist"; const collectionKey = allowlist ? "users" : "commandPermissionOverrides"; const branchKey = allowlist ? "allowlist" : "open"; @@ -12273,7 +12347,7 @@ function ScenePolicyEditor({ h2("strong", null, "\u5F53\u524D\u6E20\u9053\u4E0D\u652F\u6301\u7FA4\u804A"), h2("p", null, "\u6B64\u533A\u57DF\u65E0\u9700\u914D\u7F6E\uFF0C\u4FDD\u5B58\u79C1\u804A\u8BBE\u7F6E\u65F6\u4F1A\u4FDD\u7559\u73B0\u6709\u7FA4\u804A\u7B56\u7565\u3002") ) : h2( - React20.Fragment, + React21.Fragment, null, h2( "div", @@ -12415,18 +12489,18 @@ function AccessPolicySettingsPage({ channel: channel4, account, rpcCall, onSaved const initialPolicy = normalizeAccessPolicy(account?.accessPolicy); const initialKey = JSON.stringify(initialPolicy); const initialScope = normalizeGroupSessionScope(account?.groupSessionScope); - const [draft, setDraft] = React20.useState(() => clonePolicy( + const [draft, setDraft] = React21.useState(() => clonePolicy( initialPolicy ?? DEFAULT_ACCESS_POLICY )); - const [groupSessionScope, setGroupSessionScope] = React20.useState(initialScope); - const [saving, setSaving] = React20.useState(false); - const [feedback, setFeedback] = React20.useState(null); - React20.useEffect(() => { + const [groupSessionScope, setGroupSessionScope] = React21.useState(initialScope); + const [saving, setSaving] = React21.useState(false); + const [feedback, setFeedback] = React21.useState(null); + React21.useEffect(() => { const next = normalizeAccessPolicy(account?.accessPolicy); setDraft(clonePolicy(next ?? DEFAULT_ACCESS_POLICY)); setGroupSessionScope(normalizeGroupSessionScope(account?.groupSessionScope)); }, [account?.botId, initialKey, account?.groupSessionScope]); - React20.useEffect(() => { + React21.useEffect(() => { setFeedback(null); }, [account?.botId]); if (!definition) { @@ -12579,7 +12653,7 @@ function AccessPolicySettingsPage({ channel: channel4, account, rpcCall, onSaved } // plugin-src/client/access-grant-settings.js -var React21 = __toESM(require("react"), 1); +var React22 = __toESM(require("react"), 1); var ACCESS_GRANT_ENDPOINT = "bot.access-grant.set"; var ACCESS_PENDING_RESOLVE_ENDPOINT = "bot.access-pending.resolve"; var ACCESS_GROUP_TITLES_REFRESH_ENDPOINT = "bot.access-group-titles.refresh"; @@ -12671,13 +12745,13 @@ function PhoneTypeahead({ disabled, requirePhone = true }) { - const [query, setQuery] = React21.useState(value || ""); - const [open, setOpen] = React21.useState(false); - const blurTimer = React21.useRef(null); - React21.useEffect(() => { + const [query, setQuery] = React22.useState(value || ""); + const [open, setOpen] = React22.useState(false); + const blurTimer = React22.useRef(null); + React22.useEffect(() => { setQuery(value || ""); }, [value]); - React21.useEffect(() => () => { + React22.useEffect(() => () => { if (blurTimer.current) window.clearTimeout(blurTimer.current); }, []); const q = query.trim().toLowerCase(); @@ -12985,21 +13059,21 @@ function AccessGrantSettingsPage({ channel: channel4, account, rpcCall, onSaved const initialGrant = normalizeAccessGrant(account?.accessGrant); const initialKey = JSON.stringify(initialGrant); const initialScope = normalizeGroupSessionScope(account?.groupSessionScope); - const [draft, setDraft] = React21.useState(() => cloneGrant(initialGrant, ownerPhone)); - const [groupSessionScope, setGroupSessionScope] = React21.useState(initialScope); - const [saving, setSaving] = React21.useState(false); - const [feedback, setFeedback] = React21.useState(null); - const [newGroupJid, setNewGroupJid] = React21.useState(""); - const [loadingGrant, setLoadingGrant] = React21.useState(!initialGrant); - const contextCatalog = React21.useContext(AgentPresetCatalogContext); - const [presetCatalog, setPresetCatalog] = React21.useState(() => normalizeAgentPresetCatalog( + const [draft, setDraft] = React22.useState(() => cloneGrant(initialGrant, ownerPhone)); + const [groupSessionScope, setGroupSessionScope] = React22.useState(initialScope); + const [saving, setSaving] = React22.useState(false); + const [feedback, setFeedback] = React22.useState(null); + const [newGroupJid, setNewGroupJid] = React22.useState(""); + const [loadingGrant, setLoadingGrant] = React22.useState(!initialGrant); + const contextCatalog = React22.useContext(AgentPresetCatalogContext); + const [presetCatalog, setPresetCatalog] = React22.useState(() => normalizeAgentPresetCatalog( account?.agentPresetCatalog ?? contextCatalog ?? EMPTY_AGENT_PRESET_CATALOG )); - React21.useEffect(() => { + React22.useEffect(() => { setDraft(cloneGrant(normalizeAccessGrant(account?.accessGrant), ownerPhone)); setGroupSessionScope(normalizeGroupSessionScope(account?.groupSessionScope)); }, [account?.botId, initialKey, account?.groupSessionScope, ownerPhone]); - React21.useEffect(() => { + React22.useEffect(() => { if (typeof rpcCall !== "function" || !account?.botId) return void 0; let cancelled = false; setLoadingGrant(true); @@ -13053,7 +13127,7 @@ function AccessGrantSettingsPage({ channel: channel4, account, rpcCall, onSaved }; }, [account?.botId, rpcCall, ownerPhone]); const contacts = draft.contacts ?? []; - const knownGroupJids = React21.useMemo(() => { + const knownGroupJids = React22.useMemo(() => { const set = new Set(Object.keys(draft.groups ?? {})); for (const contact of contacts) { for (const jid of contact.groupJids ?? []) set.add(jid); @@ -13063,7 +13137,7 @@ function AccessGrantSettingsPage({ channel: channel4, account, rpcCall, onSaved } return [...set].sort(); }, [draft.groups, draft.pending, contacts]); - const actionableContacts = React21.useMemo( + const actionableContacts = React22.useMemo( () => contacts.filter((contact) => contactNeedsGrantAction(contact, draft, knownGroupJids)), [contacts, draft, knownGroupJids] ); @@ -13742,13 +13816,13 @@ function TargetForm({ }) { const editing = mode === "edit"; const initialKind = initialValue?.kind && definition.fields[initialValue.kind] ? initialValue.kind : definition.kinds[0].value; - const [targetId, setTargetId] = React22.useState(initialValue?.targetId ?? ""); - const [name2, setName] = React22.useState(initialValue?.name ?? ""); - const [kind, setKind] = React22.useState(initialKind); - const [route, setRoute] = React22.useState(initialValue?.route ?? {}); - const [error, setError] = React22.useState(null); - const [testing, setTesting] = React22.useState(false); - const [testState, setTestState] = React22.useState(null); + const [targetId, setTargetId] = React23.useState(initialValue?.targetId ?? ""); + const [name2, setName] = React23.useState(initialValue?.name ?? ""); + const [kind, setKind] = React23.useState(initialKind); + const [route, setRoute] = React23.useState(initialValue?.route ?? {}); + const [error, setError] = React23.useState(null); + const [testing, setTesting] = React23.useState(false); + const [testState, setTestState] = React23.useState(null); const currentTarget = () => { const normalizedRoute = Object.fromEntries(fieldsFor(definition, kind).map((field) => { const raw = String(route[field.key] ?? "").trim(); @@ -13965,7 +14039,7 @@ function TargetSuggestionPicker({ suggestions.map((suggestion, index) => { const identity = routeIdentity(definition, suggestion); const added = configured.has(identity); - return React22.createElement("option", { + return React23.createElement("option", { key: suggestion.id ?? suggestion.suggestionId ?? `${identity}:${index}`, value: String(index), disabled: added @@ -13982,10 +14056,10 @@ function TargetSuggestionPicker({ ); } function TargetRow({ definition, target, botId, connected, rpcCall, onChanged, onEdit }) { - const [action, setAction] = React22.useState(null); - const [testState, setTestState] = React22.useState(null); - const [copyState, setCopyState] = React22.useState(null); - const [confirmDelete, setConfirmDelete] = React22.useState(false); + const [action, setAction] = React23.useState(null); + const [testState, setTestState] = React23.useState(null); + const [copyState, setCopyState] = React23.useState(null); + const [confirmDelete, setConfirmDelete] = React23.useState(false); const testTarget = async () => { setAction("test"); setTestState(null); @@ -14027,7 +14101,7 @@ function TargetRow({ definition, target, botId, connected, rpcCall, onChanged, o h2( "div", { className: "dim-targetTitle" }, - React22.createElement("strong", null, target.name || target.targetId), + React23.createElement("strong", null, target.name || target.targetId), h2("span", null, kindLabel(definition, target.kind)) ), h2("code", null, `targetId: ${target.targetId}`) @@ -14090,28 +14164,28 @@ function DeliveryTargetSettingsPage({ onBack }) { const definition = CHANNEL_DEFINITIONS[channel4]; - const [activeTabId, setActiveTabId] = React22.useState(BOT_SETTINGS_TABS[0].id); - const [phase, setPhase] = React22.useState("loading"); - const [targets, setTargets] = React22.useState([]); - const [suggestionPhase, setSuggestionPhase] = React22.useState("idle"); - const [suggestions, setSuggestions] = React22.useState([]); - const [suggestionError, setSuggestionError] = React22.useState(null); - const [error, setError] = React22.useState(null); - const [editor, setEditor] = React22.useState(null); - const [saving, setSaving] = React22.useState(false); - const [botCopyState, setBotCopyState] = React22.useState(null); - const [accessPolicy, setAccessPolicy] = React22.useState(account.accessPolicy); - const [accessGrant, setAccessGrant] = React22.useState(account.accessGrant); - const mounted = React22.useRef(true); - React22.useEffect(() => { + const [activeTabId, setActiveTabId] = React23.useState(BOT_SETTINGS_TABS[0].id); + const [phase, setPhase] = React23.useState("loading"); + const [targets, setTargets] = React23.useState([]); + const [suggestionPhase, setSuggestionPhase] = React23.useState("idle"); + const [suggestions, setSuggestions] = React23.useState([]); + const [suggestionError, setSuggestionError] = React23.useState(null); + const [error, setError] = React23.useState(null); + const [editor, setEditor] = React23.useState(null); + const [saving, setSaving] = React23.useState(false); + const [botCopyState, setBotCopyState] = React23.useState(null); + const [accessPolicy, setAccessPolicy] = React23.useState(account.accessPolicy); + const [accessGrant, setAccessGrant] = React23.useState(account.accessGrant); + const mounted = React23.useRef(true); + React23.useEffect(() => { setAccessPolicy(account.accessPolicy); setAccessGrant(account.accessGrant); }, [account.botId, account.accessPolicy, account.accessGrant]); - const invoke = React22.useCallback(async (endpoint, payload = {}, signal) => { + const invoke = React23.useCallback(async (endpoint, payload = {}, signal) => { if (typeof rpcCall !== "function") throw new Error("\u6295\u9012\u76EE\u6807\u8BBE\u7F6E\u6682\u4E0D\u53EF\u7528\u3002"); return unwrapRpcResult12(await rpcCall(endpoint, payload, signal)); }, [rpcCall]); - const loadTargets = React22.useCallback(async ({ signal, silent = false } = {}) => { + const loadTargets = React23.useCallback(async ({ signal, silent = false } = {}) => { if (!silent) setPhase("loading"); setError(null); try { @@ -14125,7 +14199,7 @@ function DeliveryTargetSettingsPage({ setPhase("error"); } }, [account.botId, invoke]); - const loadSuggestions = React22.useCallback(async () => { + const loadSuggestions = React23.useCallback(async () => { setSuggestionPhase("loading"); setSuggestionError(null); try { @@ -14139,7 +14213,7 @@ function DeliveryTargetSettingsPage({ setSuggestionPhase("error"); } }, [account.botId, definition, invoke]); - React22.useEffect(() => { + React23.useEffect(() => { mounted.current = true; const controller = new AbortController(); void loadTargets({ signal: controller.signal }); @@ -14266,7 +14340,7 @@ function DeliveryTargetSettingsPage({ rpcCall: accessRpcCall, onSaved: setAccessPolicy }) : h2( - React22.Fragment, + React23.Fragment, null, h2( "section", @@ -14970,6 +15044,34 @@ body[data-ds-dark-theme] .dim-page select option, body[data-ds-dark-theme] .dim- .dim-accessGroupTitleRow { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: 10px; align-items: end; } .dim-accessNickname { display: block; margin-top: 0; color: var(--dsw-alias-label-secondary, #646a73); font-size: 11px; line-height: 15px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dim-accessNicknameEmpty { color: var(--dsw-alias-label-tertiary, #8f959e); font-weight: 400; } +.dim-channelPeerLabel { + display: inline-flex; + align-items: center; + gap: 6px; + max-width: 260px; + min-width: 0; + height: 22px; + padding: 0 8px 0 6px; + border-radius: 6px; + background: var(--dsw-alias-fill-tsp-secondary, color-mix(in srgb, var(--dsw-alias-label-primary, #1f2329) 6%, transparent)); + color: var(--dsw-alias-label-secondary, #646a73); + font-size: 12px; + line-height: 22px; + white-space: nowrap; + overflow: hidden; +} +.dim-channelPeerChannel { + flex: none; + color: var(--dsw-alias-label-tertiary, #8f959e); + font-weight: 560; +} +.dim-channelPeerText { + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + font-weight: 500; + color: var(--dsw-alias-label-secondary, #646a73); +} .dim-accessUserRow { position: relative; z-index: 0; overflow: visible; } .dim-panel .dim-botCard .dim-cardFooter { margin-top: 0; } .dim-panel .ddt-headingCopy { display: none; } @@ -15052,7 +15154,7 @@ function installImStyles() { } // plugin-src/client/update-panel.js -var React23 = __toESM(require("react"), 1); +var React24 = __toESM(require("react"), 1); var import_react_dom3 = require("react-dom"); var import_valid = __toESM(require_valid(), 1); var import_rcompare = __toESM(require_rcompare(), 1); @@ -15142,11 +15244,11 @@ function manualUpdateCommand(snapshot) { return `dsh plugin --profile ${profileArgument} add -w dsh-im-ops@${version}`; } function ManualUpdateCommand({ command, disabled, sourceInstall, desktop }) { - const [copyState, setCopyState] = React23.useState("idle"); - const commandRef = React23.useRef(null); - const mounted = React23.useRef(false); - const copying = React23.useRef(false); - React23.useEffect(() => { + const [copyState, setCopyState] = React24.useState("idle"); + const commandRef = React24.useRef(null); + const mounted = React24.useRef(false); + const copying = React24.useRef(false); + React24.useEffect(() => { mounted.current = true; return () => { mounted.current = false; @@ -15178,7 +15280,7 @@ function ManualUpdateCommand({ command, disabled, sourceInstall, desktop }) { { className: "dim-updateManual", "aria-label": "\u624B\u5DE5\u66F4\u65B0" }, h2("h4", { className: "dim-updateManualHeading" }, "\u624B\u5DE5\u66F4\u65B0"), command ? h2( - React23.Fragment, + React24.Fragment, null, h2("p", { className: "dim-updateManualHint" }, "\u81EA\u52A8\u66F4\u65B0\u5931\u8D25\u53EF\u4EE5\u4F7F\u7528\u547D\u4EE4\u66F4\u65B0\uFF1A"), h2( @@ -15214,7 +15316,7 @@ function ManualUpdateCommand({ command, disabled, sourceInstall, desktop }) { "aria-hidden": "true", focusable: "false" }, copyState === "copied" ? h2("path", { d: "m4 10 4 4 8-8" }) : h2( - React23.Fragment, + React24.Fragment, null, h2("rect", { x: 7, y: 7, width: 10, height: 11, rx: 1.5 }), h2("path", { d: "M5 13H3.5A1.5 1.5 0 0 1 2 11.5v-8A1.5 1.5 0 0 1 3.5 2h8A1.5 1.5 0 0 1 13 3.5V5" }) @@ -15239,10 +15341,10 @@ function ManualUpdateCommand({ command, disabled, sourceInstall, desktop }) { ); } function UpdateDialog({ children, onClose }) { - const dialogRef = React23.useRef(null); - const titleId = React23.useId(); - const descriptionId = React23.useId(); - React23.useEffect(() => { + const dialogRef = React24.useRef(null); + const titleId = React24.useId(); + const descriptionId = React24.useId(); + React24.useEffect(() => { const previous = globalThis.document?.activeElement; dialogRef.current?.focus?.(); return () => { @@ -15300,19 +15402,19 @@ function UpdateDialog({ children, onClose }) { return typeof document !== "undefined" && document.body ? (0, import_react_dom3.createPortal)(content, document.body) : content; } function UpdatePanel({ rpcCall, clientVersion, onStatus }) { - const [snapshot, setSnapshot] = React23.useState(null); - const [action, setAction] = React23.useState("status"); - const [error, setError] = React23.useState(null); - const [open, setOpen] = React23.useState(false); - const [uncertainInstall, setUncertainInstall] = React23.useState(false); - const mounted = React23.useRef(false); - const busy = React23.useRef(false); - const readController = React23.useRef(null); - const pollReadController = React23.useRef(null); - const installRequest = React23.useRef(null); - const onStatusRef = React23.useRef(onStatus); + const [snapshot, setSnapshot] = React24.useState(null); + const [action, setAction] = React24.useState("status"); + const [error, setError] = React24.useState(null); + const [open, setOpen] = React24.useState(false); + const [uncertainInstall, setUncertainInstall] = React24.useState(false); + const mounted = React24.useRef(false); + const busy = React24.useRef(false); + const readController = React24.useRef(null); + const pollReadController = React24.useRef(null); + const installRequest = React24.useRef(null); + const onStatusRef = React24.useRef(onStatus); onStatusRef.current = onStatus; - const accept = React23.useCallback((next) => { + const accept = React24.useCallback((next) => { setSnapshot(next); onStatusRef.current?.(next); }, []); @@ -15321,7 +15423,7 @@ function UpdatePanel({ rpcCall, clientVersion, onStatus }) { setUncertainInstall(false); accept(next); }; - const invoke = React23.useCallback(async (endpoint, payload = {}, signal) => { + const invoke = React24.useCallback(async (endpoint, payload = {}, signal) => { if (typeof rpcCall !== "function") { const unavailable = new Error("\u5F53\u524D Host \u4E0D\u652F\u6301\u66F4\u65B0\u63A5\u53E3\uFF0C\u8BF7\u5148\u624B\u52A8\u66F4\u65B0\u63D2\u4EF6\u5E76\u91CD\u542F\u3002"); unavailable.code = "update-unavailable"; @@ -15329,7 +15431,7 @@ function UpdatePanel({ rpcCall, clientVersion, onStatus }) { } return unwrapSnapshot(await rpcCall(endpoint, payload, signal)); }, [rpcCall]); - React23.useEffect(() => { + React24.useEffect(() => { mounted.current = true; busy.current = true; const controller = new AbortController(); @@ -15352,7 +15454,7 @@ function UpdatePanel({ rpcCall, clientVersion, onStatus }) { const activeJob = ACTIVE_STATES4.has(snapshot?.job?.state); const restartRequired = snapshot?.job?.state === "restart-required" || snapshot?.blockedReason === "pending-restart"; const shouldPoll = activeJob || uncertainInstall; - React23.useEffect(() => { + React24.useEffect(() => { if (!shouldPoll) return void 0; let controller; const scheduler = createPollScheduler({ @@ -15450,7 +15552,7 @@ function UpdatePanel({ rpcCall, clientVersion, onStatus }) { const manualCommand = manualUpdateCommand(snapshot); const buttonLabel = action === "checking" ? "\u68C0\u67E5\u4E2D\u2026" : action === "starting" || activeJob ? "\u6B63\u5728\u66F4\u65B0\u2026" : restartRequired ? "\u5F85\u624B\u52A8\u91CD\u542F" : snapshot?.canInstall ? "\u66F4\u65B0\u81F3" : "\u68C0\u67E5\u66F4\u65B0"; return h2( - React23.Fragment, + React24.Fragment, null, h2("button", { type: "button", @@ -15475,13 +15577,13 @@ function UpdatePanel({ rpcCall, clientVersion, onStatus }) { h2("dt", null, "\u8FD0\u884C\u7248\u672C"), h2("dd", null, `v${snapshot?.runningVersion ?? clientVersion}`), snapshot?.installedVersion && snapshot.installedVersion !== snapshot.runningVersion ? h2( - React23.Fragment, + React24.Fragment, null, h2("dt", null, "\u5DF2\u5B89\u88C5\u7248\u672C"), h2("dd", null, `v${snapshot.installedVersion}`) ) : null, targetVersion ? h2( - React23.Fragment, + React24.Fragment, null, h2("dt", null, "\u76EE\u6807\u7248\u672C"), h2("dd", null, `v${targetVersion}`) @@ -15685,20 +15787,20 @@ function IMSettingsTab({ browserLocation = globalThis.location, navigateToRecoveryUrl = replacePageLocation }) { - const [selected, setSelected] = React24.useState("weixin"); - const [loopbackRecovery, setLoopbackRecovery] = React24.useState(null); - const [runningVersion, setRunningVersion] = React24.useState(IM_PLUGIN_VERSION); - const [deliverySettings, setDeliverySettings] = React24.useState(null); - const githubTooltipId = React24.useId(); - const channelSelectId = React24.useId(); + const [selected, setSelected] = React25.useState("weixin"); + const [loopbackRecovery, setLoopbackRecovery] = React25.useState(null); + const [runningVersion, setRunningVersion] = React25.useState(IM_PLUGIN_VERSION); + const [deliverySettings, setDeliverySettings] = React25.useState(null); + const githubTooltipId = React25.useId(); + const channelSelectId = React25.useId(); const active = CHANNELS.find((channel4) => channel4.id === selected) ?? CHANNELS[0]; - const reportLoopbackRecovery = React24.useCallback((recovery) => { + const reportLoopbackRecovery = React25.useCallback((recovery) => { setLoopbackRecovery((current) => current?.url === recovery.url ? current : recovery); }, []); - const reportUpdateStatus = React24.useCallback((snapshot) => { + const reportUpdateStatus = React25.useCallback((snapshot) => { setRunningVersion(snapshot.runningVersion); }, []); - const rpcCalls = React24.useMemo(() => createLoopbackAwareRpcCalls({ + const rpcCalls = React25.useMemo(() => createLoopbackAwareRpcCalls({ dingtalkRpcCall, discordRpcCall, feishuRpcCall, @@ -15730,7 +15832,7 @@ function IMSettingsTab({ weixinRpcCall, whatsappRpcCall ]); - const botSettingsContext = React24.useMemo(() => Object.freeze({ + const botSettingsContext = React25.useMemo(() => Object.freeze({ openBotSettings: setDeliverySettings }), []); return h2( @@ -15881,6 +15983,15 @@ function apply(ctx) { listDirectory: (path, signal) => callWorkspaceDirectoryApi(ctx, "listDirectory", path, signal), pickDirectory: () => callWorkspaceDirectoryApi(ctx, "pickDirectory") }); + const resolveChannelPeer = (sessionId, signal) => resolveWhatsappChannelPeer(whatsappRpcCall, sessionId, signal); + ctx.slots.inject("conversation.session.header.actions", () => ctx.slots.register({ + name: "conversation.session.header.actions", + id: "im-channel-peer", + // Immediately after Agent Preset (−10); schedule/jobs follow at 10+. + order: 0, + locale: IM_LOCALE_NAMESPACE, + inject: () => ({ resolveChannelPeer }) + }, ChannelPeerLabel)); ctx.slots.inject("settings.section", () => ctx.slots.register({ name: "settings.section", id: "xmanrui-dsh-im", diff --git a/lib/index.js b/lib/index.js index 2799d60..9ff8224 100644 --- a/lib/index.js +++ b/lib/index.js @@ -4,28 +4,28 @@ import { fileURLToPath as __dshFileURLToPath } from 'node:url'; const require = __dshCreateRequire(import.meta.url); const __filename = __dshFileURLToPath(import.meta.url); const __dirname = __dshDirname(__filename); -var Ape=Object.create;var D_=Object.defineProperty;var tpe=Object.getOwnPropertyDescriptor;var rpe=Object.getOwnPropertyNames;var ipe=Object.getPrototypeOf,ape=Object.prototype.hasOwnProperty;var $e=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(t,o)=>(typeof require<"u"?require:t)[o]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var ue=(n,t)=>()=>(n&&(t=n(n=0)),t);var ee=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),Ur=(n,t)=>{for(var o in t)D_(n,o,{get:t[o],enumerable:!0})},ope=(n,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of rpe(t))!ape.call(n,e)&&e!==o&&D_(n,e,{get:()=>t[e],enumerable:!(a=tpe(t,e))||a.enumerable});return n};var ze=(n,t,o)=>(o=n!=null?Ape(ipe(n)):{},ope(t||!n||!n.__esModule?D_(o,"default",{value:n,enumerable:!0}):o,n));var sJ=ee((ssA,nJ)=>{var oJ=$e("stream").Stream,jme=$e("util");nJ.exports=Nn;function Nn(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}jme.inherits(Nn,oJ);Nn.create=function(n,t){var o=new this;t=t||{};for(var a in t)o[a]=t[a];o.source=n;var e=n.emit;return n.emit=function(){return o._handleEmit(arguments),e.apply(n,arguments)},n.on("error",function(){}),o.pauseStream&&n.pause(),o};Object.defineProperty(Nn.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Nn.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Nn.prototype.resume=function(){this._released||this.release(),this.source.resume()};Nn.prototype.pause=function(){this.source.pause()};Nn.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(n){this.emit.apply(this,n)}.bind(this)),this._bufferedEvents=[]};Nn.prototype.pipe=function(){var n=oJ.prototype.pipe.apply(this,arguments);return this.resume(),n};Nn.prototype._handleEmit=function(n){if(this._released){this.emit.apply(this,n);return}n[0]==="data"&&(this.dataSize+=n[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(n)};Nn.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var n="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(n))}}});var lJ=ee((gsA,IJ)=>{var Jme=$e("util"),cJ=$e("stream").Stream,gJ=sJ();IJ.exports=wr;function wr(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}Jme.inherits(wr,cJ);wr.create=function(n){var t=new this;n=n||{};for(var o in n)t[o]=n[o];return t};wr.isStreamLike=function(n){return typeof n!="function"&&typeof n!="string"&&typeof n!="boolean"&&typeof n!="number"&&!Buffer.isBuffer(n)};wr.prototype.append=function(n){var t=wr.isStreamLike(n);if(t){if(!(n instanceof gJ)){var o=gJ.create(n,{maxDataSize:1/0,pauseStream:this.pauseStreams});n.on("data",this._checkDataSize.bind(this)),n=o}this._handleErrors(n),this.pauseStreams&&n.pause()}return this._streams.push(n),this};wr.prototype.pipe=function(n,t){return cJ.prototype.pipe.call(this,n,t),this.resume(),n};wr.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};wr.prototype._realGetNext=function(){var n=this._streams.shift();if(typeof n>"u"){this.end();return}if(typeof n!="function"){this._pipeNext(n);return}var t=n;t(function(o){var a=wr.isStreamLike(o);a&&(o.on("data",this._checkDataSize.bind(this)),this._handleErrors(o)),this._pipeNext(o)}.bind(this))};wr.prototype._pipeNext=function(n){this._currentStream=n;var t=wr.isStreamLike(n);if(t){n.on("end",this._getNext.bind(this)),n.pipe(this,{end:!1});return}var o=n;this.write(o),this._getNext()};wr.prototype._handleErrors=function(n){var t=this;n.on("error",function(o){t._emitError(o)})};wr.prototype.write=function(n){this.emit("data",n)};wr.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};wr.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};wr.prototype.end=function(){this._reset(),this.emit("end")};wr.prototype.destroy=function(){this._reset(),this.emit("close")};wr.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};wr.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var n="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(n))}};wr.prototype._updateDataSize=function(){this.dataSize=0;var n=this;this._streams.forEach(function(t){t.dataSize&&(n.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};wr.prototype._emitError=function(n){this._reset(),this.emit("error",n)}});var dJ=ee((csA,qme)=>{qme.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var hJ=ee((IsA,pJ)=>{pJ.exports=dJ()});var CJ=ee(ja=>{"use strict";var Zy=hJ(),zme=$e("path").extname,EJ=/^\s*([^;\s]*)(?:;|\s|$)/,Vme=/^text\//i;ja.charset=uJ;ja.charsets={lookup:uJ};ja.contentType=Wme;ja.extension=Zme;ja.extensions=Object.create(null);ja.lookup=Xme;ja.types=Object.create(null);$me(ja.extensions,ja.types);function uJ(n){if(!n||typeof n!="string")return!1;var t=EJ.exec(n),o=t&&Zy[t[1].toLowerCase()];return o&&o.charset?o.charset:t&&Vme.test(t[1])?"UTF-8":!1}function Wme(n){if(!n||typeof n!="string")return!1;var t=n.indexOf("/")===-1?ja.lookup(n):n;if(!t)return!1;if(t.indexOf("charset")===-1){var o=ja.charset(t);o&&(t+="; charset="+o.toLowerCase())}return t}function Zme(n){if(!n||typeof n!="string")return!1;var t=EJ.exec(n),o=t&&ja.extensions[t[1].toLowerCase()];return!o||!o.length?!1:o[0]}function Xme(n){if(!n||typeof n!="string")return!1;var t=zme("x."+n).toLowerCase().substr(1);return t&&ja.types[t]||!1}function $me(n,t){var o=["nginx","apache",void 0,"iana"];Object.keys(Zy).forEach(function(e){var i=Zy[e],A=i.extensions;if(!(!A||!A.length)){n[e]=A;for(var r=0;rc||g===c&&t[s].substr(0,12)==="application/"))continue}t[s]=e}}})}});var fJ=ee((dsA,BJ)=>{BJ.exports=eSe;function eSe(n){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(n):setTimeout(n,0)}});var h0=ee((psA,yJ)=>{var QJ=fJ();yJ.exports=ASe;function ASe(n){var t=!1;return QJ(function(){t=!0}),function(a,e){t?n(a,e):QJ(function(){n(a,e)})}}});var E0=ee((hsA,mJ)=>{mJ.exports=tSe;function tSe(n){Object.keys(n.jobs).forEach(rSe.bind(n)),n.jobs={}}function rSe(n){typeof this.jobs[n]=="function"&&this.jobs[n]()}});var u0=ee((EsA,wJ)=>{var SJ=h0(),iSe=E0();wJ.exports=aSe;function aSe(n,t,o,a){var e=o.keyedList?o.keyedList[o.index]:o.index;o.jobs[e]=oSe(t,e,n[e],function(i,A){e in o.jobs&&(delete o.jobs[e],i?iSe(o):o.results[e]=A,a(i,o.results))})}function oSe(n,t,o,a){var e;return n.length==2?e=n(o,SJ(a)):e=n(o,t,SJ(a)),e}});var C0=ee((usA,DJ)=>{DJ.exports=nSe;function nSe(n,t){var o=!Array.isArray(n),a={index:0,keyedList:o||t?Object.keys(n):null,jobs:{},results:o?{}:[],size:o?Object.keys(n).length:n.length};return t&&a.keyedList.sort(o?t:function(e,i){return t(n[e],n[i])}),a}});var B0=ee((CsA,OJ)=>{var sSe=E0(),gSe=h0();OJ.exports=cSe;function cSe(n){Object.keys(this.jobs).length&&(this.index=this.size,sSe(this),gSe(n)(null,this.results))}});var MJ=ee((BsA,bJ)=>{var ISe=u0(),lSe=C0(),dSe=B0();bJ.exports=pSe;function pSe(n,t,o){for(var a=lSe(n);a.index<(a.keyedList||n).length;)ISe(n,t,a,function(e,i){if(e){o(e,i);return}if(Object.keys(a.jobs).length===0){o(null,a.results);return}}),a.index++;return dSe.bind(a,o)}});var f0=ee((fsA,Xy)=>{var _J=u0(),hSe=C0(),ESe=B0();Xy.exports=uSe;Xy.exports.ascending=TJ;Xy.exports.descending=CSe;function uSe(n,t,o,a){var e=hSe(n,o);return _J(n,t,e,function i(A,r){if(A){a(A,r);return}if(e.index++,e.index<(e.keyedList||n).length){_J(n,t,e,i);return}a(null,e.results)}),ESe.bind(e,a)}function TJ(n,t){return nt?1:0}function CSe(n,t){return-1*TJ(n,t)}});var RJ=ee((QsA,NJ)=>{var BSe=f0();NJ.exports=fSe;function fSe(n,t,o){return BSe(n,t,null,o)}});var vJ=ee((ysA,kJ)=>{kJ.exports={parallel:MJ(),serial:RJ(),serialOrdered:f0()}});var Q0=ee((msA,PJ)=>{"use strict";PJ.exports=Object});var FJ=ee((SsA,GJ)=>{"use strict";GJ.exports=Error});var UJ=ee((wsA,LJ)=>{"use strict";LJ.exports=EvalError});var KJ=ee((DsA,HJ)=>{"use strict";HJ.exports=RangeError});var YJ=ee((OsA,xJ)=>{"use strict";xJ.exports=ReferenceError});var JJ=ee((bsA,jJ)=>{"use strict";jJ.exports=SyntaxError});var kc=ee((MsA,qJ)=>{"use strict";qJ.exports=TypeError});var VJ=ee((_sA,zJ)=>{"use strict";zJ.exports=URIError});var ZJ=ee((TsA,WJ)=>{"use strict";WJ.exports=Math.abs});var $J=ee((NsA,XJ)=>{"use strict";XJ.exports=Math.floor});var Aq=ee((RsA,eq)=>{"use strict";eq.exports=Math.max});var rq=ee((ksA,tq)=>{"use strict";tq.exports=Math.min});var aq=ee((vsA,iq)=>{"use strict";iq.exports=Math.pow});var nq=ee((PsA,oq)=>{"use strict";oq.exports=Math.round});var gq=ee((GsA,sq)=>{"use strict";sq.exports=Number.isNaN||function(t){return t!==t}});var Iq=ee((FsA,cq)=>{"use strict";var QSe=gq();cq.exports=function(t){return QSe(t)||t===0?t:t<0?-1:1}});var dq=ee((LsA,lq)=>{"use strict";lq.exports=Object.getOwnPropertyDescriptor});var y0=ee((UsA,pq)=>{"use strict";var $y=dq();if($y)try{$y([],"length")}catch{$y=null}pq.exports=$y});var m0=ee((HsA,hq)=>{"use strict";var em=Object.defineProperty||!1;if(em)try{em({},"a",{value:1})}catch{em=!1}hq.exports=em});var S0=ee((KsA,Eq)=>{"use strict";Eq.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},o=Symbol("test"),a=Object(o);if(typeof o=="string"||Object.prototype.toString.call(o)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var e=42;t[o]=e;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var A=Object.getOwnPropertySymbols(t);if(A.length!==1||A[0]!==o||!Object.prototype.propertyIsEnumerable.call(t,o))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var r=Object.getOwnPropertyDescriptor(t,o);if(r.value!==e||r.enumerable!==!0)return!1}return!0}});var Bq=ee((xsA,Cq)=>{"use strict";var uq=typeof Symbol<"u"&&Symbol,ySe=S0();Cq.exports=function(){return typeof uq!="function"||typeof Symbol!="function"||typeof uq("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ySe()}});var w0=ee((YsA,fq)=>{"use strict";fq.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var D0=ee((jsA,Qq)=>{"use strict";var mSe=Q0();Qq.exports=mSe.getPrototypeOf||null});var Sq=ee((JsA,mq)=>{"use strict";var SSe="Function.prototype.bind called on incompatible ",wSe=Object.prototype.toString,DSe=Math.max,OSe="[object Function]",yq=function(t,o){for(var a=[],e=0;e{"use strict";var _Se=Sq();wq.exports=Function.prototype.bind||_Se});var Am=ee((zsA,Dq)=>{"use strict";Dq.exports=Function.prototype.call});var O0=ee((VsA,Oq)=>{"use strict";Oq.exports=Function.prototype.apply});var Mq=ee((WsA,bq)=>{"use strict";bq.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Tq=ee((ZsA,_q)=>{"use strict";var TSe=Lu(),NSe=O0(),RSe=Am(),kSe=Mq();_q.exports=kSe||TSe.call(RSe,NSe)});var b0=ee((XsA,Nq)=>{"use strict";var vSe=Lu(),PSe=kc(),GSe=Am(),FSe=Tq();Nq.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new PSe("a function is required");return FSe(vSe,GSe,t)}});var Fq=ee(($sA,Gq)=>{"use strict";var LSe=b0(),Rq=y0(),vq;try{vq=[].__proto__===Array.prototype}catch(n){if(!n||typeof n!="object"||!("code"in n)||n.code!=="ERR_PROTO_ACCESS")throw n}var M0=!!vq&&Rq&&Rq(Object.prototype,"__proto__"),Pq=Object,kq=Pq.getPrototypeOf;Gq.exports=M0&&typeof M0.get=="function"?LSe([M0.get]):typeof kq=="function"?function(t){return kq(t==null?t:Pq(t))}:!1});var xq=ee((egA,Kq)=>{"use strict";var Lq=w0(),Uq=D0(),Hq=Fq();Kq.exports=Lq?function(t){return Lq(t)}:Uq?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Uq(t)}:Hq?function(t){return Hq(t)}:null});var tm=ee((AgA,Yq)=>{"use strict";var USe=Function.prototype.call,HSe=Object.prototype.hasOwnProperty,KSe=Lu();Yq.exports=KSe.call(USe,HSe)});var xu=ee((tgA,Wq)=>{"use strict";var nt,xSe=Q0(),YSe=FJ(),jSe=UJ(),JSe=KJ(),qSe=YJ(),_p=JJ(),Mp=kc(),zSe=VJ(),VSe=ZJ(),WSe=$J(),ZSe=Aq(),XSe=rq(),$Se=aq(),ewe=nq(),Awe=Iq(),zq=Function,_0=function(n){try{return zq('"use strict"; return ('+n+").constructor;")()}catch{}},Uu=y0(),twe=m0(),T0=function(){throw new Mp},rwe=Uu?(function(){try{return arguments.callee,T0}catch{try{return Uu(arguments,"callee").get}catch{return T0}}})():T0,Op=Bq()(),li=xq(),iwe=D0(),awe=w0(),Vq=O0(),Hu=Am(),bp={},owe=typeof Uint8Array>"u"||!li?nt:li(Uint8Array),Il={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?nt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?nt:ArrayBuffer,"%ArrayIteratorPrototype%":Op&&li?li([][Symbol.iterator]()):nt,"%AsyncFromSyncIteratorPrototype%":nt,"%AsyncFunction%":bp,"%AsyncGenerator%":bp,"%AsyncGeneratorFunction%":bp,"%AsyncIteratorPrototype%":bp,"%Atomics%":typeof Atomics>"u"?nt:Atomics,"%BigInt%":typeof BigInt>"u"?nt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?nt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?nt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?nt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":YSe,"%eval%":eval,"%EvalError%":jSe,"%Float16Array%":typeof Float16Array>"u"?nt:Float16Array,"%Float32Array%":typeof Float32Array>"u"?nt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?nt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?nt:FinalizationRegistry,"%Function%":zq,"%GeneratorFunction%":bp,"%Int8Array%":typeof Int8Array>"u"?nt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?nt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?nt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Op&&li?li(li([][Symbol.iterator]())):nt,"%JSON%":typeof JSON=="object"?JSON:nt,"%Map%":typeof Map>"u"?nt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Op||!li?nt:li(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":xSe,"%Object.getOwnPropertyDescriptor%":Uu,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?nt:Promise,"%Proxy%":typeof Proxy>"u"?nt:Proxy,"%RangeError%":JSe,"%ReferenceError%":qSe,"%Reflect%":typeof Reflect>"u"?nt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?nt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Op||!li?nt:li(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?nt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Op&&li?li(""[Symbol.iterator]()):nt,"%Symbol%":Op?Symbol:nt,"%SyntaxError%":_p,"%ThrowTypeError%":rwe,"%TypedArray%":owe,"%TypeError%":Mp,"%Uint8Array%":typeof Uint8Array>"u"?nt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?nt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?nt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?nt:Uint32Array,"%URIError%":zSe,"%WeakMap%":typeof WeakMap>"u"?nt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?nt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?nt:WeakSet,"%Function.prototype.call%":Hu,"%Function.prototype.apply%":Vq,"%Object.defineProperty%":twe,"%Object.getPrototypeOf%":iwe,"%Math.abs%":VSe,"%Math.floor%":WSe,"%Math.max%":ZSe,"%Math.min%":XSe,"%Math.pow%":$Se,"%Math.round%":ewe,"%Math.sign%":Awe,"%Reflect.getPrototypeOf%":awe};if(li)try{null.error}catch(n){jq=li(li(n)),Il["%Error.prototype%"]=jq}var jq,nwe=function n(t){var o;if(t==="%AsyncFunction%")o=_0("async function () {}");else if(t==="%GeneratorFunction%")o=_0("function* () {}");else if(t==="%AsyncGeneratorFunction%")o=_0("async function* () {}");else if(t==="%AsyncGenerator%"){var a=n("%AsyncGeneratorFunction%");a&&(o=a.prototype)}else if(t==="%AsyncIteratorPrototype%"){var e=n("%AsyncGenerator%");e&&li&&(o=li(e.prototype))}return Il[t]=o,o},Jq={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Ku=Lu(),rm=tm(),swe=Ku.call(Hu,Array.prototype.concat),gwe=Ku.call(Vq,Array.prototype.splice),qq=Ku.call(Hu,String.prototype.replace),im=Ku.call(Hu,String.prototype.slice),cwe=Ku.call(Hu,RegExp.prototype.exec),Iwe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,lwe=/\\(\\)?/g,dwe=function(t){var o=im(t,0,1),a=im(t,-1);if(o==="%"&&a!=="%")throw new _p("invalid intrinsic syntax, expected closing `%`");if(a==="%"&&o!=="%")throw new _p("invalid intrinsic syntax, expected opening `%`");var e=[];return qq(t,Iwe,function(i,A,r,s){e[e.length]=r?qq(s,lwe,"$1"):A||i}),e},pwe=function(t,o){var a=t,e;if(rm(Jq,a)&&(e=Jq[a],a="%"+e[0]+"%"),rm(Il,a)){var i=Il[a];if(i===bp&&(i=nwe(a)),typeof i>"u"&&!o)throw new Mp("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:e,name:a,value:i}}throw new _p("intrinsic "+t+" does not exist!")};Wq.exports=function(t,o){if(typeof t!="string"||t.length===0)throw new Mp("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof o!="boolean")throw new Mp('"allowMissing" argument must be a boolean');if(cwe(/^%?[^%]*%?$/,t)===null)throw new _p("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=dwe(t),e=a.length>0?a[0]:"",i=pwe("%"+e+"%",o),A=i.name,r=i.value,s=!1,g=i.alias;g&&(e=g[0],gwe(a,swe([0,1],g)));for(var c=1,I=!0;c=a.length){var Q=Uu(r,d);I=!!Q,I&&"get"in Q&&!("originalValue"in Q.get)?r=Q.get:r=r[d]}else I=rm(r,d),r=r[d];I&&!s&&(Il[A]=r)}}return r}});var Xq=ee((rgA,Zq)=>{"use strict";var hwe=S0();Zq.exports=function(){return hwe()&&!!Symbol.toStringTag}});var A4=ee((igA,e4)=>{"use strict";var Ewe=xu(),$q=Ewe("%Object.defineProperty%",!0),uwe=Xq()(),Cwe=tm(),Bwe=kc(),am=uwe?Symbol.toStringTag:null;e4.exports=function(t,o){var a=arguments.length>2&&!!arguments[2]&&arguments[2].force,e=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof a<"u"&&typeof a!="boolean"||typeof e<"u"&&typeof e!="boolean")throw new Bwe("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");am&&(a||!Cwe(t,am))&&($q?$q(t,am,{configurable:!e,enumerable:!1,value:o,writable:!1}):t[am]=o)}});var r4=ee((agA,t4)=>{"use strict";t4.exports=function(n,t){return Object.keys(t).forEach(function(o){n[o]=n[o]||t[o]}),n}});var o4=ee((ogA,a4)=>{"use strict";var v0=lJ(),fwe=$e("util"),N0=$e("path"),Qwe=$e("http"),ywe=$e("https"),mwe=$e("url").parse,Swe=$e("fs"),wwe=$e("stream").Stream,Dwe=$e("crypto"),R0=CJ(),Owe=vJ(),bwe=A4(),vc=tm(),k0=r4();function i4(n){return String(n).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}function Bt(n){if(!(this instanceof Bt))return new Bt(n);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],v0.call(this),n=n||{};for(var t in n)this[t]=n[t]}fwe.inherits(Bt,v0);Bt.LINE_BREAK=`\r -`;Bt.DEFAULT_CONTENT_TYPE="application/octet-stream";Bt.prototype.append=function(n,t,o){o=o||{},typeof o=="string"&&(o={filename:o});var a=v0.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var e=this._multiPartHeader(n,t,o),i=this._multiPartFooter();a(e),a(t),a(i),this._trackLength(e,t,o)};Bt.prototype._trackLength=function(n,t,o){var a=0;o.knownLength!=null?a+=Number(o.knownLength):Buffer.isBuffer(t)?a=t.length:typeof t=="string"&&(a=Buffer.byteLength(t)),this._valueLength+=a,this._overheadLength+=Buffer.byteLength(n)+Bt.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&vc(t,"httpVersion"))&&!(t instanceof wwe))&&(o.knownLength||this._valuesToMeasure.push(t))};Bt.prototype._lengthRetriever=function(n,t){vc(n,"fd")?n.end!=null&&n.end!=1/0&&n.start!=null?t(null,n.end+1-(n.start?n.start:0)):Swe.stat(n.path,function(o,a){if(o){t(o);return}var e=a.size-(n.start?n.start:0);t(null,e)}):vc(n,"httpVersion")?t(null,Number(n.headers["content-length"])):vc(n,"httpModule")?(n.on("response",function(o){n.pause(),t(null,Number(o.headers["content-length"]))}),n.resume()):t("Unknown stream")};Bt.prototype._multiPartHeader=function(n,t,o){if(typeof o.header=="string")return o.header;var a=this._getContentDisposition(t,o),e=this._getContentType(t,o),i="",A={"Content-Disposition":["form-data",'name="'+i4(n)+'"'].concat(a||[]),"Content-Type":[].concat(e||[])};typeof o.header=="object"&&k0(A,o.header);var r;for(var s in A)if(vc(A,s)){if(r=A[s],r==null)continue;Array.isArray(r)||(r=[r]),r.length&&(i+=s+": "+r.join("; ")+Bt.LINE_BREAK)}return"--"+this.getBoundary()+Bt.LINE_BREAK+i+Bt.LINE_BREAK};Bt.prototype._getContentDisposition=function(n,t){var o;if(typeof t.filepath=="string"?o=N0.normalize(t.filepath).replace(/\\/g,"/"):t.filename||n&&(n.name||n.path)?o=N0.basename(t.filename||n&&(n.name||n.path)):n&&n.readable&&vc(n,"httpVersion")&&(o=N0.basename(n.client._httpMessage.path||"")),o)return'filename="'+i4(o)+'"'};Bt.prototype._getContentType=function(n,t){var o=t.contentType;return!o&&n&&n.name&&(o=R0.lookup(n.name)),!o&&n&&n.path&&(o=R0.lookup(n.path)),!o&&n&&n.readable&&vc(n,"httpVersion")&&(o=n.headers["content-type"]),!o&&(t.filepath||t.filename)&&(o=R0.lookup(t.filepath||t.filename)),!o&&n&&typeof n=="object"&&(o=Bt.DEFAULT_CONTENT_TYPE),o};Bt.prototype._multiPartFooter=function(){return function(n){var t=Bt.LINE_BREAK,o=this._streams.length===0;o&&(t+=this._lastBoundary()),n(t)}.bind(this)};Bt.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Bt.LINE_BREAK};Bt.prototype.getHeaders=function(n){var t,o={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in n)vc(n,t)&&(o[t.toLowerCase()]=n[t]);return o};Bt.prototype.setBoundary=function(n){if(typeof n!="string")throw new TypeError("FormData boundary must be a string");this._boundary=n};Bt.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Bt.prototype.getBuffer=function(){for(var n=new Buffer.alloc(0),t=this.getBoundary(),o=0,a=this._streams.length;o{var Rp=1e3,kp=Rp*60,vp=kp*60,pl=vp*24,Xwe=pl*7,$we=pl*365.25;Q4.exports=function(n,t){t=t||{};var o=typeof n;if(o==="string"&&n.length>0)return eDe(n);if(o==="number"&&isFinite(n))return t.long?tDe(n):ADe(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function eDe(n){if(n=String(n),!(n.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(t){var o=parseFloat(t[1]),a=(t[2]||"ms").toLowerCase();switch(a){case"years":case"year":case"yrs":case"yr":case"y":return o*$we;case"weeks":case"week":case"w":return o*Xwe;case"days":case"day":case"d":return o*pl;case"hours":case"hour":case"hrs":case"hr":case"h":return o*vp;case"minutes":case"minute":case"mins":case"min":case"m":return o*kp;case"seconds":case"second":case"secs":case"sec":case"s":return o*Rp;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}function ADe(n){var t=Math.abs(n);return t>=pl?Math.round(n/pl)+"d":t>=vp?Math.round(n/vp)+"h":t>=kp?Math.round(n/kp)+"m":t>=Rp?Math.round(n/Rp)+"s":n+"ms"}function tDe(n){var t=Math.abs(n);return t>=pl?gm(n,t,pl,"day"):t>=vp?gm(n,t,vp,"hour"):t>=kp?gm(n,t,kp,"minute"):t>=Rp?gm(n,t,Rp,"second"):n+" ms"}function gm(n,t,o,a){var e=t>=o*1.5;return Math.round(n/o)+" "+a+(e?"s":"")}});var Z0=ee((gcA,m4)=>{function rDe(n){o.debug=o,o.default=o,o.coerce=s,o.disable=A,o.enable=e,o.enabled=r,o.humanize=y4(),o.destroy=g,Object.keys(n).forEach(c=>{o[c]=n[c]}),o.names=[],o.skips=[],o.formatters={};function t(c){let I=0;for(let d=0;d{if(U==="%%")return"%";R++;let z=o.formatters[F];if(typeof z=="function"){let J=y[R];U=z.call(m,J),y.splice(R,1),R--}return U}),o.formatArgs.call(m,y),(m.log||o.log).apply(m,y)}return Q.namespace=c,Q.useColors=o.useColors(),Q.color=o.selectColor(c),Q.extend=a,Q.destroy=o.destroy,Object.defineProperty(Q,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(B!==o.namespaces&&(B=o.namespaces,f=o.enabled(c)),f),set:y=>{d=y}}),typeof o.init=="function"&&o.init(Q),Q}function a(c,I){let d=o(this.namespace+(typeof I>"u"?":":I)+c);return d.log=this.log,d}function e(c){o.save(c),o.namespaces=c,o.names=[],o.skips=[];let I=(typeof c=="string"?c:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of I)d[0]==="-"?o.skips.push(d.slice(1)):o.names.push(d)}function i(c,I){let d=0,B=0,f=-1,Q=0;for(;d"-"+I)].join(",");return o.enable(""),c}function r(c){for(let I of o.skips)if(i(c,I))return!1;for(let I of o.names)if(i(c,I))return!0;return!1}function s(c){return c instanceof Error?c.stack||c.message:c}function g(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return o.enable(o.load()),o}m4.exports=rDe});var S4=ee((Ja,cm)=>{Ja.formatArgs=aDe;Ja.save=oDe;Ja.load=nDe;Ja.useColors=iDe;Ja.storage=sDe();Ja.destroy=(()=>{let n=!1;return()=>{n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ja.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function iDe(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let n;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(n=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(n[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function aDe(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+cm.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;n.splice(1,0,t,"color: inherit");let o=0,a=0;n[0].replace(/%[a-zA-Z%]/g,e=>{e!=="%%"&&(o++,e==="%c"&&(a=o))}),n.splice(a,0,t)}Ja.log=console.debug||console.log||(()=>{});function oDe(n){try{n?Ja.storage.setItem("debug",n):Ja.storage.removeItem("debug")}catch{}}function nDe(){let n;try{n=Ja.storage.getItem("debug")||Ja.storage.getItem("DEBUG")}catch{}return!n&&typeof process<"u"&&"env"in process&&(n=process.env.DEBUG),n}function sDe(){try{return localStorage}catch{}}cm.exports=Z0()(Ja);var{formatters:gDe}=cm.exports;gDe.j=function(n){try{return JSON.stringify(n)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var D4=ee((di,lm)=>{var cDe=$e("tty"),Im=$e("util");di.init=uDe;di.log=pDe;di.formatArgs=lDe;di.save=hDe;di.load=EDe;di.useColors=IDe;di.destroy=Im.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");di.colors=[6,2,3,4,5,1];try{let n=$e("supports-color");n&&(n.stderr||n).level>=2&&(di.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}di.inspectOpts=Object.keys(process.env).filter(n=>/^debug_/i.test(n)).reduce((n,t)=>{let o=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,i)=>i.toUpperCase()),a=process.env[t];return/^(yes|on|true|enabled)$/i.test(a)?a=!0:/^(no|off|false|disabled)$/i.test(a)?a=!1:a==="null"?a=null:a=Number(a),n[o]=a,n},{});function IDe(){return"colors"in di.inspectOpts?!!di.inspectOpts.colors:cDe.isatty(process.stderr.fd)}function lDe(n){let{namespace:t,useColors:o}=this;if(o){let a=this.color,e="\x1B[3"+(a<8?a:"8;5;"+a),i=` ${e};1m${t} \x1B[0m`;n[0]=i+n[0].split(` +var ipe=Object.create;var D_=Object.defineProperty;var ape=Object.getOwnPropertyDescriptor;var ope=Object.getOwnPropertyNames;var npe=Object.getPrototypeOf,spe=Object.prototype.hasOwnProperty;var $e=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(t,o)=>(typeof require<"u"?require:t)[o]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var ue=(n,t)=>()=>(n&&(t=n(n=0)),t);var ee=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),Ur=(n,t)=>{for(var o in t)D_(n,o,{get:t[o],enumerable:!0})},gpe=(n,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of ope(t))!spe.call(n,e)&&e!==o&&D_(n,e,{get:()=>t[e],enumerable:!(a=ape(t,e))||a.enumerable});return n};var ze=(n,t,o)=>(o=n!=null?ipe(npe(n)):{},gpe(t||!n||!n.__esModule?D_(o,"default",{value:n,enumerable:!0}):o,n));var IJ=ee((EsA,cJ)=>{var gJ=$e("stream").Stream,Wme=$e("util");cJ.exports=Nn;function Nn(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}Wme.inherits(Nn,gJ);Nn.create=function(n,t){var o=new this;t=t||{};for(var a in t)o[a]=t[a];o.source=n;var e=n.emit;return n.emit=function(){return o._handleEmit(arguments),e.apply(n,arguments)},n.on("error",function(){}),o.pauseStream&&n.pause(),o};Object.defineProperty(Nn.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Nn.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Nn.prototype.resume=function(){this._released||this.release(),this.source.resume()};Nn.prototype.pause=function(){this.source.pause()};Nn.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(n){this.emit.apply(this,n)}.bind(this)),this._bufferedEvents=[]};Nn.prototype.pipe=function(){var n=gJ.prototype.pipe.apply(this,arguments);return this.resume(),n};Nn.prototype._handleEmit=function(n){if(this._released){this.emit.apply(this,n);return}n[0]==="data"&&(this.dataSize+=n[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(n)};Nn.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var n="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(n))}}});var hJ=ee((usA,pJ)=>{var Zme=$e("util"),dJ=$e("stream").Stream,lJ=IJ();pJ.exports=wr;function wr(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}Zme.inherits(wr,dJ);wr.create=function(n){var t=new this;n=n||{};for(var o in n)t[o]=n[o];return t};wr.isStreamLike=function(n){return typeof n!="function"&&typeof n!="string"&&typeof n!="boolean"&&typeof n!="number"&&!Buffer.isBuffer(n)};wr.prototype.append=function(n){var t=wr.isStreamLike(n);if(t){if(!(n instanceof lJ)){var o=lJ.create(n,{maxDataSize:1/0,pauseStream:this.pauseStreams});n.on("data",this._checkDataSize.bind(this)),n=o}this._handleErrors(n),this.pauseStreams&&n.pause()}return this._streams.push(n),this};wr.prototype.pipe=function(n,t){return dJ.prototype.pipe.call(this,n,t),this.resume(),n};wr.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};wr.prototype._realGetNext=function(){var n=this._streams.shift();if(typeof n>"u"){this.end();return}if(typeof n!="function"){this._pipeNext(n);return}var t=n;t(function(o){var a=wr.isStreamLike(o);a&&(o.on("data",this._checkDataSize.bind(this)),this._handleErrors(o)),this._pipeNext(o)}.bind(this))};wr.prototype._pipeNext=function(n){this._currentStream=n;var t=wr.isStreamLike(n);if(t){n.on("end",this._getNext.bind(this)),n.pipe(this,{end:!1});return}var o=n;this.write(o),this._getNext()};wr.prototype._handleErrors=function(n){var t=this;n.on("error",function(o){t._emitError(o)})};wr.prototype.write=function(n){this.emit("data",n)};wr.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};wr.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};wr.prototype.end=function(){this._reset(),this.emit("end")};wr.prototype.destroy=function(){this._reset(),this.emit("close")};wr.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};wr.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var n="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(n))}};wr.prototype._updateDataSize=function(){this.dataSize=0;var n=this;this._streams.forEach(function(t){t.dataSize&&(n.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};wr.prototype._emitError=function(n){this._reset(),this.emit("error",n)}});var EJ=ee((CsA,Xme)=>{Xme.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var CJ=ee((BsA,uJ)=>{uJ.exports=EJ()});var QJ=ee(ja=>{"use strict";var Xy=CJ(),$me=$e("path").extname,BJ=/^\s*([^;\s]*)(?:;|\s|$)/,eSe=/^text\//i;ja.charset=fJ;ja.charsets={lookup:fJ};ja.contentType=ASe;ja.extension=tSe;ja.extensions=Object.create(null);ja.lookup=rSe;ja.types=Object.create(null);iSe(ja.extensions,ja.types);function fJ(n){if(!n||typeof n!="string")return!1;var t=BJ.exec(n),o=t&&Xy[t[1].toLowerCase()];return o&&o.charset?o.charset:t&&eSe.test(t[1])?"UTF-8":!1}function ASe(n){if(!n||typeof n!="string")return!1;var t=n.indexOf("/")===-1?ja.lookup(n):n;if(!t)return!1;if(t.indexOf("charset")===-1){var o=ja.charset(t);o&&(t+="; charset="+o.toLowerCase())}return t}function tSe(n){if(!n||typeof n!="string")return!1;var t=BJ.exec(n),o=t&&ja.extensions[t[1].toLowerCase()];return!o||!o.length?!1:o[0]}function rSe(n){if(!n||typeof n!="string")return!1;var t=$me("x."+n).toLowerCase().substr(1);return t&&ja.types[t]||!1}function iSe(n,t){var o=["nginx","apache",void 0,"iana"];Object.keys(Xy).forEach(function(e){var i=Xy[e],A=i.extensions;if(!(!A||!A.length)){n[e]=A;for(var r=0;rc||g===c&&t[s].substr(0,12)==="application/"))continue}t[s]=e}}})}});var mJ=ee((QsA,yJ)=>{yJ.exports=aSe;function aSe(n){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(n):setTimeout(n,0)}});var h0=ee((ysA,wJ)=>{var SJ=mJ();wJ.exports=oSe;function oSe(n){var t=!1;return SJ(function(){t=!0}),function(a,e){t?n(a,e):SJ(function(){n(a,e)})}}});var E0=ee((msA,DJ)=>{DJ.exports=nSe;function nSe(n){Object.keys(n.jobs).forEach(sSe.bind(n)),n.jobs={}}function sSe(n){typeof this.jobs[n]=="function"&&this.jobs[n]()}});var u0=ee((SsA,bJ)=>{var OJ=h0(),gSe=E0();bJ.exports=cSe;function cSe(n,t,o,a){var e=o.keyedList?o.keyedList[o.index]:o.index;o.jobs[e]=ISe(t,e,n[e],function(i,A){e in o.jobs&&(delete o.jobs[e],i?gSe(o):o.results[e]=A,a(i,o.results))})}function ISe(n,t,o,a){var e;return n.length==2?e=n(o,OJ(a)):e=n(o,t,OJ(a)),e}});var C0=ee((wsA,MJ)=>{MJ.exports=lSe;function lSe(n,t){var o=!Array.isArray(n),a={index:0,keyedList:o||t?Object.keys(n):null,jobs:{},results:o?{}:[],size:o?Object.keys(n).length:n.length};return t&&a.keyedList.sort(o?t:function(e,i){return t(n[e],n[i])}),a}});var B0=ee((DsA,_J)=>{var dSe=E0(),pSe=h0();_J.exports=hSe;function hSe(n){Object.keys(this.jobs).length&&(this.index=this.size,dSe(this),pSe(n)(null,this.results))}});var NJ=ee((OsA,TJ)=>{var ESe=u0(),uSe=C0(),CSe=B0();TJ.exports=BSe;function BSe(n,t,o){for(var a=uSe(n);a.index<(a.keyedList||n).length;)ESe(n,t,a,function(e,i){if(e){o(e,i);return}if(Object.keys(a.jobs).length===0){o(null,a.results);return}}),a.index++;return CSe.bind(a,o)}});var f0=ee((bsA,$y)=>{var RJ=u0(),fSe=C0(),QSe=B0();$y.exports=ySe;$y.exports.ascending=kJ;$y.exports.descending=mSe;function ySe(n,t,o,a){var e=fSe(n,o);return RJ(n,t,e,function i(A,r){if(A){a(A,r);return}if(e.index++,e.index<(e.keyedList||n).length){RJ(n,t,e,i);return}a(null,e.results)}),QSe.bind(e,a)}function kJ(n,t){return nt?1:0}function mSe(n,t){return-1*kJ(n,t)}});var PJ=ee((MsA,vJ)=>{var SSe=f0();vJ.exports=wSe;function wSe(n,t,o){return SSe(n,t,null,o)}});var FJ=ee((_sA,GJ)=>{GJ.exports={parallel:NJ(),serial:PJ(),serialOrdered:f0()}});var Q0=ee((TsA,LJ)=>{"use strict";LJ.exports=Object});var HJ=ee((NsA,UJ)=>{"use strict";UJ.exports=Error});var xJ=ee((RsA,KJ)=>{"use strict";KJ.exports=EvalError});var jJ=ee((ksA,YJ)=>{"use strict";YJ.exports=RangeError});var qJ=ee((vsA,JJ)=>{"use strict";JJ.exports=ReferenceError});var VJ=ee((PsA,zJ)=>{"use strict";zJ.exports=SyntaxError});var vc=ee((GsA,WJ)=>{"use strict";WJ.exports=TypeError});var XJ=ee((FsA,ZJ)=>{"use strict";ZJ.exports=URIError});var eq=ee((LsA,$J)=>{"use strict";$J.exports=Math.abs});var tq=ee((UsA,Aq)=>{"use strict";Aq.exports=Math.floor});var iq=ee((HsA,rq)=>{"use strict";rq.exports=Math.max});var oq=ee((KsA,aq)=>{"use strict";aq.exports=Math.min});var sq=ee((xsA,nq)=>{"use strict";nq.exports=Math.pow});var cq=ee((YsA,gq)=>{"use strict";gq.exports=Math.round});var lq=ee((jsA,Iq)=>{"use strict";Iq.exports=Number.isNaN||function(t){return t!==t}});var pq=ee((JsA,dq)=>{"use strict";var DSe=lq();dq.exports=function(t){return DSe(t)||t===0?t:t<0?-1:1}});var Eq=ee((qsA,hq)=>{"use strict";hq.exports=Object.getOwnPropertyDescriptor});var y0=ee((zsA,uq)=>{"use strict";var em=Eq();if(em)try{em([],"length")}catch{em=null}uq.exports=em});var m0=ee((VsA,Cq)=>{"use strict";var Am=Object.defineProperty||!1;if(Am)try{Am({},"a",{value:1})}catch{Am=!1}Cq.exports=Am});var S0=ee((WsA,Bq)=>{"use strict";Bq.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},o=Symbol("test"),a=Object(o);if(typeof o=="string"||Object.prototype.toString.call(o)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var e=42;t[o]=e;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var A=Object.getOwnPropertySymbols(t);if(A.length!==1||A[0]!==o||!Object.prototype.propertyIsEnumerable.call(t,o))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var r=Object.getOwnPropertyDescriptor(t,o);if(r.value!==e||r.enumerable!==!0)return!1}return!0}});var yq=ee((ZsA,Qq)=>{"use strict";var fq=typeof Symbol<"u"&&Symbol,OSe=S0();Qq.exports=function(){return typeof fq!="function"||typeof Symbol!="function"||typeof fq("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:OSe()}});var w0=ee((XsA,mq)=>{"use strict";mq.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var D0=ee(($sA,Sq)=>{"use strict";var bSe=Q0();Sq.exports=bSe.getPrototypeOf||null});var Oq=ee((egA,Dq)=>{"use strict";var MSe="Function.prototype.bind called on incompatible ",_Se=Object.prototype.toString,TSe=Math.max,NSe="[object Function]",wq=function(t,o){for(var a=[],e=0;e{"use strict";var vSe=Oq();bq.exports=Function.prototype.bind||vSe});var tm=ee((tgA,Mq)=>{"use strict";Mq.exports=Function.prototype.call});var O0=ee((rgA,_q)=>{"use strict";_q.exports=Function.prototype.apply});var Nq=ee((igA,Tq)=>{"use strict";Tq.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var kq=ee((agA,Rq)=>{"use strict";var PSe=Lu(),GSe=O0(),FSe=tm(),LSe=Nq();Rq.exports=LSe||PSe.call(FSe,GSe)});var b0=ee((ogA,vq)=>{"use strict";var USe=Lu(),HSe=vc(),KSe=tm(),xSe=kq();vq.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new HSe("a function is required");return xSe(USe,KSe,t)}});var Hq=ee((ngA,Uq)=>{"use strict";var YSe=b0(),Pq=y0(),Fq;try{Fq=[].__proto__===Array.prototype}catch(n){if(!n||typeof n!="object"||!("code"in n)||n.code!=="ERR_PROTO_ACCESS")throw n}var M0=!!Fq&&Pq&&Pq(Object.prototype,"__proto__"),Lq=Object,Gq=Lq.getPrototypeOf;Uq.exports=M0&&typeof M0.get=="function"?YSe([M0.get]):typeof Gq=="function"?function(t){return Gq(t==null?t:Lq(t))}:!1});var Jq=ee((sgA,jq)=>{"use strict";var Kq=w0(),xq=D0(),Yq=Hq();jq.exports=Kq?function(t){return Kq(t)}:xq?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return xq(t)}:Yq?function(t){return Yq(t)}:null});var rm=ee((ggA,qq)=>{"use strict";var jSe=Function.prototype.call,JSe=Object.prototype.hasOwnProperty,qSe=Lu();qq.exports=qSe.call(jSe,JSe)});var xu=ee((cgA,$q)=>{"use strict";var nt,zSe=Q0(),VSe=HJ(),WSe=xJ(),ZSe=jJ(),XSe=qJ(),_p=VJ(),Mp=vc(),$Se=XJ(),ewe=eq(),Awe=tq(),twe=iq(),rwe=oq(),iwe=sq(),awe=cq(),owe=pq(),Zq=Function,_0=function(n){try{return Zq('"use strict"; return ('+n+").constructor;")()}catch{}},Uu=y0(),nwe=m0(),T0=function(){throw new Mp},swe=Uu?(function(){try{return arguments.callee,T0}catch{try{return Uu(arguments,"callee").get}catch{return T0}}})():T0,Op=yq()(),li=Jq(),gwe=D0(),cwe=w0(),Xq=O0(),Hu=tm(),bp={},Iwe=typeof Uint8Array>"u"||!li?nt:li(Uint8Array),Il={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?nt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?nt:ArrayBuffer,"%ArrayIteratorPrototype%":Op&&li?li([][Symbol.iterator]()):nt,"%AsyncFromSyncIteratorPrototype%":nt,"%AsyncFunction%":bp,"%AsyncGenerator%":bp,"%AsyncGeneratorFunction%":bp,"%AsyncIteratorPrototype%":bp,"%Atomics%":typeof Atomics>"u"?nt:Atomics,"%BigInt%":typeof BigInt>"u"?nt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?nt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?nt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?nt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":VSe,"%eval%":eval,"%EvalError%":WSe,"%Float16Array%":typeof Float16Array>"u"?nt:Float16Array,"%Float32Array%":typeof Float32Array>"u"?nt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?nt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?nt:FinalizationRegistry,"%Function%":Zq,"%GeneratorFunction%":bp,"%Int8Array%":typeof Int8Array>"u"?nt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?nt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?nt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Op&&li?li(li([][Symbol.iterator]())):nt,"%JSON%":typeof JSON=="object"?JSON:nt,"%Map%":typeof Map>"u"?nt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Op||!li?nt:li(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":zSe,"%Object.getOwnPropertyDescriptor%":Uu,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?nt:Promise,"%Proxy%":typeof Proxy>"u"?nt:Proxy,"%RangeError%":ZSe,"%ReferenceError%":XSe,"%Reflect%":typeof Reflect>"u"?nt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?nt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Op||!li?nt:li(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?nt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Op&&li?li(""[Symbol.iterator]()):nt,"%Symbol%":Op?Symbol:nt,"%SyntaxError%":_p,"%ThrowTypeError%":swe,"%TypedArray%":Iwe,"%TypeError%":Mp,"%Uint8Array%":typeof Uint8Array>"u"?nt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?nt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?nt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?nt:Uint32Array,"%URIError%":$Se,"%WeakMap%":typeof WeakMap>"u"?nt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?nt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?nt:WeakSet,"%Function.prototype.call%":Hu,"%Function.prototype.apply%":Xq,"%Object.defineProperty%":nwe,"%Object.getPrototypeOf%":gwe,"%Math.abs%":ewe,"%Math.floor%":Awe,"%Math.max%":twe,"%Math.min%":rwe,"%Math.pow%":iwe,"%Math.round%":awe,"%Math.sign%":owe,"%Reflect.getPrototypeOf%":cwe};if(li)try{null.error}catch(n){zq=li(li(n)),Il["%Error.prototype%"]=zq}var zq,lwe=function n(t){var o;if(t==="%AsyncFunction%")o=_0("async function () {}");else if(t==="%GeneratorFunction%")o=_0("function* () {}");else if(t==="%AsyncGeneratorFunction%")o=_0("async function* () {}");else if(t==="%AsyncGenerator%"){var a=n("%AsyncGeneratorFunction%");a&&(o=a.prototype)}else if(t==="%AsyncIteratorPrototype%"){var e=n("%AsyncGenerator%");e&&li&&(o=li(e.prototype))}return Il[t]=o,o},Vq={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Ku=Lu(),im=rm(),dwe=Ku.call(Hu,Array.prototype.concat),pwe=Ku.call(Xq,Array.prototype.splice),Wq=Ku.call(Hu,String.prototype.replace),am=Ku.call(Hu,String.prototype.slice),hwe=Ku.call(Hu,RegExp.prototype.exec),Ewe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,uwe=/\\(\\)?/g,Cwe=function(t){var o=am(t,0,1),a=am(t,-1);if(o==="%"&&a!=="%")throw new _p("invalid intrinsic syntax, expected closing `%`");if(a==="%"&&o!=="%")throw new _p("invalid intrinsic syntax, expected opening `%`");var e=[];return Wq(t,Ewe,function(i,A,r,s){e[e.length]=r?Wq(s,uwe,"$1"):A||i}),e},Bwe=function(t,o){var a=t,e;if(im(Vq,a)&&(e=Vq[a],a="%"+e[0]+"%"),im(Il,a)){var i=Il[a];if(i===bp&&(i=lwe(a)),typeof i>"u"&&!o)throw new Mp("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:e,name:a,value:i}}throw new _p("intrinsic "+t+" does not exist!")};$q.exports=function(t,o){if(typeof t!="string"||t.length===0)throw new Mp("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof o!="boolean")throw new Mp('"allowMissing" argument must be a boolean');if(hwe(/^%?[^%]*%?$/,t)===null)throw new _p("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=Cwe(t),e=a.length>0?a[0]:"",i=Bwe("%"+e+"%",o),A=i.name,r=i.value,s=!1,g=i.alias;g&&(e=g[0],pwe(a,dwe([0,1],g)));for(var c=1,I=!0;c=a.length){var Q=Uu(r,d);I=!!Q,I&&"get"in Q&&!("originalValue"in Q.get)?r=Q.get:r=r[d]}else I=im(r,d),r=r[d];I&&!s&&(Il[A]=r)}}return r}});var A4=ee((IgA,e4)=>{"use strict";var fwe=S0();e4.exports=function(){return fwe()&&!!Symbol.toStringTag}});var i4=ee((lgA,r4)=>{"use strict";var Qwe=xu(),t4=Qwe("%Object.defineProperty%",!0),ywe=A4()(),mwe=rm(),Swe=vc(),om=ywe?Symbol.toStringTag:null;r4.exports=function(t,o){var a=arguments.length>2&&!!arguments[2]&&arguments[2].force,e=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof a<"u"&&typeof a!="boolean"||typeof e<"u"&&typeof e!="boolean")throw new Swe("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");om&&(a||!mwe(t,om))&&(t4?t4(t,om,{configurable:!e,enumerable:!1,value:o,writable:!1}):t[om]=o)}});var o4=ee((dgA,a4)=>{"use strict";a4.exports=function(n,t){return Object.keys(t).forEach(function(o){n[o]=n[o]||t[o]}),n}});var g4=ee((pgA,s4)=>{"use strict";var v0=hJ(),wwe=$e("util"),N0=$e("path"),Dwe=$e("http"),Owe=$e("https"),bwe=$e("url").parse,Mwe=$e("fs"),_we=$e("stream").Stream,Twe=$e("crypto"),R0=QJ(),Nwe=FJ(),Rwe=i4(),Pc=rm(),k0=o4();function n4(n){return String(n).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}function Bt(n){if(!(this instanceof Bt))return new Bt(n);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],v0.call(this),n=n||{};for(var t in n)this[t]=n[t]}wwe.inherits(Bt,v0);Bt.LINE_BREAK=`\r +`;Bt.DEFAULT_CONTENT_TYPE="application/octet-stream";Bt.prototype.append=function(n,t,o){o=o||{},typeof o=="string"&&(o={filename:o});var a=v0.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var e=this._multiPartHeader(n,t,o),i=this._multiPartFooter();a(e),a(t),a(i),this._trackLength(e,t,o)};Bt.prototype._trackLength=function(n,t,o){var a=0;o.knownLength!=null?a+=Number(o.knownLength):Buffer.isBuffer(t)?a=t.length:typeof t=="string"&&(a=Buffer.byteLength(t)),this._valueLength+=a,this._overheadLength+=Buffer.byteLength(n)+Bt.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Pc(t,"httpVersion"))&&!(t instanceof _we))&&(o.knownLength||this._valuesToMeasure.push(t))};Bt.prototype._lengthRetriever=function(n,t){Pc(n,"fd")?n.end!=null&&n.end!=1/0&&n.start!=null?t(null,n.end+1-(n.start?n.start:0)):Mwe.stat(n.path,function(o,a){if(o){t(o);return}var e=a.size-(n.start?n.start:0);t(null,e)}):Pc(n,"httpVersion")?t(null,Number(n.headers["content-length"])):Pc(n,"httpModule")?(n.on("response",function(o){n.pause(),t(null,Number(o.headers["content-length"]))}),n.resume()):t("Unknown stream")};Bt.prototype._multiPartHeader=function(n,t,o){if(typeof o.header=="string")return o.header;var a=this._getContentDisposition(t,o),e=this._getContentType(t,o),i="",A={"Content-Disposition":["form-data",'name="'+n4(n)+'"'].concat(a||[]),"Content-Type":[].concat(e||[])};typeof o.header=="object"&&k0(A,o.header);var r;for(var s in A)if(Pc(A,s)){if(r=A[s],r==null)continue;Array.isArray(r)||(r=[r]),r.length&&(i+=s+": "+r.join("; ")+Bt.LINE_BREAK)}return"--"+this.getBoundary()+Bt.LINE_BREAK+i+Bt.LINE_BREAK};Bt.prototype._getContentDisposition=function(n,t){var o;if(typeof t.filepath=="string"?o=N0.normalize(t.filepath).replace(/\\/g,"/"):t.filename||n&&(n.name||n.path)?o=N0.basename(t.filename||n&&(n.name||n.path)):n&&n.readable&&Pc(n,"httpVersion")&&(o=N0.basename(n.client._httpMessage.path||"")),o)return'filename="'+n4(o)+'"'};Bt.prototype._getContentType=function(n,t){var o=t.contentType;return!o&&n&&n.name&&(o=R0.lookup(n.name)),!o&&n&&n.path&&(o=R0.lookup(n.path)),!o&&n&&n.readable&&Pc(n,"httpVersion")&&(o=n.headers["content-type"]),!o&&(t.filepath||t.filename)&&(o=R0.lookup(t.filepath||t.filename)),!o&&n&&typeof n=="object"&&(o=Bt.DEFAULT_CONTENT_TYPE),o};Bt.prototype._multiPartFooter=function(){return function(n){var t=Bt.LINE_BREAK,o=this._streams.length===0;o&&(t+=this._lastBoundary()),n(t)}.bind(this)};Bt.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Bt.LINE_BREAK};Bt.prototype.getHeaders=function(n){var t,o={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in n)Pc(n,t)&&(o[t.toLowerCase()]=n[t]);return o};Bt.prototype.setBoundary=function(n){if(typeof n!="string")throw new TypeError("FormData boundary must be a string");this._boundary=n};Bt.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Bt.prototype.getBuffer=function(){for(var n=new Buffer.alloc(0),t=this.getBoundary(),o=0,a=this._streams.length;o{var Rp=1e3,kp=Rp*60,vp=kp*60,pl=vp*24,rDe=pl*7,iDe=pl*365.25;S4.exports=function(n,t){t=t||{};var o=typeof n;if(o==="string"&&n.length>0)return aDe(n);if(o==="number"&&isFinite(n))return t.long?nDe(n):oDe(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function aDe(n){if(n=String(n),!(n.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(t){var o=parseFloat(t[1]),a=(t[2]||"ms").toLowerCase();switch(a){case"years":case"year":case"yrs":case"yr":case"y":return o*iDe;case"weeks":case"week":case"w":return o*rDe;case"days":case"day":case"d":return o*pl;case"hours":case"hour":case"hrs":case"hr":case"h":return o*vp;case"minutes":case"minute":case"mins":case"min":case"m":return o*kp;case"seconds":case"second":case"secs":case"sec":case"s":return o*Rp;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}function oDe(n){var t=Math.abs(n);return t>=pl?Math.round(n/pl)+"d":t>=vp?Math.round(n/vp)+"h":t>=kp?Math.round(n/kp)+"m":t>=Rp?Math.round(n/Rp)+"s":n+"ms"}function nDe(n){var t=Math.abs(n);return t>=pl?cm(n,t,pl,"day"):t>=vp?cm(n,t,vp,"hour"):t>=kp?cm(n,t,kp,"minute"):t>=Rp?cm(n,t,Rp,"second"):n+" ms"}function cm(n,t,o,a){var e=t>=o*1.5;return Math.round(n/o)+" "+a+(e?"s":"")}});var Z0=ee((ucA,D4)=>{function sDe(n){o.debug=o,o.default=o,o.coerce=s,o.disable=A,o.enable=e,o.enabled=r,o.humanize=w4(),o.destroy=g,Object.keys(n).forEach(c=>{o[c]=n[c]}),o.names=[],o.skips=[],o.formatters={};function t(c){let I=0;for(let d=0;d{if(U==="%%")return"%";R++;let J=o.formatters[F];if(typeof J=="function"){let V=y[R];U=J.call(m,V),y.splice(R,1),R--}return U}),o.formatArgs.call(m,y),(m.log||o.log).apply(m,y)}return Q.namespace=c,Q.useColors=o.useColors(),Q.color=o.selectColor(c),Q.extend=a,Q.destroy=o.destroy,Object.defineProperty(Q,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(B!==o.namespaces&&(B=o.namespaces,f=o.enabled(c)),f),set:y=>{d=y}}),typeof o.init=="function"&&o.init(Q),Q}function a(c,I){let d=o(this.namespace+(typeof I>"u"?":":I)+c);return d.log=this.log,d}function e(c){o.save(c),o.namespaces=c,o.names=[],o.skips=[];let I=(typeof c=="string"?c:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of I)d[0]==="-"?o.skips.push(d.slice(1)):o.names.push(d)}function i(c,I){let d=0,B=0,f=-1,Q=0;for(;d"-"+I)].join(",");return o.enable(""),c}function r(c){for(let I of o.skips)if(i(c,I))return!1;for(let I of o.names)if(i(c,I))return!0;return!1}function s(c){return c instanceof Error?c.stack||c.message:c}function g(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return o.enable(o.load()),o}D4.exports=sDe});var O4=ee((Ja,Im)=>{Ja.formatArgs=cDe;Ja.save=IDe;Ja.load=lDe;Ja.useColors=gDe;Ja.storage=dDe();Ja.destroy=(()=>{let n=!1;return()=>{n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ja.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function gDe(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let n;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(n=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(n[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function cDe(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+Im.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;n.splice(1,0,t,"color: inherit");let o=0,a=0;n[0].replace(/%[a-zA-Z%]/g,e=>{e!=="%%"&&(o++,e==="%c"&&(a=o))}),n.splice(a,0,t)}Ja.log=console.debug||console.log||(()=>{});function IDe(n){try{n?Ja.storage.setItem("debug",n):Ja.storage.removeItem("debug")}catch{}}function lDe(){let n;try{n=Ja.storage.getItem("debug")||Ja.storage.getItem("DEBUG")}catch{}return!n&&typeof process<"u"&&"env"in process&&(n=process.env.DEBUG),n}function dDe(){try{return localStorage}catch{}}Im.exports=Z0()(Ja);var{formatters:pDe}=Im.exports;pDe.j=function(n){try{return JSON.stringify(n)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var M4=ee((di,dm)=>{var hDe=$e("tty"),lm=$e("util");di.init=yDe;di.log=BDe;di.formatArgs=uDe;di.save=fDe;di.load=QDe;di.useColors=EDe;di.destroy=lm.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");di.colors=[6,2,3,4,5,1];try{let n=$e("supports-color");n&&(n.stderr||n).level>=2&&(di.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}di.inspectOpts=Object.keys(process.env).filter(n=>/^debug_/i.test(n)).reduce((n,t)=>{let o=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,i)=>i.toUpperCase()),a=process.env[t];return/^(yes|on|true|enabled)$/i.test(a)?a=!0:/^(no|off|false|disabled)$/i.test(a)?a=!1:a==="null"?a=null:a=Number(a),n[o]=a,n},{});function EDe(){return"colors"in di.inspectOpts?!!di.inspectOpts.colors:hDe.isatty(process.stderr.fd)}function uDe(n){let{namespace:t,useColors:o}=this;if(o){let a=this.color,e="\x1B[3"+(a<8?a:"8;5;"+a),i=` ${e};1m${t} \x1B[0m`;n[0]=i+n[0].split(` `).join(` -`+i),n.push(e+"m+"+lm.exports.humanize(this.diff)+"\x1B[0m")}else n[0]=dDe()+t+" "+n[0]}function dDe(){return di.inspectOpts.hideDate?"":new Date().toISOString()+" "}function pDe(...n){return process.stderr.write(Im.formatWithOptions(di.inspectOpts,...n)+` -`)}function hDe(n){n?process.env.DEBUG=n:delete process.env.DEBUG}function EDe(){return process.env.DEBUG}function uDe(n){n.inspectOpts={};let t=Object.keys(di.inspectOpts);for(let o=0;ot.trim()).join(" ")};w4.O=function(n){return this.inspectOpts.colors=this.useColors,Im.inspect(n,this.inspectOpts)}});var lt=ee((ccA,X0)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?X0.exports=S4():X0.exports=D4()});var O4=ee($0=>{"use strict";Object.defineProperty($0,"__esModule",{value:!0});function CDe(n){return function(t,o){return new Promise((a,e)=>{n.call(this,t,o,(i,A)=>{i?e(i):a(A)})})}}$0.default=CDe});var _4=ee((AN,M4)=>{"use strict";var b4=AN&&AN.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},BDe=$e("events"),fDe=b4(lt()),QDe=b4(O4()),Ju=fDe.default("agent-base");function yDe(n){return!!n&&typeof n.addRequest=="function"}function eN(){let{stack:n}=new Error;return typeof n!="string"?!1:n.split(` -`).some(t=>t.indexOf("(https.js:")!==-1||t.indexOf("node:https:")!==-1)}function dm(n,t){return new dm.Agent(n,t)}(function(n){class t extends BDe.EventEmitter{constructor(a,e){super();let i=e;typeof a=="function"?this.callback=a:a&&(i=a),this.timeout=null,i&&typeof i.timeout=="number"&&(this.timeout=i.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:eN()?443:80}set defaultPort(a){this.explicitDefaultPort=a}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:eN()?"https:":"http:"}set protocol(a){this.explicitProtocol=a}callback(a,e,i){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(a,e){let i=Object.assign({},e);typeof i.secureEndpoint!="boolean"&&(i.secureEndpoint=eN()),i.host==null&&(i.host="localhost"),i.port==null&&(i.port=i.secureEndpoint?443:80),i.protocol==null&&(i.protocol=i.secureEndpoint?"https:":"http:"),i.host&&i.path&&delete i.path,delete i.agent,delete i.hostname,delete i._defaultAgent,delete i.defaultPort,delete i.createConnection,a._last=!0,a.shouldKeepAlive=!1;let A=!1,r=null,s=i.timeout||this.timeout,g=B=>{a._hadError||(a.emit("error",B),a._hadError=!0)},c=()=>{r=null,A=!0;let B=new Error(`A "socket" was not created for HTTP request before ${s}ms`);B.code="ETIMEOUT",g(B)},I=B=>{A||(r!==null&&(clearTimeout(r),r=null),g(B))},d=B=>{if(A)return;if(r!=null&&(clearTimeout(r),r=null),yDe(B)){Ju("Callback returned another Agent instance %o",B.constructor.name),B.addRequest(a,i);return}if(B){B.once("free",()=>{this.freeSocket(B,i)}),a.onSocket(B);return}let f=new Error(`no Duplex stream was returned to agent-base for \`${a.method} ${a.path}\``);g(f)};if(typeof this.callback!="function"){g(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(Ju("Converting legacy callback function to promise"),this.promisifiedCallback=QDe.default(this.callback)):this.promisifiedCallback=this.callback),typeof s=="number"&&s>0&&(r=setTimeout(c,s)),"port"in i&&typeof i.port!="number"&&(i.port=Number(i.port));try{Ju("Resolving socket for %o request: %o",i.protocol,`${a.method} ${a.path}`),Promise.resolve(this.promisifiedCallback(a,i)).then(d,I)}catch(B){Promise.reject(B).catch(I)}}freeSocket(a,e){Ju("Freeing socket %o %o",a.constructor.name,e),a.destroy()}destroy(){Ju("Destroying agent %o",this.constructor.name)}}n.Agent=t,n.prototype=n.Agent.prototype})(dm||(dm={}));M4.exports=dm});var T4=ee(zu=>{"use strict";var mDe=zu&&zu.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(zu,"__esModule",{value:!0});var SDe=mDe(lt()),qu=SDe.default("https-proxy-agent:parse-proxy-response");function wDe(n){return new Promise((t,o)=>{let a=0,e=[];function i(){let I=n.read();I?c(I):n.once("readable",i)}function A(){n.removeListener("end",s),n.removeListener("error",g),n.removeListener("close",r),n.removeListener("readable",i)}function r(I){qu("onclose had error %o",I)}function s(){qu("onend")}function g(I){A(),qu("onerror %o",I),o(I)}function c(I){e.push(I),a+=I.length;let d=Buffer.concat(e,a);if(d.indexOf(`\r +`+i),n.push(e+"m+"+dm.exports.humanize(this.diff)+"\x1B[0m")}else n[0]=CDe()+t+" "+n[0]}function CDe(){return di.inspectOpts.hideDate?"":new Date().toISOString()+" "}function BDe(...n){return process.stderr.write(lm.formatWithOptions(di.inspectOpts,...n)+` +`)}function fDe(n){n?process.env.DEBUG=n:delete process.env.DEBUG}function QDe(){return process.env.DEBUG}function yDe(n){n.inspectOpts={};let t=Object.keys(di.inspectOpts);for(let o=0;ot.trim()).join(" ")};b4.O=function(n){return this.inspectOpts.colors=this.useColors,lm.inspect(n,this.inspectOpts)}});var lt=ee((CcA,X0)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?X0.exports=O4():X0.exports=M4()});var _4=ee($0=>{"use strict";Object.defineProperty($0,"__esModule",{value:!0});function mDe(n){return function(t,o){return new Promise((a,e)=>{n.call(this,t,o,(i,A)=>{i?e(i):a(A)})})}}$0.default=mDe});var R4=ee((AN,N4)=>{"use strict";var T4=AN&&AN.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},SDe=$e("events"),wDe=T4(lt()),DDe=T4(_4()),Ju=wDe.default("agent-base");function ODe(n){return!!n&&typeof n.addRequest=="function"}function eN(){let{stack:n}=new Error;return typeof n!="string"?!1:n.split(` +`).some(t=>t.indexOf("(https.js:")!==-1||t.indexOf("node:https:")!==-1)}function pm(n,t){return new pm.Agent(n,t)}(function(n){class t extends SDe.EventEmitter{constructor(a,e){super();let i=e;typeof a=="function"?this.callback=a:a&&(i=a),this.timeout=null,i&&typeof i.timeout=="number"&&(this.timeout=i.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:eN()?443:80}set defaultPort(a){this.explicitDefaultPort=a}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:eN()?"https:":"http:"}set protocol(a){this.explicitProtocol=a}callback(a,e,i){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(a,e){let i=Object.assign({},e);typeof i.secureEndpoint!="boolean"&&(i.secureEndpoint=eN()),i.host==null&&(i.host="localhost"),i.port==null&&(i.port=i.secureEndpoint?443:80),i.protocol==null&&(i.protocol=i.secureEndpoint?"https:":"http:"),i.host&&i.path&&delete i.path,delete i.agent,delete i.hostname,delete i._defaultAgent,delete i.defaultPort,delete i.createConnection,a._last=!0,a.shouldKeepAlive=!1;let A=!1,r=null,s=i.timeout||this.timeout,g=B=>{a._hadError||(a.emit("error",B),a._hadError=!0)},c=()=>{r=null,A=!0;let B=new Error(`A "socket" was not created for HTTP request before ${s}ms`);B.code="ETIMEOUT",g(B)},I=B=>{A||(r!==null&&(clearTimeout(r),r=null),g(B))},d=B=>{if(A)return;if(r!=null&&(clearTimeout(r),r=null),ODe(B)){Ju("Callback returned another Agent instance %o",B.constructor.name),B.addRequest(a,i);return}if(B){B.once("free",()=>{this.freeSocket(B,i)}),a.onSocket(B);return}let f=new Error(`no Duplex stream was returned to agent-base for \`${a.method} ${a.path}\``);g(f)};if(typeof this.callback!="function"){g(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(Ju("Converting legacy callback function to promise"),this.promisifiedCallback=DDe.default(this.callback)):this.promisifiedCallback=this.callback),typeof s=="number"&&s>0&&(r=setTimeout(c,s)),"port"in i&&typeof i.port!="number"&&(i.port=Number(i.port));try{Ju("Resolving socket for %o request: %o",i.protocol,`${a.method} ${a.path}`),Promise.resolve(this.promisifiedCallback(a,i)).then(d,I)}catch(B){Promise.reject(B).catch(I)}}freeSocket(a,e){Ju("Freeing socket %o %o",a.constructor.name,e),a.destroy()}destroy(){Ju("Destroying agent %o",this.constructor.name)}}n.Agent=t,n.prototype=n.Agent.prototype})(pm||(pm={}));N4.exports=pm});var k4=ee(zu=>{"use strict";var bDe=zu&&zu.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(zu,"__esModule",{value:!0});var MDe=bDe(lt()),qu=MDe.default("https-proxy-agent:parse-proxy-response");function _De(n){return new Promise((t,o)=>{let a=0,e=[];function i(){let I=n.read();I?c(I):n.once("readable",i)}function A(){n.removeListener("end",s),n.removeListener("error",g),n.removeListener("close",r),n.removeListener("readable",i)}function r(I){qu("onclose had error %o",I)}function s(){qu("onend")}function g(I){A(),qu("onerror %o",I),o(I)}function c(I){e.push(I),a+=I.length;let d=Buffer.concat(e,a);if(d.indexOf(`\r \r `)===-1){qu("have not received end of HTTP headers yet..."),i();return}let f=d.toString("ascii",0,d.indexOf(`\r -`)),Q=+f.split(" ")[1];qu("got proxy server response: %o",f),t({statusCode:Q,buffered:d})}n.on("error",g),n.on("close",r),n.on("end",s),i()})}zu.default=wDe});var k4=ee(hl=>{"use strict";var DDe=hl&&hl.__awaiter||function(n,t,o,a){function e(i){return i instanceof o?i:new o(function(A){A(i)})}return new(o||(o=Promise))(function(i,A){function r(c){try{g(a.next(c))}catch(I){A(I)}}function s(c){try{g(a.throw(c))}catch(I){A(I)}}function g(c){c.done?i(c.value):e(c.value).then(r,s)}g((a=a.apply(n,t||[])).next())})},Pp=hl&&hl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(hl,"__esModule",{value:!0});var N4=Pp($e("net")),R4=Pp($e("tls")),ODe=Pp($e("url")),bDe=Pp($e("assert")),MDe=Pp(lt()),_De=_4(),TDe=Pp(T4()),Vu=MDe.default("https-proxy-agent:agent"),tN=class extends _De.Agent{constructor(t){let o;if(typeof t=="string"?o=ODe.default.parse(t):o=t,!o)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");Vu("creating new HttpsProxyAgent instance: %o",o),super(o);let a=Object.assign({},o);this.secureProxy=o.secureProxy||kDe(a.protocol),a.host=a.hostname||a.host,typeof a.port=="string"&&(a.port=parseInt(a.port,10)),!a.port&&a.host&&(a.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in a)&&(a.ALPNProtocols=["http 1.1"]),a.host&&a.path&&(delete a.path,delete a.pathname),this.proxy=a}callback(t,o){return DDe(this,void 0,void 0,function*(){let{proxy:a,secureProxy:e}=this,i;e?(Vu("Creating `tls.Socket`: %o",a),i=R4.default.connect(a)):(Vu("Creating `net.Socket`: %o",a),i=N4.default.connect(a));let A=Object.assign({},a.headers),s=`CONNECT ${`${o.host}:${o.port}`} HTTP/1.1\r -`;a.auth&&(A["Proxy-Authorization"]=`Basic ${Buffer.from(a.auth).toString("base64")}`);let{host:g,port:c,secureEndpoint:I}=o;RDe(c,I)||(g+=`:${c}`),A.Host=g,A.Connection="close";for(let y of Object.keys(A))s+=`${y}: ${A[y]}\r -`;let d=TDe.default(i);i.write(`${s}\r -`);let{statusCode:B,buffered:f}=yield d;if(B===200){if(t.once("socket",NDe),o.secureEndpoint){Vu("Upgrading socket connection to TLS");let y=o.servername||o.host;return R4.default.connect(Object.assign(Object.assign({},vDe(o,"host","hostname","path","port")),{socket:i,servername:y}))}return i}i.destroy();let Q=new N4.default.Socket({writable:!1});return Q.readable=!0,t.once("socket",y=>{Vu("replaying proxy buffer for failed request"),bDe.default(y.listenerCount("data")>0),y.push(f),y.push(null)}),Q})}};hl.default=tN;function NDe(n){n.resume()}function RDe(n,t){return!!(!t&&n===80||t&&n===443)}function kDe(n){return typeof n=="string"?/^https:?$/i.test(n):!1}function vDe(n,...t){let o={},a;for(a in n)t.includes(a)||(o[a]=n[a]);return o}});var oN=ee((aN,v4)=>{"use strict";var PDe=aN&&aN.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},rN=PDe(k4());function iN(n){return new rN.default(n)}(function(n){n.HttpsProxyAgent=rN.default,n.prototype=rN.default.prototype})(iN||(iN={}));v4.exports=iN});var G4=ee((pcA,P4)=>{var Wu;P4.exports=function(){if(!Wu){try{Wu=lt()("follow-redirects")}catch{}typeof Wu!="function"&&(Wu=function(){})}Wu.apply(null,arguments)}});var K4=ee((hcA,CN)=>{var Xu=$e("url"),Zu=Xu.URL,GDe=$e("http"),FDe=$e("https"),IN=$e("stream").Writable,lN=$e("assert"),F4=G4();(function(){var t=typeof process<"u",o=typeof window<"u"&&typeof document<"u",a=ul(Error.captureStackTrace);!t&&(o||!a)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var dN=!1;try{lN(new Zu(""))}catch(n){dN=n.code==="ERR_INVALID_URL"}var LDe=["Authorization","Proxy-Authorization","Cookie"],UDe=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],pN=["abort","aborted","connect","error","socket","timeout"],hN=Object.create(null);pN.forEach(function(n){hN[n]=function(t,o,a){this._redirectable.emit(n,t,o,a)}});var sN=$u("ERR_INVALID_URL","Invalid URL",TypeError),gN=$u("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),HDe=$u("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",gN),KDe=$u("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),xDe=$u("ERR_STREAM_WRITE_AFTER_END","write after end"),YDe=IN.prototype.destroy||U4;function qa(n,t){IN.call(this),this._sanitizeOptions(n),this._options=n,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var o=this;this._onNativeResponse=function(a){try{o._processResponse(a)}catch(e){o.emit("error",e instanceof gN?e:new gN({cause:e}))}},this._headerFilter=new RegExp("^(?:"+LDe.concat(n.sensitiveHeaders).map(WDe).join("|")+")$","i"),this._performRequest()}qa.prototype=Object.create(IN.prototype);qa.prototype.abort=function(){uN(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};qa.prototype.destroy=function(n){return uN(this._currentRequest,n),YDe.call(this,n),this};qa.prototype.write=function(n,t,o){if(this._ending)throw new xDe;if(!El(n)&&!zDe(n))throw new TypeError("data should be a string, Buffer or Uint8Array");if(ul(t)&&(o=t,t=null),n.length===0){o&&o();return}this._requestBodyLength+n.length<=this._options.maxBodyLength?(this._requestBodyLength+=n.length,this._requestBodyBuffers.push({data:n,encoding:t}),this._currentRequest.write(n,t,o)):(this.emit("error",new KDe),this.abort())};qa.prototype.end=function(n,t,o){if(ul(n)?(o=n,n=t=null):ul(t)&&(o=t,t=null),!n)this._ended=this._ending=!0,this._currentRequest.end(null,null,o);else{var a=this,e=this._currentRequest;this.write(n,t,function(){a._ended=!0,e.end(null,null,o)}),this._ending=!0}};qa.prototype.setHeader=function(n,t){this._options.headers[n]=t,this._currentRequest.setHeader(n,t)};qa.prototype.removeHeader=function(n){delete this._options.headers[n],this._currentRequest.removeHeader(n)};qa.prototype.setTimeout=function(n,t){var o=this;function a(A){A.setTimeout(n),A.removeListener("timeout",A.destroy),A.addListener("timeout",A.destroy)}function e(A){o._timeout&&clearTimeout(o._timeout),o._timeout=setTimeout(function(){o.emit("timeout"),i()},n),a(A)}function i(){o._timeout&&(clearTimeout(o._timeout),o._timeout=null),o.removeListener("abort",i),o.removeListener("error",i),o.removeListener("response",i),o.removeListener("close",i),t&&o.removeListener("timeout",t),o.socket||o._currentRequest.removeListener("socket",e)}return t&&this.on("timeout",t),this.socket?e(this.socket):this._currentRequest.once("socket",e),this.on("socket",a),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(n){qa.prototype[n]=function(t,o){return this._currentRequest[n](t,o)}});["aborted","connection","socket"].forEach(function(n){Object.defineProperty(qa.prototype,n,{get:function(){return this._currentRequest[n]}})});qa.prototype._sanitizeOptions=function(n){if(n.headers||(n.headers={}),qDe(n.sensitiveHeaders)||(n.sensitiveHeaders=[]),n.host&&(n.hostname||(n.hostname=n.host),delete n.host),!n.pathname&&n.path){var t=n.path.indexOf("?");t<0?n.pathname=n.path:(n.pathname=n.path.substring(0,t),n.search=n.path.substring(t))}};qa.prototype._performRequest=function(){var n=this._options.protocol,t=this._options.nativeProtocols[n];if(!t)throw new TypeError("Unsupported protocol "+n);if(this._options.agents){var o=n.slice(0,-1);this._options.agent=this._options.agents[o]}var a=this._currentRequest=t.request(this._options,this._onNativeResponse);a._redirectable=this;for(var e of pN)a.on(e,hN[e]);if(this._currentUrl=/^\//.test(this._options.path)?Xu.format(this._options):this._options.path,this._isRedirect){var i=0,A=this,r=this._requestBodyBuffers;(function s(g){if(a===A._currentRequest)if(g)A.emit("error",g);else if(i=400){n.responseUrl=this._currentUrl,n.redirects=this._redirects,this.emit("response",n),this._requestBodyBuffers=[];return}if(uN(this._currentRequest),n.destroy(),++this._redirectCount>this._options.maxRedirects)throw new HDe;var a,e=this._options.beforeRedirect;e&&(a=Object.assign({Host:n.req.getHeader("host")},this._options.headers));var i=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],nN(/^content-/i,this._options.headers));var A=nN(/^host$/i,this._options.headers),r=EN(this._currentUrl),s=A||r.host,g=/^\w+:/.test(o)?this._currentUrl:Xu.format(Object.assign(r,{host:s})),c=jDe(o,g);if(F4("redirecting to",c.href),this._isRedirect=!0,cN(c,this._options),(c.protocol!==r.protocol&&c.protocol!=="https:"||c.host!==s&&!JDe(c.host,s))&&nN(this._headerFilter,this._options.headers),ul(e)){var I={headers:n.headers,statusCode:t},d={url:g,method:i,headers:a};e(this._options,I,d),this._sanitizeOptions(this._options)}this._performRequest()};function L4(n){var t={maxRedirects:21,maxBodyLength:10485760},o={};return Object.keys(n).forEach(function(a){var e=a+":",i=o[e]=n[a],A=t[a]=Object.create(i);function r(g,c,I){return VDe(g)?g=cN(g):El(g)?g=cN(EN(g)):(I=c,c=H4(g),g={protocol:e}),ul(c)&&(I=c,c=null),c=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},g,c),c.nativeProtocols=o,!El(c.host)&&!El(c.hostname)&&(c.hostname="::1"),lN.equal(c.protocol,e,"protocol mismatch"),F4("options",c),new qa(c,I)}function s(g,c,I){var d=A.request(g,c,I);return d.end(),d}Object.defineProperties(A,{request:{value:r,configurable:!0,enumerable:!0,writable:!0},get:{value:s,configurable:!0,enumerable:!0,writable:!0}})}),t}function U4(){}function EN(n){var t;if(dN)t=new Zu(n);else if(t=H4(Xu.parse(n)),!El(t.protocol))throw new sN({input:n});return t}function jDe(n,t){return dN?new Zu(n,t):EN(Xu.resolve(t,n))}function H4(n){if(/^\[/.test(n.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(n.hostname))throw new sN({input:n.href||n});if(/^\[/.test(n.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(n.host))throw new sN({input:n.href||n});return n}function cN(n,t){var o=t||{};for(var a of UDe)o[a]=n[a];return o.hostname.startsWith("[")&&(o.hostname=o.hostname.slice(1,-1)),o.port!==""&&(o.port=Number(o.port)),o.path=o.search?o.pathname+o.search:o.pathname,o}function nN(n,t){var o;for(var a in t)n.test(a)&&(o=t[a],delete t[a]);return o===null||typeof o>"u"?void 0:String(o).trim()}function $u(n,t,o){function a(e){ul(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,e||{}),this.code=n,this.message=this.cause?t+": "+this.cause.message:t}return a.prototype=new(o||Error),Object.defineProperties(a.prototype,{constructor:{value:a,enumerable:!1},name:{value:"Error ["+n+"]",enumerable:!1}}),a}function uN(n,t){for(var o of pN)n.removeListener(o,hN[o]);n.on("error",U4),n.destroy(t)}function JDe(n,t){lN(El(n)&&El(t));var o=n.length-t.length-1;return o>0&&n[o]==="."&&n.endsWith(t)}function qDe(n){return n instanceof Array}function El(n){return typeof n=="string"||n instanceof String}function ul(n){return typeof n=="function"}function zDe(n){return typeof n=="object"&&"length"in n}function VDe(n){return Zu&&n instanceof Zu}function WDe(n){return n.replace(/[\]\\/()*+?.$]/g,"\\$&")}CN.exports=L4({http:GDe,https:FDe});CN.exports.wrap=L4});var F8=ee((kdA,G8)=>{G8.exports=$e("util").inspect});var cC=ee((vdA,iz)=>{var WN=typeof Map=="function"&&Map.prototype,HN=Object.getOwnPropertyDescriptor&&WN?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ym=WN&&HN&&typeof HN.get=="function"?HN.get:null,L8=WN&&Map.prototype.forEach,ZN=typeof Set=="function"&&Set.prototype,KN=Object.getOwnPropertyDescriptor&&ZN?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,mm=ZN&&KN&&typeof KN.get=="function"?KN.get:null,U8=ZN&&Set.prototype.forEach,gbe=typeof WeakMap=="function"&&WeakMap.prototype,nC=gbe?WeakMap.prototype.has:null,cbe=typeof WeakSet=="function"&&WeakSet.prototype,sC=cbe?WeakSet.prototype.has:null,Ibe=typeof WeakRef=="function"&&WeakRef.prototype,H8=Ibe?WeakRef.prototype.deref:null,lbe=Boolean.prototype.valueOf,dbe=Object.prototype.toString,pbe=Function.prototype.toString,hbe=String.prototype.match,XN=String.prototype.slice,Fc=String.prototype.replace,Ebe=String.prototype.toUpperCase,K8=String.prototype.toLowerCase,Z8=RegExp.prototype.test,x8=Array.prototype.concat,Ds=Array.prototype.join,ube=Array.prototype.slice,Y8=Math.floor,jN=typeof BigInt=="function"?BigInt.prototype.valueOf:null,xN=Object.getOwnPropertySymbols,JN=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Up=typeof Symbol=="function"&&typeof Symbol.iterator=="object",gC=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Up||!0)?Symbol.toStringTag:null,X8=Object.prototype.propertyIsEnumerable,j8=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function J8(n,t){if(n===1/0||n===-1/0||n!==n||n&&n>-1e3&&n<1e3||Z8.call(/e/,t))return t;var o=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var a=n<0?-Y8(-n):Y8(n);if(a!==n){var e=String(a),i=XN.call(t,e.length+1);return Fc.call(e,o,"$&_")+"."+Fc.call(Fc.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Fc.call(t,o,"$&_")}var qN=F8(),q8=qN.custom,z8=Az(q8)?q8:null,$8={__proto__:null,double:'"',single:"'"},Cbe={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};iz.exports=function n(t,o,a,e){var i=o||{};if(Tg(i,"quoteStyle")&&!Tg($8,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Tg(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var A=Tg(i,"customInspect")?i.customInspect:!0;if(typeof A!="boolean"&&A!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Tg(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Tg(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var r=i.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return rz(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var s=String(t);return r?J8(t,s):s}if(typeof t=="bigint"){var g=String(t)+"n";return r?J8(t,g):g}var c=typeof i.depth>"u"?5:i.depth;if(typeof a>"u"&&(a=0),a>=c&&c>0&&typeof t=="object")return zN(t)?"[Array]":"[Object]";var I=Pbe(i,a);if(typeof e>"u")e=[];else if(tz(e,t)>=0)return"[Circular]";function d(H,N,k){if(N&&(e=ube.call(e),e.push(N)),k){var q={depth:i.depth};return Tg(i,"quoteStyle")&&(q.quoteStyle=i.quoteStyle),n(H,q,a+1,e)}return n(H,i,a+1,e)}if(typeof t=="function"&&!V8(t)){var B=Obe(t),f=Qm(t,d);return"[Function"+(B?": "+B:" (anonymous)")+"]"+(f.length>0?" { "+Ds.call(f,", ")+" }":"")}if(Az(t)){var Q=Up?Fc.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):JN.call(t);return typeof t=="object"&&!Up?oC(Q):Q}if(Rbe(t)){for(var y="<"+K8.call(String(t.nodeName)),m=t.attributes||[],_=0;_",y}if(zN(t)){if(t.length===0)return"[]";var T=Qm(t,d);return I&&!vbe(T)?"["+VN(T,I)+"]":"[ "+Ds.call(T,", ")+" ]"}if(Qbe(t)){var R=Qm(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!X8.call(t,"cause")?"{ ["+String(t)+"] "+Ds.call(x8.call("[cause]: "+d(t.cause),R),", ")+" }":R.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Ds.call(R,", ")+" }"}if(typeof t=="object"&&A){if(z8&&typeof t[z8]=="function"&&qN)return qN(t,{depth:c-a});if(A!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(bbe(t)){var L=[];return L8&&L8.call(t,function(H,N){L.push(d(N,t,!0)+" => "+d(H,t))}),W8("Map",ym.call(t),L,I)}if(Tbe(t)){var U=[];return U8&&U8.call(t,function(H){U.push(d(H,t))}),W8("Set",mm.call(t),U,I)}if(Mbe(t))return YN("WeakMap");if(Nbe(t))return YN("WeakSet");if(_be(t))return YN("WeakRef");if(mbe(t))return oC(d(Number(t)));if(wbe(t))return oC(d(jN.call(t)));if(Sbe(t))return oC(lbe.call(t));if(ybe(t))return oC(d(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof global<"u"&&t===global)return"{ [object globalThis] }";if(!fbe(t)&&!V8(t)){var F=Qm(t,d),z=j8?j8(t)===Object.prototype:t instanceof Object||t.constructor===Object,J=t instanceof Object?"":"null prototype",K=!z&&gC&&Object(t)===t&&gC in t?XN.call(Lc(t),8,-1):J?"Object":"",G=z||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",V=G+(K||J?"["+Ds.call(x8.call([],K||[],J||[]),": ")+"] ":"");return F.length===0?V+"{}":I?V+"{"+VN(F,I)+"}":V+"{ "+Ds.call(F,", ")+" }"}return String(t)};function ez(n,t,o){var a=o.quoteStyle||t,e=$8[a];return e+n+e}function Bbe(n){return Fc.call(String(n),/"/g,""")}function Bl(n){return!gC||!(typeof n=="object"&&(gC in n||typeof n[gC]<"u"))}function zN(n){return Lc(n)==="[object Array]"&&Bl(n)}function fbe(n){return Lc(n)==="[object Date]"&&Bl(n)}function V8(n){return Lc(n)==="[object RegExp]"&&Bl(n)}function Qbe(n){return Lc(n)==="[object Error]"&&Bl(n)}function ybe(n){return Lc(n)==="[object String]"&&Bl(n)}function mbe(n){return Lc(n)==="[object Number]"&&Bl(n)}function Sbe(n){return Lc(n)==="[object Boolean]"&&Bl(n)}function Az(n){if(Up)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!JN)return!1;try{return JN.call(n),!0}catch{}return!1}function wbe(n){if(!n||typeof n!="object"||!jN)return!1;try{return jN.call(n),!0}catch{}return!1}var Dbe=Object.prototype.hasOwnProperty||function(n){return n in this};function Tg(n,t){return Dbe.call(n,t)}function Lc(n){return dbe.call(n)}function Obe(n){if(n.name)return n.name;var t=hbe.call(pbe.call(n),/^function\s*([\w$]+)/);return t?t[1]:null}function tz(n,t){if(n.indexOf)return n.indexOf(t);for(var o=0,a=n.length;ot.maxStringLength){var o=n.length-t.maxStringLength,a="... "+o+" more character"+(o>1?"s":"");return rz(XN.call(n,0,t.maxStringLength),t)+a}var e=Cbe[t.quoteStyle||"single"];e.lastIndex=0;var i=Fc.call(Fc.call(n,e,"\\$1"),/[\x00-\x1f]/g,kbe);return ez(i,"single",t)}function kbe(n){var t=n.charCodeAt(0),o={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return o?"\\"+o:"\\x"+(t<16?"0":"")+Ebe.call(t.toString(16))}function oC(n){return"Object("+n+")"}function YN(n){return n+" { ? }"}function W8(n,t,o,a){var e=a?VN(o,a):Ds.call(o,", ");return n+" ("+t+") {"+e+"}"}function vbe(n){for(var t=0;t=0)return!1;return!0}function Pbe(n,t){var o;if(n.indent===" ")o=" ";else if(typeof n.indent=="number"&&n.indent>0)o=Ds.call(Array(n.indent+1)," ");else return null;return{base:o,prev:Ds.call(Array(t+1),o)}}function VN(n,t){if(n.length===0)return"";var o=` +`)),Q=+f.split(" ")[1];qu("got proxy server response: %o",f),t({statusCode:Q,buffered:d})}n.on("error",g),n.on("close",r),n.on("end",s),i()})}zu.default=_De});var G4=ee(hl=>{"use strict";var TDe=hl&&hl.__awaiter||function(n,t,o,a){function e(i){return i instanceof o?i:new o(function(A){A(i)})}return new(o||(o=Promise))(function(i,A){function r(c){try{g(a.next(c))}catch(I){A(I)}}function s(c){try{g(a.throw(c))}catch(I){A(I)}}function g(c){c.done?i(c.value):e(c.value).then(r,s)}g((a=a.apply(n,t||[])).next())})},Pp=hl&&hl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(hl,"__esModule",{value:!0});var v4=Pp($e("net")),P4=Pp($e("tls")),NDe=Pp($e("url")),RDe=Pp($e("assert")),kDe=Pp(lt()),vDe=R4(),PDe=Pp(k4()),Vu=kDe.default("https-proxy-agent:agent"),tN=class extends vDe.Agent{constructor(t){let o;if(typeof t=="string"?o=NDe.default.parse(t):o=t,!o)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");Vu("creating new HttpsProxyAgent instance: %o",o),super(o);let a=Object.assign({},o);this.secureProxy=o.secureProxy||LDe(a.protocol),a.host=a.hostname||a.host,typeof a.port=="string"&&(a.port=parseInt(a.port,10)),!a.port&&a.host&&(a.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in a)&&(a.ALPNProtocols=["http 1.1"]),a.host&&a.path&&(delete a.path,delete a.pathname),this.proxy=a}callback(t,o){return TDe(this,void 0,void 0,function*(){let{proxy:a,secureProxy:e}=this,i;e?(Vu("Creating `tls.Socket`: %o",a),i=P4.default.connect(a)):(Vu("Creating `net.Socket`: %o",a),i=v4.default.connect(a));let A=Object.assign({},a.headers),s=`CONNECT ${`${o.host}:${o.port}`} HTTP/1.1\r +`;a.auth&&(A["Proxy-Authorization"]=`Basic ${Buffer.from(a.auth).toString("base64")}`);let{host:g,port:c,secureEndpoint:I}=o;FDe(c,I)||(g+=`:${c}`),A.Host=g,A.Connection="close";for(let y of Object.keys(A))s+=`${y}: ${A[y]}\r +`;let d=PDe.default(i);i.write(`${s}\r +`);let{statusCode:B,buffered:f}=yield d;if(B===200){if(t.once("socket",GDe),o.secureEndpoint){Vu("Upgrading socket connection to TLS");let y=o.servername||o.host;return P4.default.connect(Object.assign(Object.assign({},UDe(o,"host","hostname","path","port")),{socket:i,servername:y}))}return i}i.destroy();let Q=new v4.default.Socket({writable:!1});return Q.readable=!0,t.once("socket",y=>{Vu("replaying proxy buffer for failed request"),RDe.default(y.listenerCount("data")>0),y.push(f),y.push(null)}),Q})}};hl.default=tN;function GDe(n){n.resume()}function FDe(n,t){return!!(!t&&n===80||t&&n===443)}function LDe(n){return typeof n=="string"?/^https:?$/i.test(n):!1}function UDe(n,...t){let o={},a;for(a in n)t.includes(a)||(o[a]=n[a]);return o}});var oN=ee((aN,F4)=>{"use strict";var HDe=aN&&aN.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},rN=HDe(G4());function iN(n){return new rN.default(n)}(function(n){n.HttpsProxyAgent=rN.default,n.prototype=rN.default.prototype})(iN||(iN={}));F4.exports=iN});var U4=ee((ycA,L4)=>{var Wu;L4.exports=function(){if(!Wu){try{Wu=lt()("follow-redirects")}catch{}typeof Wu!="function"&&(Wu=function(){})}Wu.apply(null,arguments)}});var j4=ee((mcA,CN)=>{var Xu=$e("url"),Zu=Xu.URL,KDe=$e("http"),xDe=$e("https"),IN=$e("stream").Writable,lN=$e("assert"),H4=U4();(function(){var t=typeof process<"u",o=typeof window<"u"&&typeof document<"u",a=ul(Error.captureStackTrace);!t&&(o||!a)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var dN=!1;try{lN(new Zu(""))}catch(n){dN=n.code==="ERR_INVALID_URL"}var YDe=["Authorization","Proxy-Authorization","Cookie"],jDe=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],pN=["abort","aborted","connect","error","socket","timeout"],hN=Object.create(null);pN.forEach(function(n){hN[n]=function(t,o,a){this._redirectable.emit(n,t,o,a)}});var sN=$u("ERR_INVALID_URL","Invalid URL",TypeError),gN=$u("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),JDe=$u("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",gN),qDe=$u("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),zDe=$u("ERR_STREAM_WRITE_AFTER_END","write after end"),VDe=IN.prototype.destroy||x4;function qa(n,t){IN.call(this),this._sanitizeOptions(n),this._options=n,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var o=this;this._onNativeResponse=function(a){try{o._processResponse(a)}catch(e){o.emit("error",e instanceof gN?e:new gN({cause:e}))}},this._headerFilter=new RegExp("^(?:"+YDe.concat(n.sensitiveHeaders).map(AOe).join("|")+")$","i"),this._performRequest()}qa.prototype=Object.create(IN.prototype);qa.prototype.abort=function(){uN(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};qa.prototype.destroy=function(n){return uN(this._currentRequest,n),VDe.call(this,n),this};qa.prototype.write=function(n,t,o){if(this._ending)throw new zDe;if(!El(n)&&!$De(n))throw new TypeError("data should be a string, Buffer or Uint8Array");if(ul(t)&&(o=t,t=null),n.length===0){o&&o();return}this._requestBodyLength+n.length<=this._options.maxBodyLength?(this._requestBodyLength+=n.length,this._requestBodyBuffers.push({data:n,encoding:t}),this._currentRequest.write(n,t,o)):(this.emit("error",new qDe),this.abort())};qa.prototype.end=function(n,t,o){if(ul(n)?(o=n,n=t=null):ul(t)&&(o=t,t=null),!n)this._ended=this._ending=!0,this._currentRequest.end(null,null,o);else{var a=this,e=this._currentRequest;this.write(n,t,function(){a._ended=!0,e.end(null,null,o)}),this._ending=!0}};qa.prototype.setHeader=function(n,t){this._options.headers[n]=t,this._currentRequest.setHeader(n,t)};qa.prototype.removeHeader=function(n){delete this._options.headers[n],this._currentRequest.removeHeader(n)};qa.prototype.setTimeout=function(n,t){var o=this;function a(A){A.setTimeout(n),A.removeListener("timeout",A.destroy),A.addListener("timeout",A.destroy)}function e(A){o._timeout&&clearTimeout(o._timeout),o._timeout=setTimeout(function(){o.emit("timeout"),i()},n),a(A)}function i(){o._timeout&&(clearTimeout(o._timeout),o._timeout=null),o.removeListener("abort",i),o.removeListener("error",i),o.removeListener("response",i),o.removeListener("close",i),t&&o.removeListener("timeout",t),o.socket||o._currentRequest.removeListener("socket",e)}return t&&this.on("timeout",t),this.socket?e(this.socket):this._currentRequest.once("socket",e),this.on("socket",a),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(n){qa.prototype[n]=function(t,o){return this._currentRequest[n](t,o)}});["aborted","connection","socket"].forEach(function(n){Object.defineProperty(qa.prototype,n,{get:function(){return this._currentRequest[n]}})});qa.prototype._sanitizeOptions=function(n){if(n.headers||(n.headers={}),XDe(n.sensitiveHeaders)||(n.sensitiveHeaders=[]),n.host&&(n.hostname||(n.hostname=n.host),delete n.host),!n.pathname&&n.path){var t=n.path.indexOf("?");t<0?n.pathname=n.path:(n.pathname=n.path.substring(0,t),n.search=n.path.substring(t))}};qa.prototype._performRequest=function(){var n=this._options.protocol,t=this._options.nativeProtocols[n];if(!t)throw new TypeError("Unsupported protocol "+n);if(this._options.agents){var o=n.slice(0,-1);this._options.agent=this._options.agents[o]}var a=this._currentRequest=t.request(this._options,this._onNativeResponse);a._redirectable=this;for(var e of pN)a.on(e,hN[e]);if(this._currentUrl=/^\//.test(this._options.path)?Xu.format(this._options):this._options.path,this._isRedirect){var i=0,A=this,r=this._requestBodyBuffers;(function s(g){if(a===A._currentRequest)if(g)A.emit("error",g);else if(i=400){n.responseUrl=this._currentUrl,n.redirects=this._redirects,this.emit("response",n),this._requestBodyBuffers=[];return}if(uN(this._currentRequest),n.destroy(),++this._redirectCount>this._options.maxRedirects)throw new JDe;var a,e=this._options.beforeRedirect;e&&(a=Object.assign({Host:n.req.getHeader("host")},this._options.headers));var i=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],nN(/^content-/i,this._options.headers));var A=nN(/^host$/i,this._options.headers),r=EN(this._currentUrl),s=A||r.host,g=/^\w+:/.test(o)?this._currentUrl:Xu.format(Object.assign(r,{host:s})),c=WDe(o,g);if(H4("redirecting to",c.href),this._isRedirect=!0,cN(c,this._options),(c.protocol!==r.protocol&&c.protocol!=="https:"||c.host!==s&&!ZDe(c.host,s))&&nN(this._headerFilter,this._options.headers),ul(e)){var I={headers:n.headers,statusCode:t},d={url:g,method:i,headers:a};e(this._options,I,d),this._sanitizeOptions(this._options)}this._performRequest()};function K4(n){var t={maxRedirects:21,maxBodyLength:10485760},o={};return Object.keys(n).forEach(function(a){var e=a+":",i=o[e]=n[a],A=t[a]=Object.create(i);function r(g,c,I){return eOe(g)?g=cN(g):El(g)?g=cN(EN(g)):(I=c,c=Y4(g),g={protocol:e}),ul(c)&&(I=c,c=null),c=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},g,c),c.nativeProtocols=o,!El(c.host)&&!El(c.hostname)&&(c.hostname="::1"),lN.equal(c.protocol,e,"protocol mismatch"),H4("options",c),new qa(c,I)}function s(g,c,I){var d=A.request(g,c,I);return d.end(),d}Object.defineProperties(A,{request:{value:r,configurable:!0,enumerable:!0,writable:!0},get:{value:s,configurable:!0,enumerable:!0,writable:!0}})}),t}function x4(){}function EN(n){var t;if(dN)t=new Zu(n);else if(t=Y4(Xu.parse(n)),!El(t.protocol))throw new sN({input:n});return t}function WDe(n,t){return dN?new Zu(n,t):EN(Xu.resolve(t,n))}function Y4(n){if(/^\[/.test(n.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(n.hostname))throw new sN({input:n.href||n});if(/^\[/.test(n.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(n.host))throw new sN({input:n.href||n});return n}function cN(n,t){var o=t||{};for(var a of jDe)o[a]=n[a];return o.hostname.startsWith("[")&&(o.hostname=o.hostname.slice(1,-1)),o.port!==""&&(o.port=Number(o.port)),o.path=o.search?o.pathname+o.search:o.pathname,o}function nN(n,t){var o;for(var a in t)n.test(a)&&(o=t[a],delete t[a]);return o===null||typeof o>"u"?void 0:String(o).trim()}function $u(n,t,o){function a(e){ul(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,e||{}),this.code=n,this.message=this.cause?t+": "+this.cause.message:t}return a.prototype=new(o||Error),Object.defineProperties(a.prototype,{constructor:{value:a,enumerable:!1},name:{value:"Error ["+n+"]",enumerable:!1}}),a}function uN(n,t){for(var o of pN)n.removeListener(o,hN[o]);n.on("error",x4),n.destroy(t)}function ZDe(n,t){lN(El(n)&&El(t));var o=n.length-t.length-1;return o>0&&n[o]==="."&&n.endsWith(t)}function XDe(n){return n instanceof Array}function El(n){return typeof n=="string"||n instanceof String}function ul(n){return typeof n=="function"}function $De(n){return typeof n=="object"&&"length"in n}function eOe(n){return Zu&&n instanceof Zu}function AOe(n){return n.replace(/[\]\\/()*+?.$]/g,"\\$&")}CN.exports=K4({http:KDe,https:xDe});CN.exports.wrap=K4});var H8=ee((KdA,U8)=>{U8.exports=$e("util").inspect});var cC=ee((xdA,nz)=>{var WN=typeof Map=="function"&&Map.prototype,HN=Object.getOwnPropertyDescriptor&&WN?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,mm=WN&&HN&&typeof HN.get=="function"?HN.get:null,K8=WN&&Map.prototype.forEach,ZN=typeof Set=="function"&&Set.prototype,KN=Object.getOwnPropertyDescriptor&&ZN?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Sm=ZN&&KN&&typeof KN.get=="function"?KN.get:null,x8=ZN&&Set.prototype.forEach,pbe=typeof WeakMap=="function"&&WeakMap.prototype,nC=pbe?WeakMap.prototype.has:null,hbe=typeof WeakSet=="function"&&WeakSet.prototype,sC=hbe?WeakSet.prototype.has:null,Ebe=typeof WeakRef=="function"&&WeakRef.prototype,Y8=Ebe?WeakRef.prototype.deref:null,ube=Boolean.prototype.valueOf,Cbe=Object.prototype.toString,Bbe=Function.prototype.toString,fbe=String.prototype.match,XN=String.prototype.slice,Lc=String.prototype.replace,Qbe=String.prototype.toUpperCase,j8=String.prototype.toLowerCase,ez=RegExp.prototype.test,J8=Array.prototype.concat,Ds=Array.prototype.join,ybe=Array.prototype.slice,q8=Math.floor,jN=typeof BigInt=="function"?BigInt.prototype.valueOf:null,xN=Object.getOwnPropertySymbols,JN=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Up=typeof Symbol=="function"&&typeof Symbol.iterator=="object",gC=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Up||!0)?Symbol.toStringTag:null,Az=Object.prototype.propertyIsEnumerable,z8=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function V8(n,t){if(n===1/0||n===-1/0||n!==n||n&&n>-1e3&&n<1e3||ez.call(/e/,t))return t;var o=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var a=n<0?-q8(-n):q8(n);if(a!==n){var e=String(a),i=XN.call(t,e.length+1);return Lc.call(e,o,"$&_")+"."+Lc.call(Lc.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Lc.call(t,o,"$&_")}var qN=H8(),W8=qN.custom,Z8=iz(W8)?W8:null,tz={__proto__:null,double:'"',single:"'"},mbe={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};nz.exports=function n(t,o,a,e){var i=o||{};if(Ng(i,"quoteStyle")&&!Ng(tz,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ng(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var A=Ng(i,"customInspect")?i.customInspect:!0;if(typeof A!="boolean"&&A!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ng(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ng(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var r=i.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return oz(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var s=String(t);return r?V8(t,s):s}if(typeof t=="bigint"){var g=String(t)+"n";return r?V8(t,g):g}var c=typeof i.depth>"u"?5:i.depth;if(typeof a>"u"&&(a=0),a>=c&&c>0&&typeof t=="object")return zN(t)?"[Array]":"[Object]";var I=Hbe(i,a);if(typeof e>"u")e=[];else if(az(e,t)>=0)return"[Circular]";function d(K,N,k){if(N&&(e=ybe.call(e),e.push(N)),k){var z={depth:i.depth};return Ng(i,"quoteStyle")&&(z.quoteStyle=i.quoteStyle),n(K,z,a+1,e)}return n(K,i,a+1,e)}if(typeof t=="function"&&!X8(t)){var B=Nbe(t),f=ym(t,d);return"[Function"+(B?": "+B:" (anonymous)")+"]"+(f.length>0?" { "+Ds.call(f,", ")+" }":"")}if(iz(t)){var Q=Up?Lc.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):JN.call(t);return typeof t=="object"&&!Up?oC(Q):Q}if(Fbe(t)){for(var y="<"+j8.call(String(t.nodeName)),m=t.attributes||[],_=0;_",y}if(zN(t)){if(t.length===0)return"[]";var T=ym(t,d);return I&&!Ube(T)?"["+VN(T,I)+"]":"[ "+Ds.call(T,", ")+" ]"}if(Dbe(t)){var R=ym(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!Az.call(t,"cause")?"{ ["+String(t)+"] "+Ds.call(J8.call("[cause]: "+d(t.cause),R),", ")+" }":R.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Ds.call(R,", ")+" }"}if(typeof t=="object"&&A){if(Z8&&typeof t[Z8]=="function"&&qN)return qN(t,{depth:c-a});if(A!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Rbe(t)){var L=[];return K8&&K8.call(t,function(K,N){L.push(d(N,t,!0)+" => "+d(K,t))}),$8("Map",mm.call(t),L,I)}if(Pbe(t)){var U=[];return x8&&x8.call(t,function(K){U.push(d(K,t))}),$8("Set",Sm.call(t),U,I)}if(kbe(t))return YN("WeakMap");if(Gbe(t))return YN("WeakSet");if(vbe(t))return YN("WeakRef");if(bbe(t))return oC(d(Number(t)));if(_be(t))return oC(d(jN.call(t)));if(Mbe(t))return oC(ube.call(t));if(Obe(t))return oC(d(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof global<"u"&&t===global)return"{ [object globalThis] }";if(!wbe(t)&&!X8(t)){var F=ym(t,d),J=z8?z8(t)===Object.prototype:t instanceof Object||t.constructor===Object,V=t instanceof Object?"":"null prototype",H=!J&&gC&&Object(t)===t&&gC in t?XN.call(Uc(t),8,-1):V?"Object":"",G=J||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",q=G+(H||V?"["+Ds.call(J8.call([],H||[],V||[]),": ")+"] ":"");return F.length===0?q+"{}":I?q+"{"+VN(F,I)+"}":q+"{ "+Ds.call(F,", ")+" }"}return String(t)};function rz(n,t,o){var a=o.quoteStyle||t,e=tz[a];return e+n+e}function Sbe(n){return Lc.call(String(n),/"/g,""")}function Bl(n){return!gC||!(typeof n=="object"&&(gC in n||typeof n[gC]<"u"))}function zN(n){return Uc(n)==="[object Array]"&&Bl(n)}function wbe(n){return Uc(n)==="[object Date]"&&Bl(n)}function X8(n){return Uc(n)==="[object RegExp]"&&Bl(n)}function Dbe(n){return Uc(n)==="[object Error]"&&Bl(n)}function Obe(n){return Uc(n)==="[object String]"&&Bl(n)}function bbe(n){return Uc(n)==="[object Number]"&&Bl(n)}function Mbe(n){return Uc(n)==="[object Boolean]"&&Bl(n)}function iz(n){if(Up)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!JN)return!1;try{return JN.call(n),!0}catch{}return!1}function _be(n){if(!n||typeof n!="object"||!jN)return!1;try{return jN.call(n),!0}catch{}return!1}var Tbe=Object.prototype.hasOwnProperty||function(n){return n in this};function Ng(n,t){return Tbe.call(n,t)}function Uc(n){return Cbe.call(n)}function Nbe(n){if(n.name)return n.name;var t=fbe.call(Bbe.call(n),/^function\s*([\w$]+)/);return t?t[1]:null}function az(n,t){if(n.indexOf)return n.indexOf(t);for(var o=0,a=n.length;ot.maxStringLength){var o=n.length-t.maxStringLength,a="... "+o+" more character"+(o>1?"s":"");return oz(XN.call(n,0,t.maxStringLength),t)+a}var e=mbe[t.quoteStyle||"single"];e.lastIndex=0;var i=Lc.call(Lc.call(n,e,"\\$1"),/[\x00-\x1f]/g,Lbe);return rz(i,"single",t)}function Lbe(n){var t=n.charCodeAt(0),o={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return o?"\\"+o:"\\x"+(t<16?"0":"")+Qbe.call(t.toString(16))}function oC(n){return"Object("+n+")"}function YN(n){return n+" { ? }"}function $8(n,t,o,a){var e=a?VN(o,a):Ds.call(o,", ");return n+" ("+t+") {"+e+"}"}function Ube(n){for(var t=0;t=0)return!1;return!0}function Hbe(n,t){var o;if(n.indent===" ")o=" ";else if(typeof n.indent=="number"&&n.indent>0)o=Ds.call(Array(n.indent+1)," ");else return null;return{base:o,prev:Ds.call(Array(t+1),o)}}function VN(n,t){if(n.length===0)return"";var o=` `+t.prev+t.base;return o+Ds.call(n,","+o)+` -`+t.prev}function Qm(n,t){var o=zN(n),a=[];if(o){a.length=n.length;for(var e=0;e{"use strict";var Gbe=cC(),Fbe=kc(),Sm=function(n,t,o){for(var a=n,e;(e=a.next)!=null;a=e)if(e.key===t)return a.next=e.next,o||(e.next=n.next,n.next=e),e},Lbe=function(n,t){if(n){var o=Sm(n,t);return o&&o.value}},Ube=function(n,t,o){var a=Sm(n,t);a?a.value=o:n.next={key:t,next:n.next,value:o}},Hbe=function(n,t){return n?!!Sm(n,t):!1},Kbe=function(n,t){if(n)return Sm(n,t,!0)};az.exports=function(){var t,o={assert:function(a){if(!o.has(a))throw new Fbe("Side channel does not contain "+Gbe(a))},delete:function(a){var e=Kbe(t,a);return e&&t&&!t.next&&(t=void 0),!!e},get:function(a){return Lbe(t,a)},has:function(a){return Hbe(t,a)},set:function(a,e){t||(t={next:void 0}),Ube(t,a,e)}};return o}});var $N=ee((GdA,gz)=>{"use strict";var nz=xu(),sz=b0(),xbe=sz([nz("%String.prototype.indexOf%")]);gz.exports=function(t,o){var a=nz(t,!!o);return typeof a=="function"&&xbe(t,".prototype.")>-1?sz([a]):a}});var eR=ee((FdA,Iz)=>{"use strict";var Ybe=xu(),IC=$N(),jbe=cC(),Jbe=kc(),cz=Ybe("%Map%",!0),qbe=IC("Map.prototype.get",!0),zbe=IC("Map.prototype.set",!0),Vbe=IC("Map.prototype.has",!0),Wbe=IC("Map.prototype.delete",!0),Zbe=IC("Map.prototype.size",!0);Iz.exports=!!cz&&function(){var t,o={assert:function(a){if(!o.has(a))throw new Jbe("Side channel does not contain "+jbe(a))},delete:function(a){if(t){var e=Wbe(t,a);return Zbe(t)===0&&(t=void 0),e}return!1},get:function(a){if(t)return qbe(t,a)},has:function(a){return t?Vbe(t,a):!1},set:function(a,e){t||(t=new cz),zbe(t,a,e)}};return o}});var dz=ee((LdA,lz)=>{"use strict";var Xbe=xu(),Dm=$N(),$be=cC(),wm=eR(),eMe=kc(),Hp=Xbe("%WeakMap%",!0),AMe=Dm("WeakMap.prototype.get",!0),tMe=Dm("WeakMap.prototype.set",!0),rMe=Dm("WeakMap.prototype.has",!0),iMe=Dm("WeakMap.prototype.delete",!0);lz.exports=Hp?function(){var t,o,a={assert:function(e){if(!a.has(e))throw new eMe("Side channel does not contain "+$be(e))},delete:function(e){if(Hp&&e&&(typeof e=="object"||typeof e=="function")){if(t)return iMe(t,e)}else if(wm&&o)return o.delete(e);return!1},get:function(e){return Hp&&e&&(typeof e=="object"||typeof e=="function")&&t?AMe(t,e):o&&o.get(e)},has:function(e){return Hp&&e&&(typeof e=="object"||typeof e=="function")&&t?rMe(t,e):!!o&&o.has(e)},set:function(e,i){Hp&&e&&(typeof e=="object"||typeof e=="function")?(t||(t=new Hp),tMe(t,e,i)):wm&&(o||(o=wm()),o.set(e,i))}};return a}:wm});var AR=ee((UdA,pz)=>{"use strict";var aMe=kc(),oMe=cC(),nMe=oz(),sMe=eR(),gMe=dz(),cMe=gMe||sMe||nMe;pz.exports=function(){var t,o={assert:function(a){if(!o.has(a)){var e=a&&Object(a)===a?"the given object key":oMe(a);throw new aMe("Side channel does not contain "+e)}},delete:function(a){return!!t&&t.delete(a)},get:function(a){return t&&t.get(a)},has:function(a){return!!t&&t.has(a)},set:function(a,e){t||(t=cMe()),t.set(a,e)}};return o}});var Om=ee((HdA,hz)=>{"use strict";var IMe=String.prototype.replace,lMe=/%20/g,tR={RFC1738:"RFC1738",RFC3986:"RFC3986"};hz.exports={default:tR.RFC3986,formatters:{RFC1738:function(n){return IMe.call(n,lMe,"+")},RFC3986:function(n){return String(n)}},RFC1738:tR.RFC1738,RFC3986:tR.RFC3986}});var oR=ee((KdA,Cz)=>{"use strict";var dMe=Om(),uz=AR(),Ez=m0(),rR=Object.prototype.hasOwnProperty,fl=Array.isArray,Mm=uz(),Ql=function(t,o){return Mm.set(t,o),t},yl=function(t){return Mm.has(t)},lC=function(t){return Mm.get(t)},iR=function(t,o){Mm.set(t,o)},Os=(function(){for(var n=[],t=0;t<256;++t)n[n.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return n})(),pMe=function(t){for(;t.length>1;){var o=t.pop(),a=o.obj[o.prop];if(fl(a)){for(var e=[],i=0;i=a.arrayLimit){if(a.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+a.arrayLimit+" element"+(a.arrayLimit===1?"":"s")+" allowed in an array.");return Ql(Kp(t.concat(o),a),e)}t[e]=o}else if(t&&typeof t=="object")if(yl(t)){var i=lC(t)+1;t[i]=o,iR(t,i)}else{if(a&&a.strictMerge)return[t,o];(a&&(a.plainObjects||a.allowPrototypes)||!rR.call(Object.prototype,o))&&(t[o]=!0)}else return[t,o];return t}if(!t||typeof t!="object"){if(yl(o)){for(var A=Object.keys(o),r=a&&a.plainObjects?{__proto__:null,0:t}:{0:t},s=0;sa.arrayLimit){if(a.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+a.arrayLimit+" element"+(a.arrayLimit===1?"":"s")+" allowed in an array.");return Ql(Kp(c,a),c.length-1)}return c}var I=t;if(fl(t)&&!fl(o)&&(I=Kp(t,a)),fl(t)&&fl(o)){if(o.forEach(function(d,B){if(rR.call(t,B)){var f=t[B];f&&typeof f=="object"&&d&&typeof d=="object"?t[B]=n(f,d,a):t[t.length]=d}else t[B]=d}),a&&typeof a.arrayLimit=="number"&&t.length>a.arrayLimit){if(a.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+a.arrayLimit+" element"+(a.arrayLimit===1?"":"s")+" allowed in an array.");return Ql(Kp(t,a),t.length-1)}return t}return Object.keys(o).reduce(function(d,B){var f=o[B];if(rR.call(d,B)?aR(d,B,n(d[B],f,a)):aR(d,B,f),yl(o)&&!yl(d)&&Ql(d,lC(o)),yl(d)){var Q=parseInt(B,10);String(Q)===B&&Q>=0&&Q>lC(d)&&iR(d,Q)}return d},I)},EMe=function(t,o){return Object.keys(o).reduce(function(a,e){return aR(a,e,o[e]),a},t)},uMe=function(n,t,o){var a=n.replace(/\+/g," ");if(o==="iso-8859-1")return a.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(a)}catch{return a}},bm=1024,CMe=function(t,o,a,e,i){if(t.length===0)return t;var A=t;if(typeof t=="symbol"?A=Symbol.prototype.toString.call(t):typeof t!="string"&&(A=String(t)),a==="iso-8859-1")return escape(A).replace(/%u[0-9a-f]{4}/gi,function(f){return"%26%23"+parseInt(f.slice(2),16)+"%3B"});for(var r="",s=0;s=bm?A.slice(s,s+bm):A;if(s+bm=55296&&c<=56319&&(g=g.slice(0,-1),s-=1)}for(var I=[],d=0;d=48&&B<=57||B>=65&&B<=90||B>=97&&B<=122||i===dMe.RFC1738&&(B===40||B===41)){I[I.length]=g.charAt(d);continue}if(B<128){I[I.length]=Os[B];continue}if(B<2048){I[I.length]=Os[192|B>>6]+Os[128|B&63];continue}if(B<55296||B>=57344){I[I.length]=Os[224|B>>12]+Os[128|B>>6&63]+Os[128|B&63];continue}d+=1,B=65536+((B&1023)<<10|g.charCodeAt(d)&1023),I[I.length]=Os[240|B>>18]+Os[128|B>>12&63]+Os[128|B>>6&63]+Os[128|B&63]}r+=I.join("")}return r},BMe=function(t){for(var o=[{obj:{o:t},prop:"o"}],a=uz(),e=0;ea){if(i)throw new RangeError("Array limit exceeded. Only "+a+" element"+(a===1?"":"s")+" allowed in an array.");return Ql(Kp(r,{plainObjects:e}),r.length-1)}return r},mMe=function(t,o){if(fl(t)){for(var a=[],e=0;e{"use strict";var fz=AR(),_m=oR(),dC=Om(),SMe=Object.prototype.hasOwnProperty,Qz={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,o){return t+"["+o+"]"},repeat:function(t){return t}},bs=Array.isArray,wMe=Array.prototype.push,yz=function(n,t){wMe.apply(n,bs(t)?t:[t])},DMe=Date.prototype.toISOString,Bz=dC.default,jr={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:_m.encode,encodeValuesOnly:!1,filter:void 0,format:Bz,formatter:dC.formatters[Bz],indices:!1,serializeDate:function(t){return DMe.call(t)},skipNulls:!1,strictNullHandling:!1},OMe=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},nR={},bMe=function n(t,o,a,e,i,A,r,s,g,c,I,d,B,f,Q,y,m,_){for(var T=t,R=_,L=0,U=!1;(R=R.get(nR))!==void 0&&!U;){var F=R.get(t);if(L+=1,typeof F<"u"){if(F===L)throw new RangeError("Cyclic object value");U=!0}typeof R.get(nR)>"u"&&(L=0)}if(typeof c=="function"?T=c(o,T):T instanceof Date?T=B(T):a==="comma"&&bs(T)&&(T=_m.maybeMap(T,function(oe){return oe instanceof Date?B(oe):oe})),T===null){if(A)return Q(g&&!y?g(o,jr.encoder,m,"key",f):o);T=""}if(OMe(T)||_m.isBuffer(T)){if(g){var z=y?o:g(o,jr.encoder,m,"key",f);return[Q(z)+"="+Q(g(T,jr.encoder,m,"value",f))]}return[Q(o)+"="+Q(String(T))]}var J=[];if(typeof T>"u")return J;var K;if(a==="comma"&&bs(T))y&&g&&(T=_m.maybeMap(T,function(oe){return oe==null?oe:g(oe)})),K=[{value:T.length>0?T.join(",")||null:void 0}];else if(bs(c))K=c;else{var G=Object.keys(T);K=I?G.sort(I):G}var V=s?String(o).replace(/\./g,"%2E"):String(o),H=e&&bs(T)&&T.length===1?V+"[]":V;if(i&&bs(T)&&T.length===0)return H+"[]";for(var N=0;N"u"?t.encodeDotInKeys===!0?!0:jr.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:jr.addQueryPrefix,allowDots:r,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:jr.allowEmptyArrays,arrayFormat:A,charset:o,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:jr.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?jr.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:jr.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:jr.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:jr.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:jr.encodeValuesOnly,filter:i,format:a,formatter:e,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:jr.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:jr.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:jr.strictNullHandling}};mz.exports=function(n,t){var o=n,a=MMe(t),e,i;typeof a.filter=="function"?(i=a.filter,o=i("",o)):bs(a.filter)&&(i=a.filter,e=i);var A=[];if(typeof o!="object"||o===null)return"";var r=Qz[a.arrayFormat],s=r==="comma"&&a.commaRoundTrip;e||(e=Object.keys(o)),a.sort&&e.sort(a.sort);for(var g=fz(),c=0;c"u"||I===null)){var d=o[I];a.skipNulls&&d===null||yz(A,bMe(d,I,r,s,a.allowEmptyArrays,a.strictNullHandling,a.skipNulls,a.encodeDotInKeys,a.encode?a.encoder:null,a.filter,a.sort,a.allowDots,a.serializeDate,a.format,a.formatter,a.encodeValuesOnly,a.charset,g))}}var B=A.join(a.delimiter),f=a.addQueryPrefix===!0?"?":"";return a.charsetSentinel&&(a.charset==="iso-8859-1"?f+="utf8=%26%2310003%3B"+a.delimiter:f+="utf8=%E2%9C%93"+a.delimiter),B.length>0?f+B:""}});var Oz=ee((YdA,Dz)=>{"use strict";var Ms=oR(),Tm=Object.prototype.hasOwnProperty,sR=Array.isArray,hr={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Ms.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},_Me=function(n){return n.replace(/&#(\d+);/g,function(t,o){return String.fromCharCode(parseInt(o,10))})},wz=function(n,t,o,a){if(n&&typeof n=="string"&&t.comma&&n.indexOf(",")>-1){if(a&&t.throwOnLimitExceeded)for(var e=0,i=n.indexOf(",");i>-1;){if(e+=1,e>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(t.arrayLimit===1?"":"s")+" allowed in an array.");i=n.indexOf(",",i+1)}return n.split(",")}if(t.throwOnLimitExceeded&&o>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(t.arrayLimit===1?"":"s")+" allowed in an array.");return n},TMe="utf8=%26%2310003%3B",NMe="utf8=%E2%9C%93",RMe=function(t,o){var a={__proto__:null},e=o.ignoreQueryPrefix?t.replace(/^\?/,""):t;e=e.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=o.parameterLimit===1/0?void 0:o.parameterLimit,A=e.split(o.delimiter,o.throwOnLimitExceeded&&typeof i<"u"?i+1:i);if(o.throwOnLimitExceeded&&typeof i<"u"&&A.length>i)throw new RangeError("Parameter limit exceeded. Only "+i+" parameter"+(i===1?"":"s")+" allowed.");var r=-1,s,g=o.charset;if(o.charsetSentinel)for(s=0;s-1&&(f=sR(f)?[f]:f),o.comma&&sR(f)&&f.length>o.arrayLimit&&(f=Ms.combine([],f,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded)),B!==null){var Q=Tm.call(a,B);Q&&(o.duplicates==="combine"||c.indexOf("[]=")>-1)?a[B]=Ms.combine(a[B],f,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded):(!Q||o.duplicates==="last")&&(a[B]=f)}}return a},kMe=function(n,t,o,a){var e=0;if(n.length>0&&n[n.length-1]==="[]"){var i=n.slice(0,-1).join("");e=Array.isArray(t)&&t[i]?t[i].length:0}for(var A=a?t:wz(t,o,e),r=n.length-1;r>=0;--r){var s,g=n[r];if(g==="[]"&&o.parseArrays)Ms.isOverflow(A)?s=A:s=o.allowEmptyArrays&&(A===""||o.strictNullHandling&&A===null)?[]:Ms.combine([],A,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded);else{s=o.plainObjects?{__proto__:null}:{};var c=g.charAt(0)==="["&&g.charAt(g.length-1)==="]"?g.slice(1,-1):g,I=o.decodeDotInKeys?c.replace(/%2E/g,"."):c,d=parseInt(I,10),B=!isNaN(d)&&g!==I&&String(d)===I&&d>=0&&o.parseArrays;if(!o.parseArrays&&I==="")s={0:A};else if(B&&d=0?a.slice(0,i):a;if(A){if(!o.plainObjects&&Tm.call(Object.prototype,A)&&!o.allowPrototypes)return;e[e.length]=A}for(var r=a.length,s=i,g=0;s>=0&&g=0){if(o.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+o.depth+" and strictDepth is true");e[e.length]="["+a.slice(s)+"]"}return e},PMe=function(t,o,a,e){if(t){var i=vMe(t,a);if(i)return kMe(i,o,a,e)}},GMe=function(t){if(!t)return hr;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof t.throwOnLimitExceeded<"u"&&typeof t.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var o=typeof t.charset>"u"?hr.charset:t.charset,a=typeof t.duplicates>"u"?hr.duplicates:t.duplicates;if(a!=="combine"&&a!=="first"&&a!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var e=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:hr.allowDots:!!t.allowDots;return{allowDots:e,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:hr.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:hr.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:hr.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:hr.arrayLimit,charset:o,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:hr.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:hr.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:hr.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:hr.decoder,delimiter:typeof t.delimiter=="string"||Ms.isRegExp(t.delimiter)?t.delimiter:hr.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:hr.depth,duplicates:a,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:hr.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:hr.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:hr.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:hr.strictDepth,strictMerge:typeof t.strictMerge=="boolean"?!!t.strictMerge:hr.strictMerge,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:hr.strictNullHandling,throwOnLimitExceeded:typeof t.throwOnLimitExceeded=="boolean"?t.throwOnLimitExceeded:!1}};Dz.exports=function(n,t){var o=GMe(t);if(n===""||n===null||typeof n>"u")return o.plainObjects?{__proto__:null}:{};for(var a=typeof n=="string"?RMe(n,o):n,e=o.plainObjects?{__proto__:null}:{},i=Object.keys(a),A=0;A{"use strict";var FMe=Sz(),LMe=Oz(),UMe=Om();bz.exports={formats:UMe,parse:LMe,stringify:FMe}});var Tz=ee((JdA,_z)=>{function HMe(n){return n}_z.exports=HMe});var pV=ee((pC,Yp)=>{var KMe=200,xMe="Expected a function",fR="__lodash_hash_undefined__",Fm=1,jp=2,Hz=1/0,Kz=9007199254740991,Nm="[object Arguments]",IR="[object Array]",xz="[object Boolean]",Yz="[object Date]",jz="[object Error]",Jz="[object Function]",YMe="[object GeneratorFunction]",Rm="[object Map]",qz="[object Number]",xp="[object Object]",Nz="[object Promise]",zz="[object RegExp]",km="[object Set]",Vz="[object String]",Wz="[object Symbol]",lR="[object WeakMap]",Zz="[object ArrayBuffer]",vm="[object DataView]",jMe="[object Float32Array]",JMe="[object Float64Array]",qMe="[object Int8Array]",zMe="[object Int16Array]",VMe="[object Int32Array]",WMe="[object Uint8Array]",ZMe="[object Uint8ClampedArray]",XMe="[object Uint16Array]",$Me="[object Uint32Array]",e_e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,A_e=/^\w*$/,t_e=/^\./,r_e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i_e=/[\\^$.*+?()[\]{}|]/g,a_e=/\\(\\)?/g,o_e=/^\[object .+?Constructor\]$/,n_e=/^(?:0|[1-9]\d*)$/,qt={};qt[jMe]=qt[JMe]=qt[qMe]=qt[zMe]=qt[VMe]=qt[WMe]=qt[ZMe]=qt[XMe]=qt[$Me]=!0;qt[Nm]=qt[IR]=qt[Zz]=qt[xz]=qt[vm]=qt[Yz]=qt[jz]=qt[Jz]=qt[Rm]=qt[qz]=qt[xp]=qt[zz]=qt[km]=qt[Vz]=qt[lR]=!1;var Xz=typeof global=="object"&&global&&global.Object===Object&&global,s_e=typeof self=="object"&&self&&self.Object===Object&&self,Kc=Xz||s_e||Function("return this")(),$z=typeof pC=="object"&&pC&&!pC.nodeType&&pC,Rz=$z&&typeof Yp=="object"&&Yp&&!Yp.nodeType&&Yp,g_e=Rz&&Rz.exports===$z,kz=g_e&&Xz.process,vz=(function(){try{return kz&&kz.binding("util")}catch{}})(),Pz=vz&&vz.isTypedArray;function eV(n,t){for(var o=-1,a=t.length,e=n.length;++o-1}function F_e(n,t){var o=this.__data__,a=Um(o,n);return a<0?o.push([n,t]):o[a][1]=t,this}Rg.prototype.clear=k_e;Rg.prototype.delete=v_e;Rg.prototype.get=P_e;Rg.prototype.has=G_e;Rg.prototype.set=F_e;function kg(n){var t=-1,o=n?n.length:0;for(this.clear();++tr))return!1;var g=i.get(n);if(g&&i.get(t))return g==t;var c=-1,I=!0,d=e&Fm?new Gm:void 0;for(i.set(n,t),i.set(t,n);++c-1&&n%1==0&&n-1&&n%1==0&&n<=Kz}function uC(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function Ym(n){return!!n&&typeof n=="object"}function DR(n){return typeof n=="symbol"||Ym(n)&&Jp.call(n)==Wz}var STe=Pz?d_e(Pz):rTe;function wTe(n){return n==null?"":ITe(n)}function DTe(n,t,o){var a=n==null?void 0:rV(n,t);return a===void 0?o:a}function OTe(n,t){return n!=null&&CTe(n,t,$_e)}function BR(n){return SR(n)?tV(n):aTe(n)}function bTe(n){return SR(n)?tV(n,!0):oTe(n)}function MTe(n,t){return n==null?{}:gTe(n,pTe(n),iTe(t))}function _Te(n){return n}function TTe(n){return Km(n)?I_e(xm(n)):cTe(n)}function dV(){return[]}Yp.exports=MTe});var xV=ee((CC,zp)=>{var NTe=200,SV="__lodash_hash_undefined__",RTe=800,kTe=16,wV=9007199254740991,DV="[object Arguments]",vTe="[object Array]",PTe="[object AsyncFunction]",GTe="[object Boolean]",FTe="[object Date]",LTe="[object Error]",OV="[object Function]",UTe="[object GeneratorFunction]",HTe="[object Map]",KTe="[object Number]",xTe="[object Null]",bV="[object Object]",YTe="[object Proxy]",jTe="[object RegExp]",JTe="[object Set]",qTe="[object String]",zTe="[object Undefined]",VTe="[object WeakMap]",WTe="[object ArrayBuffer]",ZTe="[object DataView]",XTe="[object Float32Array]",$Te="[object Float64Array]",e0e="[object Int8Array]",A0e="[object Int16Array]",t0e="[object Int32Array]",r0e="[object Uint8Array]",i0e="[object Uint8ClampedArray]",a0e="[object Uint16Array]",o0e="[object Uint32Array]",n0e=/[\\^$.*+?()[\]{}|]/g,s0e=/^\[object .+?Constructor\]$/,g0e=/^(?:0|[1-9]\d*)$/,zt={};zt[XTe]=zt[$Te]=zt[e0e]=zt[A0e]=zt[t0e]=zt[r0e]=zt[i0e]=zt[a0e]=zt[o0e]=!0;zt[DV]=zt[vTe]=zt[WTe]=zt[GTe]=zt[ZTe]=zt[FTe]=zt[LTe]=zt[OV]=zt[HTe]=zt[KTe]=zt[bV]=zt[jTe]=zt[JTe]=zt[qTe]=zt[VTe]=!1;var MV=typeof global=="object"&&global&&global.Object===Object&&global,c0e=typeof self=="object"&&self&&self.Object===Object&&self,QC=MV||c0e||Function("return this")(),_V=typeof CC=="object"&&CC&&!CC.nodeType&&CC,BC=_V&&typeof zp=="object"&&zp&&!zp.nodeType&&zp,TV=BC&&BC.exports===_V,OR=TV&&MV.process,hV=(function(){try{var n=BC&&BC.require&&BC.require("util").types;return n||OR&&OR.binding&&OR.binding("util")}catch{}})(),EV=hV&&hV.isTypedArray;function I0e(n,t,o){switch(o.length){case 0:return n.call(t);case 1:return n.call(t,o[0]);case 2:return n.call(t,o[0],o[1]);case 3:return n.call(t,o[0],o[1],o[2])}return n.apply(t,o)}function l0e(n,t){for(var o=-1,a=Array(n);++o-1}function k0e(n,t){var o=this.__data__,a=Vm(o,n);return a<0?(++this.size,o.push([n,t])):o[a][1]=t,this}Pg.prototype.clear=_0e;Pg.prototype.delete=T0e;Pg.prototype.get=N0e;Pg.prototype.has=R0e;Pg.prototype.set=k0e;function Vp(n){var t=-1,o=n==null?0:n.length;for(this.clear();++t1?o[e-1]:void 0,A=e>2?o[2]:void 0;for(i=n.length>3&&typeof i=="function"?(e--,i):void 0,A&&gNe(o[0],o[1],A)&&(i=e<3?void 0:i,e=1),t=Object(t);++a-1&&n%1==0&&n0){if(++t>=RTe)return arguments[0]}else t=0;return n.apply(void 0,arguments)}}function uNe(n){if(n!=null){try{return zm.call(n)}catch{}try{return n+""}catch{}}return""}function Xm(n,t){return n===t||n!==n&&t!==t}var TR=mV((function(){return arguments})())?mV:function(n){return yC(n)&&vg.call(n,"callee")&&!f0e.call(n,"callee")},NR=Array.isArray;function vR(n){return n!=null&&LV(n.length)&&!PR(n)}function CNe(n){return yC(n)&&vR(n)}var FV=y0e||mNe;function PR(n){if(!Ol(n))return!1;var t=Wm(n);return t==OV||t==UTe||t==PTe||t==YTe}function LV(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=wV}function Ol(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}function yC(n){return n!=null&&typeof n=="object"}function BNe(n){if(!yC(n)||Wm(n)!=bV)return!1;var t=RV(n);if(t===null)return!0;var o=vg.call(t,"constructor")&&t.constructor;return typeof o=="function"&&o instanceof o&&zm.call(o)==C0e}var UV=EV?d0e(EV):V0e;function fNe(n){return iNe(n,HV(n))}function HV(n){return vR(n)?j0e(n,!0):W0e(n)}var QNe=aNe(function(n,t,o){vV(n,t,o)});function yNe(n){return function(){return n}}function KV(n){return n}function mNe(){return!1}zp.exports=QNe});var Gg=ee((qdA,JV)=>{"use strict";var YV=["nodebuffer","arraybuffer","fragments"],jV=typeof Blob<"u";jV&&YV.push("blob");JV.exports={BINARY_TYPES:YV,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:jV,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var mC=ee((zdA,$m)=>{"use strict";var{EMPTY_BUFFER:SNe}=Gg(),GR=Buffer[Symbol.species];function wNe(n,t){if(n.length===0)return SNe;if(n.length===1)return n[0];let o=Buffer.allocUnsafe(t),a=0;for(let e=0;e{"use strict";var VV=Symbol("kDone"),LR=Symbol("kRun"),UR=class{constructor(t){this[VV]=()=>{this.pending--,this[LR]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[LR]()}[LR](){if(this.pending!==this.concurrency&&this.jobs.length){let t=this.jobs.shift();this.pending++,t(this[VV])}}};WV.exports=UR});var $p=ee((WdA,AW)=>{"use strict";var SC=$e("zlib"),XV=mC(),ONe=ZV(),{kStatusCode:$V}=Gg(),bNe=Buffer[Symbol.species],MNe=Buffer.from([0,0,255,255]),AS=Symbol("permessage-deflate"),Fg=Symbol("total-length"),Zp=Symbol("callback"),xc=Symbol("buffers"),Xp=Symbol("error"),eS,HR=class{constructor(t){if(this._options=t||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!eS){let o=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;eS=new ONe(o)}}static get extensionName(){return"permessage-deflate"}offer(){let t={};return this._options.serverNoContextTakeover&&(t.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(t.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(t.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(t.client_max_window_bits=!0),t}accept(t){return t=this.normalizeParams(t),this.params=this._isServer?this.acceptAsServer(t):this.acceptAsClient(t),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let t=this._deflate[Zp];this._deflate.close(),this._deflate=null,t&&t(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(t){let o=this._options,a=t.find(e=>!(o.serverNoContextTakeover===!1&&e.server_no_context_takeover||e.server_max_window_bits&&(o.serverMaxWindowBits===!1||typeof o.serverMaxWindowBits=="number"&&o.serverMaxWindowBits>e.server_max_window_bits)||typeof o.clientMaxWindowBits=="number"&&(typeof e.client_max_window_bits=="number"?o.clientMaxWindowBits>e.client_max_window_bits:!e.client_max_window_bits)));if(!a)throw new Error("None of the extension offers can be accepted");return o.serverNoContextTakeover&&(a.server_no_context_takeover=!0),o.clientNoContextTakeover&&(a.client_no_context_takeover=!0),typeof o.serverMaxWindowBits=="number"&&(a.server_max_window_bits=o.serverMaxWindowBits),typeof o.clientMaxWindowBits=="number"?a.client_max_window_bits=o.clientMaxWindowBits:(a.client_max_window_bits===!0||o.clientMaxWindowBits===!1)&&delete a.client_max_window_bits,a}acceptAsClient(t){let o=t[0];if(this._options.clientNoContextTakeover===!1&&o.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!o.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(o.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&o.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return o}normalizeParams(t){return t.forEach(o=>{Object.keys(o).forEach(a=>{let e=o[a];if(e.length>1)throw new Error(`Parameter "${a}" must have only a single value`);if(e=e[0],a==="client_max_window_bits"){if(e!==!0){let i=+e;if(!Number.isInteger(i)||i<8||i>15)throw new TypeError(`Invalid value for parameter "${a}": ${e}`);e=i}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${a}": ${e}`)}else if(a==="server_max_window_bits"){let i=+e;if(!Number.isInteger(i)||i<8||i>15)throw new TypeError(`Invalid value for parameter "${a}": ${e}`);e=i}else if(a==="client_no_context_takeover"||a==="server_no_context_takeover"){if(e!==!0)throw new TypeError(`Invalid value for parameter "${a}": ${e}`)}else throw new Error(`Unknown parameter "${a}"`);o[a]=e})}),t}decompress(t,o,a){eS.add(e=>{this._decompress(t,o,(i,A)=>{e(),a(i,A)})})}compress(t,o,a){eS.add(e=>{this._compress(t,o,(i,A)=>{e(),a(i,A)})})}_decompress(t,o,a){let e=this._isServer?"client":"server";if(!this._inflate){let i=`${e}_max_window_bits`,A=typeof this.params[i]!="number"?SC.Z_DEFAULT_WINDOWBITS:this.params[i];this._inflate=SC.createInflateRaw({...this._options.zlibInflateOptions,windowBits:A}),this._inflate[AS]=this,this._inflate[Fg]=0,this._inflate[xc]=[],this._inflate.on("error",TNe),this._inflate.on("data",eW)}this._inflate[Zp]=a,this._inflate.write(t),o&&this._inflate.write(MNe),this._inflate.flush(()=>{let i=this._inflate[Xp];if(i){this._inflate.close(),this._inflate=null,a(i);return}let A=XV.concat(this._inflate[xc],this._inflate[Fg]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[Fg]=0,this._inflate[xc]=[],o&&this.params[`${e}_no_context_takeover`]&&this._inflate.reset()),a(null,A)})}_compress(t,o,a){let e=this._isServer?"server":"client";if(!this._deflate){let i=`${e}_max_window_bits`,A=typeof this.params[i]!="number"?SC.Z_DEFAULT_WINDOWBITS:this.params[i];this._deflate=SC.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:A}),this._deflate[Fg]=0,this._deflate[xc]=[],this._deflate.on("data",_Ne)}this._deflate[Zp]=a,this._deflate.write(t),this._deflate.flush(SC.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let i=XV.concat(this._deflate[xc],this._deflate[Fg]);o&&(i=new bNe(i.buffer,i.byteOffset,i.length-4)),this._deflate[Zp]=null,this._deflate[Fg]=0,this._deflate[xc]=[],o&&this.params[`${e}_no_context_takeover`]&&this._deflate.reset(),a(null,i)})}};AW.exports=HR;function _Ne(n){this[xc].push(n),this[Fg]+=n.length}function eW(n){if(this[Fg]+=n.length,this[AS]._maxPayload<1||this[Fg]<=this[AS]._maxPayload){this[xc].push(n);return}this[Xp]=new RangeError("Max payload size exceeded"),this[Xp].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Xp][$V]=1009,this.removeListener("data",eW),this.reset()}function TNe(n){if(this[AS]._inflate=null,this[Xp]){this[Zp](this[Xp]);return}n[$V]=1007,this[Zp](n)}});var eh=ee((ZdA,tS)=>{"use strict";var{isUtf8:tW}=$e("buffer"),{hasBlob:NNe}=Gg(),RNe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function kNe(n){return n>=1e3&&n<=1014&&n!==1004&&n!==1005&&n!==1006||n>=3e3&&n<=4999}function KR(n){let t=n.length,o=0;for(;o=t||(n[o+1]&192)!==128||(n[o+2]&192)!==128||n[o]===224&&(n[o+1]&224)===128||n[o]===237&&(n[o+1]&224)===160)return!1;o+=3}else if((n[o]&248)===240){if(o+3>=t||(n[o+1]&192)!==128||(n[o+2]&192)!==128||(n[o+3]&192)!==128||n[o]===240&&(n[o+1]&240)===128||n[o]===244&&n[o+1]>143||n[o]>244)return!1;o+=4}else return!1;return!0}function vNe(n){return NNe&&typeof n=="object"&&typeof n.arrayBuffer=="function"&&typeof n.type=="string"&&typeof n.stream=="function"&&(n[Symbol.toStringTag]==="Blob"||n[Symbol.toStringTag]==="File")}tS.exports={isBlob:vNe,isValidStatusCode:kNe,isValidUTF8:KR,tokenChars:RNe};if(tW)tS.exports.isValidUTF8=function(n){return n.length<24?KR(n):tW(n)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let n=$e("utf-8-validate");tS.exports.isValidUTF8=function(t){return t.length<32?KR(t):n(t)}}catch{}});var qR=ee((XdA,gW)=>{"use strict";var{Writable:PNe}=$e("stream"),rW=$p(),{BINARY_TYPES:GNe,EMPTY_BUFFER:iW,kStatusCode:FNe,kWebSocket:LNe}=Gg(),{concat:xR,toArrayBuffer:UNe,unmask:HNe}=mC(),{isValidStatusCode:KNe,isValidUTF8:aW}=eh(),rS=Buffer[Symbol.species],qo=0,oW=1,nW=2,sW=3,YR=4,jR=5,iS=6,JR=class extends PNe{constructor(t={}){super(),this._allowSynchronousEvents=t.allowSynchronousEvents!==void 0?t.allowSynchronousEvents:!0,this._binaryType=t.binaryType||GNe[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxBufferedChunks=t.maxBufferedChunks|0,this._maxFragments=t.maxFragments|0,this._maxPayload=t.maxPayload|0,this._skipUTF8Validation=!!t.skipUTF8Validation,this[LNe]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._numFragments=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=qo}_write(t,o,a){if(this._opcode===8&&this._state==qo)return a();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){a(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=t.length,this._buffers.push(t),this.startLoop(a)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t=a.length?o.set(this._buffers.shift(),e):(o.set(new Uint8Array(a.buffer,a.byteOffset,t),e),this._buffers[0]=new rS(a.buffer,a.byteOffset+t,a.length-t)),t-=a.length}while(t>0);return o}startLoop(t){this._loop=!0;do switch(this._state){case qo:this.getInfo(t);break;case oW:this.getPayloadLength16(t);break;case nW:this.getPayloadLength64(t);break;case sW:this.getMask();break;case YR:this.getData(t);break;case jR:case iS:this._loop=!1;return}while(this._loop);this._errored||t()}getInfo(t){if(this._bufferedBytes<2){this._loop=!1;return}let o=this.consume(2);if((o[0]&48)!==0){let e=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");t(e);return}let a=(o[0]&64)===64;if(a&&!this._extensions[rW.extensionName]){let e=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(e);return}if(this._fin=(o[0]&128)===128,this._opcode=o[0]&15,this._payloadLength=o[1]&127,this._opcode===0){if(a){let e=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(e);return}if(!this._fragmented){let e=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");t(e);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let e=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(e);return}this._compressed=a}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let e=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");t(e);return}if(a){let e=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(e);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let e=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");t(e);return}}else{let e=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(e);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(o[1]&128)===128,this._isServer){if(!this._masked){let e=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");t(e);return}}else if(this._masked){let e=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");t(e);return}this._payloadLength===126?this._state=oW:this._payloadLength===127?this._state=nW:this.haveLength(t)}getPayloadLength16(t){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(t)}getPayloadLength64(t){if(this._bufferedBytes<8){this._loop=!1;return}let o=this.consume(8),a=o.readUInt32BE(0);if(a>Math.pow(2,21)-1){let e=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");t(e);return}this._payloadLength=a*Math.pow(2,32)+o.readUInt32BE(4),this.haveLength(t)}haveLength(t){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(o);return}this._masked?this._state=sW:this._state=YR}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=YR}getData(t){let o=iW;if(this._payloadLength){if(this._bufferedBytes7){this.controlMessage(o,t);return}if(this._maxFragments>0&&++this._numFragments>this._maxFragments){let a=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");t(a);return}if(this._compressed){this._state=jR,this.decompress(o,t);return}o.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(o)),this.dataMessage(t)}decompress(t,o){this._extensions[rW.extensionName].decompress(t,this._fin,(e,i)=>{if(e)return o(e);if(i.length){if(this._messageLength+=i.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let A=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");o(A);return}this._fragments.push(i)}this.dataMessage(o),this._state===qo&&this.startLoop(o)})}dataMessage(t){if(!this._fin){this._state=qo;return}let o=this._messageLength,a=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._numFragments=0,this._fragments=[],this._opcode===2){let e;this._binaryType==="nodebuffer"?e=xR(a,o):this._binaryType==="arraybuffer"?e=UNe(xR(a,o)):this._binaryType==="blob"?e=new Blob(a):e=a,this._allowSynchronousEvents?(this.emit("message",e,!0),this._state=qo):(this._state=iS,setImmediate(()=>{this.emit("message",e,!0),this._state=qo,this.startLoop(t)}))}else{let e=xR(a,o);if(!this._skipUTF8Validation&&!aW(e)){let i=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(i);return}this._state===jR||this._allowSynchronousEvents?(this.emit("message",e,!1),this._state=qo):(this._state=iS,setImmediate(()=>{this.emit("message",e,!1),this._state=qo,this.startLoop(t)}))}}controlMessage(t,o){if(this._opcode===8){if(t.length===0)this._loop=!1,this.emit("conclude",1005,iW),this.end();else{let a=t.readUInt16BE(0);if(!KNe(a)){let i=this.createError(RangeError,`invalid status code ${a}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");o(i);return}let e=new rS(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!aW(e)){let i=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");o(i);return}this._loop=!1,this.emit("conclude",a,e),this.end()}this._state=qo;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",t),this._state=qo):(this._state=iS,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",t),this._state=qo,this.startLoop(o)}))}createError(t,o,a,e,i){this._loop=!1,this._errored=!0;let A=new t(a?`Invalid WebSocket frame: ${o}`:o);return Error.captureStackTrace(A,this.createError),A.code=i,A[FNe]=e,A}};gW.exports=JR});var WR=ee((epA,lW)=>{"use strict";var{Duplex:$dA}=$e("stream"),{randomFillSync:xNe}=$e("crypto"),{types:{isUint8Array:YNe}}=$e("util"),cW=$p(),{EMPTY_BUFFER:jNe,kWebSocket:JNe,NOOP:qNe}=Gg(),{isBlob:Ah,isValidStatusCode:zNe}=eh(),{mask:IW,toBuffer:bl}=mC(),zo=Symbol("kByteLength"),VNe=Buffer.alloc(4),aS=8*1024,Ml,th=aS,vn=0,WNe=1,ZNe=2,zR=class n{constructor(t,o,a){this._extensions=o||{},a&&(this._generateMask=a,this._maskBuffer=Buffer.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=vn,this.onerror=qNe,this[JNe]=void 0}static frame(t,o){let a,e=!1,i=2,A=!1;o.mask&&(a=o.maskBuffer||VNe,o.generateMask?o.generateMask(a):(th===aS&&(Ml===void 0&&(Ml=Buffer.alloc(aS)),xNe(Ml,0,aS),th=0),a[0]=Ml[th++],a[1]=Ml[th++],a[2]=Ml[th++],a[3]=Ml[th++]),A=(a[0]|a[1]|a[2]|a[3])===0,i=6);let r;typeof t=="string"?(!o.mask||A)&&o[zo]!==void 0?r=o[zo]:(t=Buffer.from(t),r=t.length):(r=t.length,e=o.mask&&o.readOnly&&!A);let s=r;r>=65536?(i+=8,s=127):r>125&&(i+=2,s=126);let g=Buffer.allocUnsafe(e?r+i:i);return g[0]=o.fin?o.opcode|128:o.opcode,o.rsv1&&(g[0]|=64),g[1]=s,s===126?g.writeUInt16BE(r,2):s===127&&(g[2]=g[3]=0,g.writeUIntBE(r,4,6)),o.mask?(g[1]|=128,g[i-4]=a[0],g[i-3]=a[1],g[i-2]=a[2],g[i-1]=a[3],A?[g,t]:e?(IW(t,a,g,i,r),[g]):(IW(t,a,t,0,r),[g,t])):[g,t]}close(t,o,a,e){let i;if(t===void 0)i=jNe;else{if(typeof t!="number"||!zNe(t))throw new TypeError("First argument must be a valid error code number");if(o===void 0||!o.length)i=Buffer.allocUnsafe(2),i.writeUInt16BE(t,0);else{let r=Buffer.byteLength(o);if(r>123)throw new RangeError("The message must not be greater than 123 bytes");if(i=Buffer.allocUnsafe(2+r),i.writeUInt16BE(t,0),typeof o=="string")i.write(o,2);else if(YNe(o))i.set(o,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let A={[zo]:i.length,fin:!0,generateMask:this._generateMask,mask:a,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==vn?this.enqueue([this.dispatch,i,!1,A,e]):this.sendFrame(n.frame(i,A),e)}ping(t,o,a){let e,i;if(typeof t=="string"?(e=Buffer.byteLength(t),i=!1):Ah(t)?(e=t.size,i=!1):(t=bl(t),e=t.length,i=bl.readOnly),e>125)throw new RangeError("The data size must not be greater than 125 bytes");let A={[zo]:e,fin:!0,generateMask:this._generateMask,mask:o,maskBuffer:this._maskBuffer,opcode:9,readOnly:i,rsv1:!1};Ah(t)?this._state!==vn?this.enqueue([this.getBlobData,t,!1,A,a]):this.getBlobData(t,!1,A,a):this._state!==vn?this.enqueue([this.dispatch,t,!1,A,a]):this.sendFrame(n.frame(t,A),a)}pong(t,o,a){let e,i;if(typeof t=="string"?(e=Buffer.byteLength(t),i=!1):Ah(t)?(e=t.size,i=!1):(t=bl(t),e=t.length,i=bl.readOnly),e>125)throw new RangeError("The data size must not be greater than 125 bytes");let A={[zo]:e,fin:!0,generateMask:this._generateMask,mask:o,maskBuffer:this._maskBuffer,opcode:10,readOnly:i,rsv1:!1};Ah(t)?this._state!==vn?this.enqueue([this.getBlobData,t,!1,A,a]):this.getBlobData(t,!1,A,a):this._state!==vn?this.enqueue([this.dispatch,t,!1,A,a]):this.sendFrame(n.frame(t,A),a)}send(t,o,a){let e=this._extensions[cW.extensionName],i=o.binary?2:1,A=o.compress,r,s;typeof t=="string"?(r=Buffer.byteLength(t),s=!1):Ah(t)?(r=t.size,s=!1):(t=bl(t),r=t.length,s=bl.readOnly),this._firstFragment?(this._firstFragment=!1,A&&e&&e.params[e._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(A=r>=e._threshold),this._compress=A):(A=!1,i=0),o.fin&&(this._firstFragment=!0);let g={[zo]:r,fin:o.fin,generateMask:this._generateMask,mask:o.mask,maskBuffer:this._maskBuffer,opcode:i,readOnly:s,rsv1:A};Ah(t)?this._state!==vn?this.enqueue([this.getBlobData,t,this._compress,g,a]):this.getBlobData(t,this._compress,g,a):this._state!==vn?this.enqueue([this.dispatch,t,this._compress,g,a]):this.dispatch(t,this._compress,g,a)}getBlobData(t,o,a,e){this._bufferedBytes+=a[zo],this._state=ZNe,t.arrayBuffer().then(i=>{if(this._socket.destroyed){let r=new Error("The socket was closed while the blob was being read");process.nextTick(VR,this,r,e);return}this._bufferedBytes-=a[zo];let A=bl(i);o?this.dispatch(A,o,a,e):(this._state=vn,this.sendFrame(n.frame(A,a),e),this.dequeue())}).catch(i=>{process.nextTick(XNe,this,i,e)})}dispatch(t,o,a,e){if(!o){this.sendFrame(n.frame(t,a),e);return}let i=this._extensions[cW.extensionName];this._bufferedBytes+=a[zo],this._state=WNe,i.compress(t,a.fin,(A,r)=>{if(this._socket.destroyed){let s=new Error("The socket was closed while data was being compressed");VR(this,s,e);return}this._bufferedBytes-=a[zo],this._state=vn,a.readOnly=!1,this.sendFrame(n.frame(r,a),e),this.dequeue()})}dequeue(){for(;this._state===vn&&this._queue.length;){let t=this._queue.shift();this._bufferedBytes-=t[3][zo],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][zo],this._queue.push(t)}sendFrame(t,o){t.length===2?(this._socket.cork(),this._socket.write(t[0]),this._socket.write(t[1],o),this._socket.uncork()):this._socket.write(t[0],o)}};lW.exports=zR;function VR(n,t,o){typeof o=="function"&&o(t);for(let a=0;a{"use strict";var{kForOnEventAttribute:wC,kListener:ZR}=Gg(),dW=Symbol("kCode"),pW=Symbol("kData"),hW=Symbol("kError"),EW=Symbol("kMessage"),uW=Symbol("kReason"),rh=Symbol("kTarget"),CW=Symbol("kType"),BW=Symbol("kWasClean"),Lg=class{constructor(t){this[rh]=null,this[CW]=t}get target(){return this[rh]}get type(){return this[CW]}};Object.defineProperty(Lg.prototype,"target",{enumerable:!0});Object.defineProperty(Lg.prototype,"type",{enumerable:!0});var _l=class extends Lg{constructor(t,o={}){super(t),this[dW]=o.code===void 0?0:o.code,this[uW]=o.reason===void 0?"":o.reason,this[BW]=o.wasClean===void 0?!1:o.wasClean}get code(){return this[dW]}get reason(){return this[uW]}get wasClean(){return this[BW]}};Object.defineProperty(_l.prototype,"code",{enumerable:!0});Object.defineProperty(_l.prototype,"reason",{enumerable:!0});Object.defineProperty(_l.prototype,"wasClean",{enumerable:!0});var ih=class extends Lg{constructor(t,o={}){super(t),this[hW]=o.error===void 0?null:o.error,this[EW]=o.message===void 0?"":o.message}get error(){return this[hW]}get message(){return this[EW]}};Object.defineProperty(ih.prototype,"error",{enumerable:!0});Object.defineProperty(ih.prototype,"message",{enumerable:!0});var DC=class extends Lg{constructor(t,o={}){super(t),this[pW]=o.data===void 0?null:o.data}get data(){return this[pW]}};Object.defineProperty(DC.prototype,"data",{enumerable:!0});var $Ne={addEventListener(n,t,o={}){for(let e of this.listeners(n))if(!o[wC]&&e[ZR]===t&&!e[wC])return;let a;if(n==="message")a=function(i,A){let r=new DC("message",{data:A?i:i.toString()});r[rh]=this,oS(t,this,r)};else if(n==="close")a=function(i,A){let r=new _l("close",{code:i,reason:A.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[rh]=this,oS(t,this,r)};else if(n==="error")a=function(i){let A=new ih("error",{error:i,message:i.message});A[rh]=this,oS(t,this,A)};else if(n==="open")a=function(){let i=new Lg("open");i[rh]=this,oS(t,this,i)};else return;a[wC]=!!o[wC],a[ZR]=t,o.once?this.once(n,a):this.on(n,a)},removeEventListener(n,t){for(let o of this.listeners(n))if(o[ZR]===t&&!o[wC]){this.removeListener(n,o);break}}};fW.exports={CloseEvent:_l,ErrorEvent:ih,Event:Lg,EventTarget:$Ne,MessageEvent:DC};function oS(n,t,o){typeof n=="object"&&n.handleEvent?n.handleEvent.call(n,o):n.call(t,o)}});var nS=ee((tpA,yW)=>{"use strict";var{tokenChars:OC}=eh();function Ts(n,t,o){n[t]===void 0?n[t]=[o]:n[t].push(o)}function eRe(n){let t=Object.create(null),o=Object.create(null),a=!1,e=!1,i=!1,A,r,s=-1,g=-1,c=-1,I=0;for(;I{let o=n[t];return Array.isArray(o)||(o=[o]),o.map(a=>[t].concat(Object.keys(a).map(e=>{let i=a[e];return Array.isArray(i)||(i=[i]),i.map(A=>A===!0?e:`${e}=${A}`).join("; ")})).join("; ")).join(", ")}).join(", ")}yW.exports={format:ARe,parse:eRe}});var IS=ee((apA,kW)=>{"use strict";var tRe=$e("events"),rRe=$e("https"),iRe=$e("http"),wW=$e("net"),aRe=$e("tls"),{randomBytes:oRe,createHash:nRe}=$e("crypto"),{Duplex:rpA,Readable:ipA}=$e("stream"),{URL:XR}=$e("url"),Yc=$p(),sRe=qR(),gRe=WR(),{isBlob:cRe}=eh(),{BINARY_TYPES:mW,CLOSE_TIMEOUT:IRe,EMPTY_BUFFER:sS,GUID:lRe,kForOnEventAttribute:$R,kListener:dRe,kStatusCode:pRe,kWebSocket:pi,NOOP:DW}=Gg(),{EventTarget:{addEventListener:hRe,removeEventListener:ERe}}=QW(),{format:uRe,parse:CRe}=nS(),{toBuffer:BRe}=mC(),OW=Symbol("kAborted"),ek=[8,13],Ug=["CONNECTING","OPEN","CLOSING","CLOSED"],fRe=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,ir=class n extends tRe{constructor(t,o,a){super(),this._binaryType=mW[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=sS,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=n.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,t!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,o===void 0?o=[]:Array.isArray(o)||(typeof o=="object"&&o!==null?(a=o,o=[]):o=[o]),bW(this,t,o,a)):(this._autoPong=a.autoPong,this._closeTimeout=a.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(t){mW.includes(t)&&(this._binaryType=t,this._receiver&&(this._receiver._binaryType=t))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,o,a){let e=new sRe({allowSynchronousEvents:a.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:a.maxBufferedChunks,maxFragments:a.maxFragments,maxPayload:a.maxPayload,skipUTF8Validation:a.skipUTF8Validation}),i=new gRe(t,this._extensions,a.generateMask);this._receiver=e,this._sender=i,this._socket=t,e[pi]=this,i[pi]=this,t[pi]=this,e.on("conclude",mRe),e.on("drain",SRe),e.on("error",wRe),e.on("message",DRe),e.on("ping",ORe),e.on("pong",bRe),i.onerror=MRe,t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),o.length>0&&t.unshift(o),t.on("close",TW),t.on("data",cS),t.on("end",NW),t.on("error",RW),this._readyState=n.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=n.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Yc.extensionName]&&this._extensions[Yc.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=n.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,o){if(this.readyState!==n.CLOSED){if(this.readyState===n.CONNECTING){Eo(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===n.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=n.CLOSING,this._sender.close(t,o,!this._isServer,a=>{a||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),_W(this)}}pause(){this.readyState===n.CONNECTING||this.readyState===n.CLOSED||(this._paused=!0,this._socket.pause())}ping(t,o,a){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(a=t,t=o=void 0):typeof o=="function"&&(a=o,o=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==n.OPEN){Ak(this,t,a);return}o===void 0&&(o=!this._isServer),this._sender.ping(t||sS,o,a)}pong(t,o,a){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(a=t,t=o=void 0):typeof o=="function"&&(a=o,o=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==n.OPEN){Ak(this,t,a);return}o===void 0&&(o=!this._isServer),this._sender.pong(t||sS,o,a)}resume(){this.readyState===n.CONNECTING||this.readyState===n.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,o,a){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof o=="function"&&(a=o,o={}),typeof t=="number"&&(t=t.toString()),this.readyState!==n.OPEN){Ak(this,t,a);return}let e={binary:typeof t!="string",mask:!this._isServer,compress:!0,fin:!0,...o};this._extensions[Yc.extensionName]||(e.compress=!1),this._sender.send(t||sS,e,a)}terminate(){if(this.readyState!==n.CLOSED){if(this.readyState===n.CONNECTING){Eo(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=n.CLOSING,this._socket.destroy())}}};Object.defineProperty(ir,"CONNECTING",{enumerable:!0,value:Ug.indexOf("CONNECTING")});Object.defineProperty(ir.prototype,"CONNECTING",{enumerable:!0,value:Ug.indexOf("CONNECTING")});Object.defineProperty(ir,"OPEN",{enumerable:!0,value:Ug.indexOf("OPEN")});Object.defineProperty(ir.prototype,"OPEN",{enumerable:!0,value:Ug.indexOf("OPEN")});Object.defineProperty(ir,"CLOSING",{enumerable:!0,value:Ug.indexOf("CLOSING")});Object.defineProperty(ir.prototype,"CLOSING",{enumerable:!0,value:Ug.indexOf("CLOSING")});Object.defineProperty(ir,"CLOSED",{enumerable:!0,value:Ug.indexOf("CLOSED")});Object.defineProperty(ir.prototype,"CLOSED",{enumerable:!0,value:Ug.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(n=>{Object.defineProperty(ir.prototype,n,{enumerable:!0})});["open","error","close","message"].forEach(n=>{Object.defineProperty(ir.prototype,`on${n}`,{enumerable:!0,get(){for(let t of this.listeners(n))if(t[$R])return t[dRe];return null},set(t){for(let o of this.listeners(n))if(o[$R]){this.removeListener(n,o);break}typeof t=="function"&&this.addEventListener(n,t,{[$R]:!0})}})});ir.prototype.addEventListener=hRe;ir.prototype.removeEventListener=ERe;kW.exports=ir;function bW(n,t,o,a){let e={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:IRe,protocolVersion:ek[1],maxBufferedChunks:262144,maxFragments:16384,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...a,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(n._autoPong=e.autoPong,n._closeTimeout=e.closeTimeout,!ek.includes(e.protocolVersion))throw new RangeError(`Unsupported protocol version: ${e.protocolVersion} (supported versions: ${ek.join(", ")})`);let i;if(t instanceof XR)i=t;else try{i=new XR(t)}catch{throw new SyntaxError(`Invalid URL: ${t}`)}i.protocol==="http:"?i.protocol="ws:":i.protocol==="https:"&&(i.protocol="wss:"),n._url=i.href;let A=i.protocol==="wss:",r=i.protocol==="ws+unix:",s;if(i.protocol!=="ws:"&&!A&&!r?s=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:r&&!i.pathname?s="The URL's pathname is empty":i.hash&&(s="The URL contains a fragment identifier"),s){let Q=new SyntaxError(s);if(n._redirects===0)throw Q;gS(n,Q);return}let g=A?443:80,c=oRe(16).toString("base64"),I=A?rRe.request:iRe.request,d=new Set,B;if(e.createConnection=e.createConnection||(A?yRe:QRe),e.defaultPort=e.defaultPort||g,e.port=i.port||g,e.host=i.hostname.startsWith("[")?i.hostname.slice(1,-1):i.hostname,e.headers={...e.headers,"Sec-WebSocket-Version":e.protocolVersion,"Sec-WebSocket-Key":c,Connection:"Upgrade",Upgrade:"websocket"},e.path=i.pathname+i.search,e.timeout=e.handshakeTimeout,e.perMessageDeflate&&(B=new Yc({...e.perMessageDeflate,isServer:!1,maxPayload:e.maxPayload}),e.headers["Sec-WebSocket-Extensions"]=uRe({[Yc.extensionName]:B.offer()})),o.length){for(let Q of o){if(typeof Q!="string"||!fRe.test(Q)||d.has(Q))throw new SyntaxError("An invalid or duplicated subprotocol was specified");d.add(Q)}e.headers["Sec-WebSocket-Protocol"]=o.join(",")}if(e.origin&&(e.protocolVersion<13?e.headers["Sec-WebSocket-Origin"]=e.origin:e.headers.Origin=e.origin),(i.username||i.password)&&(e.auth=`${i.username}:${i.password}`),r){let Q=e.path.split(":");e.socketPath=Q[0],e.path=Q[1]}let f;if(e.followRedirects){if(n._redirects===0){n._originalIpc=r,n._originalSecure=A,n._originalHostOrSocketPath=r?e.socketPath:i.host;let Q=a&&a.headers;if(a={...a,headers:{}},Q)for(let[y,m]of Object.entries(Q))a.headers[y.toLowerCase()]=m}else if(n.listenerCount("redirect")===0){let Q=r?n._originalIpc?e.socketPath===n._originalHostOrSocketPath:!1:n._originalIpc?!1:i.host===n._originalHostOrSocketPath;(!Q||n._originalSecure&&!A)&&(delete e.headers.authorization,delete e.headers.cookie,Q||delete e.headers.host,e.auth=void 0)}e.auth&&!a.headers.authorization&&(a.headers.authorization="Basic "+Buffer.from(e.auth).toString("base64")),f=n._req=I(e),n._redirects&&n.emit("redirect",n.url,f)}else f=n._req=I(e);e.timeout&&f.on("timeout",()=>{Eo(n,f,"Opening handshake has timed out")}),f.on("error",Q=>{f===null||f[OW]||(f=n._req=null,gS(n,Q))}),f.on("response",Q=>{let y=Q.headers.location,m=Q.statusCode;if(y&&e.followRedirects&&m>=300&&m<400){if(++n._redirects>e.maxRedirects){Eo(n,f,"Maximum redirects exceeded");return}f.abort();let _;try{_=new XR(y,t)}catch{let R=new SyntaxError(`Invalid URL: ${y}`);gS(n,R);return}bW(n,_,o,a)}else n.emit("unexpected-response",f,Q)||Eo(n,f,`Unexpected server response: ${Q.statusCode}`)}),f.on("upgrade",(Q,y,m)=>{if(n.emit("upgrade",Q),n.readyState!==ir.CONNECTING)return;f=n._req=null;let _=Q.headers.upgrade;if(_===void 0||_.toLowerCase()!=="websocket"){Eo(n,y,"Invalid Upgrade header");return}let T=nRe("sha1").update(c+lRe).digest("base64");if(Q.headers["sec-websocket-accept"]!==T){Eo(n,y,"Invalid Sec-WebSocket-Accept header");return}let R=Q.headers["sec-websocket-protocol"],L;if(R!==void 0?d.size?d.has(R)||(L="Server sent an invalid subprotocol"):L="Server sent a subprotocol but none was requested":d.size&&(L="Server sent no subprotocol"),L){Eo(n,y,L);return}R&&(n._protocol=R);let U=Q.headers["sec-websocket-extensions"];if(U!==void 0){if(!B){Eo(n,y,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let F;try{F=CRe(U)}catch{Eo(n,y,"Invalid Sec-WebSocket-Extensions header");return}let z=Object.keys(F);if(z.length!==1||z[0]!==Yc.extensionName){Eo(n,y,"Server indicated an extension that was not requested");return}try{B.accept(F[Yc.extensionName])}catch{Eo(n,y,"Invalid Sec-WebSocket-Extensions header");return}n._extensions[Yc.extensionName]=B}n.setSocket(y,m,{allowSynchronousEvents:e.allowSynchronousEvents,generateMask:e.generateMask,maxBufferedChunks:e.maxBufferedChunks,maxFragments:e.maxFragments,maxPayload:e.maxPayload,skipUTF8Validation:e.skipUTF8Validation})}),e.finishRequest?e.finishRequest(f,n):f.end()}function gS(n,t){n._readyState=ir.CLOSING,n._errorEmitted=!0,n.emit("error",t),n.emitClose()}function QRe(n){return n.path=n.socketPath,wW.connect(n)}function yRe(n){return n.path=void 0,!n.servername&&n.servername!==""&&(n.servername=wW.isIP(n.host)?"":n.host),aRe.connect(n)}function Eo(n,t,o){n._readyState=ir.CLOSING;let a=new Error(o);Error.captureStackTrace(a,Eo),t.setHeader?(t[OW]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(gS,n,a)):(t.destroy(a),t.once("error",n.emit.bind(n,"error")),t.once("close",n.emitClose.bind(n)))}function Ak(n,t,o){if(t){let a=cRe(t)?t.size:BRe(t).length;n._socket?n._sender._bufferedBytes+=a:n._bufferedAmount+=a}if(o){let a=new Error(`WebSocket is not open: readyState ${n.readyState} (${Ug[n.readyState]})`);process.nextTick(o,a)}}function mRe(n,t){let o=this[pi];o._closeFrameReceived=!0,o._closeMessage=t,o._closeCode=n,o._socket[pi]!==void 0&&(o._socket.removeListener("data",cS),process.nextTick(MW,o._socket),n===1005?o.close():o.close(n,t))}function SRe(){let n=this[pi];n.isPaused||n._socket.resume()}function wRe(n){let t=this[pi];t._socket[pi]!==void 0&&(t._socket.removeListener("data",cS),process.nextTick(MW,t._socket),t.close(n[pRe])),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",n))}function SW(){this[pi].emitClose()}function DRe(n,t){this[pi].emit("message",n,t)}function ORe(n){let t=this[pi];t._autoPong&&t.pong(n,!this._isServer,DW),t.emit("ping",n)}function bRe(n){this[pi].emit("pong",n)}function MW(n){n.resume()}function MRe(n){let t=this[pi];t.readyState!==ir.CLOSED&&(t.readyState===ir.OPEN&&(t._readyState=ir.CLOSING,_W(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",n)))}function _W(n){n._closeTimer=setTimeout(n._socket.destroy.bind(n._socket),n._closeTimeout)}function TW(){let n=this[pi];if(this.removeListener("close",TW),this.removeListener("data",cS),this.removeListener("end",NW),n._readyState=ir.CLOSING,!this._readableState.endEmitted&&!n._closeFrameReceived&&!n._receiver._writableState.errorEmitted&&this._readableState.length!==0){let t=this.read(this._readableState.length);n._receiver.write(t)}n._receiver.end(),this[pi]=void 0,clearTimeout(n._closeTimer),n._receiver._writableState.finished||n._receiver._writableState.errorEmitted?n.emitClose():(n._receiver.on("error",SW),n._receiver.on("finish",SW))}function cS(n){this[pi]._receiver.write(n)||this.pause()}function NW(){let n=this[pi];n._readyState=ir.CLOSING,n._receiver.end(),this.end()}function RW(){let n=this[pi];this.removeListener("error",RW),this.on("error",DW),n&&(n._readyState=ir.CLOSING,this.destroy())}});var FW=ee((npA,GW)=>{"use strict";var opA=IS(),{Duplex:_Re}=$e("stream");function vW(n){n.emit("close")}function TRe(){!this.destroyed&&this._writableState.finished&&this.destroy()}function PW(n){this.removeListener("error",PW),this.destroy(),this.listenerCount("error")===0&&this.emit("error",n)}function NRe(n,t){let o=!0,a=new _Re({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return n.on("message",function(i,A){let r=!A&&a._readableState.objectMode?i.toString():i;a.push(r)||n.pause()}),n.once("error",function(i){a.destroyed||(o=!1,a.destroy(i))}),n.once("close",function(){a.destroyed||a.push(null)}),a._destroy=function(e,i){if(n.readyState===n.CLOSED){i(e),process.nextTick(vW,a);return}let A=!1;n.once("error",function(s){A=!0,i(s)}),n.once("close",function(){A||i(e),process.nextTick(vW,a)}),o&&n.terminate()},a._final=function(e){if(n.readyState===n.CONNECTING){n.once("open",function(){a._final(e)});return}n._socket!==null&&(n._socket._writableState.finished?(e(),a._readableState.endEmitted&&a.destroy()):(n._socket.once("finish",function(){e()}),n.close()))},a._read=function(){n.isPaused&&n.resume()},a._write=function(e,i,A){if(n.readyState===n.CONNECTING){n.once("open",function(){a._write(e,i,A)});return}n.send(e,A)},a.on("end",TRe),a.on("error",PW),a}GW.exports=NRe});var tk=ee((spA,LW)=>{"use strict";var{tokenChars:RRe}=eh();function kRe(n){let t=new Set,o=-1,a=-1,e=0;for(e;e{"use strict";var vRe=$e("events"),lS=$e("http"),{Duplex:gpA}=$e("stream"),{createHash:PRe}=$e("crypto"),UW=nS(),Tl=$p(),GRe=tk(),FRe=IS(),{CLOSE_TIMEOUT:LRe,GUID:URe,kWebSocket:HRe}=Gg(),KRe=/^[+/0-9A-Za-z]{22}==$/,HW=0,KW=1,YW=2,rk=class extends vRe{constructor(t,o){if(super(),t={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:256*1024,maxFragments:16*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:LRe,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:FRe,...t},t.port==null&&!t.server&&!t.noServer||t.port!=null&&(t.server||t.noServer)||t.server&&t.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(t.port!=null?(this._server=lS.createServer((a,e)=>{let i=lS.STATUS_CODES[426];e.writeHead(426,{"Content-Length":i.length,"Content-Type":"text/plain"}),e.end(i)}),this._server.listen(t.port,t.host,t.backlog,o)):t.server&&(this._server=t.server),this._server){let a=this.emit.bind(this,"connection");this._removeListeners=xRe(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(e,i,A)=>{this.handleUpgrade(e,i,A,a)}})}t.perMessageDeflate===!0&&(t.perMessageDeflate={}),t.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=t,this._state=HW}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(t){if(this._state===YW){t&&this.once("close",()=>{t(new Error("The server is not running"))}),process.nextTick(bC,this);return}if(t&&this.once("close",t),this._state!==KW)if(this._state=KW,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(bC,this):process.nextTick(bC,this);else{let o=this._server;this._removeListeners(),this._removeListeners=this._server=null,o.close(()=>{bC(this)})}}shouldHandle(t){if(this.options.path){let o=t.url.indexOf("?");if((o!==-1?t.url.slice(0,o):t.url)!==this.options.path)return!1}return!0}handleUpgrade(t,o,a,e){o.on("error",xW);let i=t.headers["sec-websocket-key"],A=t.headers.upgrade,r=+t.headers["sec-websocket-version"];if(t.method!=="GET"){Nl(this,t,o,405,"Invalid HTTP method");return}if(A===void 0||A.toLowerCase()!=="websocket"){Nl(this,t,o,400,"Invalid Upgrade header");return}if(i===void 0||!KRe.test(i)){Nl(this,t,o,400,"Missing or invalid Sec-WebSocket-Key header");return}if(r!==13&&r!==8){Nl(this,t,o,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(t)){MC(o,400);return}let s=t.headers["sec-websocket-protocol"],g=new Set;if(s!==void 0)try{g=GRe.parse(s)}catch{Nl(this,t,o,400,"Invalid Sec-WebSocket-Protocol header");return}let c=t.headers["sec-websocket-extensions"],I={};if(this.options.perMessageDeflate&&c!==void 0){let d=new Tl({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let B=UW.parse(c);B[Tl.extensionName]&&(d.accept(B[Tl.extensionName]),I[Tl.extensionName]=d)}catch{Nl(this,t,o,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let d={origin:t.headers[`${r===8?"sec-websocket-origin":"origin"}`],secure:!!(t.socket.authorized||t.socket.encrypted),req:t};if(this.options.verifyClient.length===2){this.options.verifyClient(d,(B,f,Q,y)=>{if(!B)return MC(o,f||401,Q,y);this.completeUpgrade(I,i,g,t,o,a,e)});return}if(!this.options.verifyClient(d))return MC(o,401)}this.completeUpgrade(I,i,g,t,o,a,e)}completeUpgrade(t,o,a,e,i,A,r){if(!i.readable||!i.writable)return i.destroy();if(i[HRe])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>HW)return MC(i,503);let g=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${PRe("sha1").update(o+URe).digest("base64")}`],c=new this.options.WebSocket(null,void 0,this.options);if(a.size){let I=this.options.handleProtocols?this.options.handleProtocols(a,e):a.values().next().value;I&&(g.push(`Sec-WebSocket-Protocol: ${I}`),c._protocol=I)}if(t[Tl.extensionName]){let I=t[Tl.extensionName].params,d=UW.format({[Tl.extensionName]:[I]});g.push(`Sec-WebSocket-Extensions: ${d}`),c._extensions=t}this.emit("headers",g,e),i.write(g.concat(`\r +`+t.prev}function ym(n,t){var o=zN(n),a=[];if(o){a.length=n.length;for(var e=0;e{"use strict";var Kbe=cC(),xbe=vc(),wm=function(n,t,o){for(var a=n,e;(e=a.next)!=null;a=e)if(e.key===t)return a.next=e.next,o||(e.next=n.next,n.next=e),e},Ybe=function(n,t){if(n){var o=wm(n,t);return o&&o.value}},jbe=function(n,t,o){var a=wm(n,t);a?a.value=o:n.next={key:t,next:n.next,value:o}},Jbe=function(n,t){return n?!!wm(n,t):!1},qbe=function(n,t){if(n)return wm(n,t,!0)};sz.exports=function(){var t,o={assert:function(a){if(!o.has(a))throw new xbe("Side channel does not contain "+Kbe(a))},delete:function(a){var e=qbe(t,a);return e&&t&&!t.next&&(t=void 0),!!e},get:function(a){return Ybe(t,a)},has:function(a){return Jbe(t,a)},set:function(a,e){t||(t={next:void 0}),jbe(t,a,e)}};return o}});var $N=ee((jdA,lz)=>{"use strict";var cz=xu(),Iz=b0(),zbe=Iz([cz("%String.prototype.indexOf%")]);lz.exports=function(t,o){var a=cz(t,!!o);return typeof a=="function"&&zbe(t,".prototype.")>-1?Iz([a]):a}});var eR=ee((JdA,pz)=>{"use strict";var Vbe=xu(),IC=$N(),Wbe=cC(),Zbe=vc(),dz=Vbe("%Map%",!0),Xbe=IC("Map.prototype.get",!0),$be=IC("Map.prototype.set",!0),eMe=IC("Map.prototype.has",!0),AMe=IC("Map.prototype.delete",!0),tMe=IC("Map.prototype.size",!0);pz.exports=!!dz&&function(){var t,o={assert:function(a){if(!o.has(a))throw new Zbe("Side channel does not contain "+Wbe(a))},delete:function(a){if(t){var e=AMe(t,a);return tMe(t)===0&&(t=void 0),e}return!1},get:function(a){if(t)return Xbe(t,a)},has:function(a){return t?eMe(t,a):!1},set:function(a,e){t||(t=new dz),$be(t,a,e)}};return o}});var Ez=ee((qdA,hz)=>{"use strict";var rMe=xu(),Om=$N(),iMe=cC(),Dm=eR(),aMe=vc(),Hp=rMe("%WeakMap%",!0),oMe=Om("WeakMap.prototype.get",!0),nMe=Om("WeakMap.prototype.set",!0),sMe=Om("WeakMap.prototype.has",!0),gMe=Om("WeakMap.prototype.delete",!0);hz.exports=Hp?function(){var t,o,a={assert:function(e){if(!a.has(e))throw new aMe("Side channel does not contain "+iMe(e))},delete:function(e){if(Hp&&e&&(typeof e=="object"||typeof e=="function")){if(t)return gMe(t,e)}else if(Dm&&o)return o.delete(e);return!1},get:function(e){return Hp&&e&&(typeof e=="object"||typeof e=="function")&&t?oMe(t,e):o&&o.get(e)},has:function(e){return Hp&&e&&(typeof e=="object"||typeof e=="function")&&t?sMe(t,e):!!o&&o.has(e)},set:function(e,i){Hp&&e&&(typeof e=="object"||typeof e=="function")?(t||(t=new Hp),nMe(t,e,i)):Dm&&(o||(o=Dm()),o.set(e,i))}};return a}:Dm});var AR=ee((zdA,uz)=>{"use strict";var cMe=vc(),IMe=cC(),lMe=gz(),dMe=eR(),pMe=Ez(),hMe=pMe||dMe||lMe;uz.exports=function(){var t,o={assert:function(a){if(!o.has(a)){var e=a&&Object(a)===a?"the given object key":IMe(a);throw new cMe("Side channel does not contain "+e)}},delete:function(a){return!!t&&t.delete(a)},get:function(a){return t&&t.get(a)},has:function(a){return!!t&&t.has(a)},set:function(a,e){t||(t=hMe()),t.set(a,e)}};return o}});var bm=ee((VdA,Cz)=>{"use strict";var EMe=String.prototype.replace,uMe=/%20/g,tR={RFC1738:"RFC1738",RFC3986:"RFC3986"};Cz.exports={default:tR.RFC3986,formatters:{RFC1738:function(n){return EMe.call(n,uMe,"+")},RFC3986:function(n){return String(n)}},RFC1738:tR.RFC1738,RFC3986:tR.RFC3986}});var oR=ee((WdA,Qz)=>{"use strict";var CMe=bm(),fz=AR(),Bz=m0(),rR=Object.prototype.hasOwnProperty,fl=Array.isArray,_m=fz(),Ql=function(t,o){return _m.set(t,o),t},yl=function(t){return _m.has(t)},lC=function(t){return _m.get(t)},iR=function(t,o){_m.set(t,o)},Os=(function(){for(var n=[],t=0;t<256;++t)n[n.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return n})(),BMe=function(t){for(;t.length>1;){var o=t.pop(),a=o.obj[o.prop];if(fl(a)){for(var e=[],i=0;i=a.arrayLimit){if(a.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+a.arrayLimit+" element"+(a.arrayLimit===1?"":"s")+" allowed in an array.");return Ql(Kp(t.concat(o),a),e)}t[e]=o}else if(t&&typeof t=="object")if(yl(t)){var i=lC(t)+1;t[i]=o,iR(t,i)}else{if(a&&a.strictMerge)return[t,o];(a&&(a.plainObjects||a.allowPrototypes)||!rR.call(Object.prototype,o))&&(t[o]=!0)}else return[t,o];return t}if(!t||typeof t!="object"){if(yl(o)){for(var A=Object.keys(o),r=a&&a.plainObjects?{__proto__:null,0:t}:{0:t},s=0;sa.arrayLimit){if(a.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+a.arrayLimit+" element"+(a.arrayLimit===1?"":"s")+" allowed in an array.");return Ql(Kp(c,a),c.length-1)}return c}var I=t;if(fl(t)&&!fl(o)&&(I=Kp(t,a)),fl(t)&&fl(o)){if(o.forEach(function(d,B){if(rR.call(t,B)){var f=t[B];f&&typeof f=="object"&&d&&typeof d=="object"?t[B]=n(f,d,a):t[t.length]=d}else t[B]=d}),a&&typeof a.arrayLimit=="number"&&t.length>a.arrayLimit){if(a.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+a.arrayLimit+" element"+(a.arrayLimit===1?"":"s")+" allowed in an array.");return Ql(Kp(t,a),t.length-1)}return t}return Object.keys(o).reduce(function(d,B){var f=o[B];if(rR.call(d,B)?aR(d,B,n(d[B],f,a)):aR(d,B,f),yl(o)&&!yl(d)&&Ql(d,lC(o)),yl(d)){var Q=parseInt(B,10);String(Q)===B&&Q>=0&&Q>lC(d)&&iR(d,Q)}return d},I)},QMe=function(t,o){return Object.keys(o).reduce(function(a,e){return aR(a,e,o[e]),a},t)},yMe=function(n,t,o){var a=n.replace(/\+/g," ");if(o==="iso-8859-1")return a.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(a)}catch{return a}},Mm=1024,mMe=function(t,o,a,e,i){if(t.length===0)return t;var A=t;if(typeof t=="symbol"?A=Symbol.prototype.toString.call(t):typeof t!="string"&&(A=String(t)),a==="iso-8859-1")return escape(A).replace(/%u[0-9a-f]{4}/gi,function(f){return"%26%23"+parseInt(f.slice(2),16)+"%3B"});for(var r="",s=0;s=Mm?A.slice(s,s+Mm):A;if(s+Mm=55296&&c<=56319&&(g=g.slice(0,-1),s-=1)}for(var I=[],d=0;d=48&&B<=57||B>=65&&B<=90||B>=97&&B<=122||i===CMe.RFC1738&&(B===40||B===41)){I[I.length]=g.charAt(d);continue}if(B<128){I[I.length]=Os[B];continue}if(B<2048){I[I.length]=Os[192|B>>6]+Os[128|B&63];continue}if(B<55296||B>=57344){I[I.length]=Os[224|B>>12]+Os[128|B>>6&63]+Os[128|B&63];continue}d+=1,B=65536+((B&1023)<<10|g.charCodeAt(d)&1023),I[I.length]=Os[240|B>>18]+Os[128|B>>12&63]+Os[128|B>>6&63]+Os[128|B&63]}r+=I.join("")}return r},SMe=function(t){for(var o=[{obj:{o:t},prop:"o"}],a=fz(),e=0;ea){if(i)throw new RangeError("Array limit exceeded. Only "+a+" element"+(a===1?"":"s")+" allowed in an array.");return Ql(Kp(r,{plainObjects:e}),r.length-1)}return r},bMe=function(t,o){if(fl(t)){for(var a=[],e=0;e{"use strict";var mz=AR(),Tm=oR(),dC=bm(),MMe=Object.prototype.hasOwnProperty,Sz={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,o){return t+"["+o+"]"},repeat:function(t){return t}},bs=Array.isArray,_Me=Array.prototype.push,wz=function(n,t){_Me.apply(n,bs(t)?t:[t])},TMe=Date.prototype.toISOString,yz=dC.default,jr={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Tm.encode,encodeValuesOnly:!1,filter:void 0,format:yz,formatter:dC.formatters[yz],indices:!1,serializeDate:function(t){return TMe.call(t)},skipNulls:!1,strictNullHandling:!1},NMe=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},nR={},RMe=function n(t,o,a,e,i,A,r,s,g,c,I,d,B,f,Q,y,m,_){for(var T=t,R=_,L=0,U=!1;(R=R.get(nR))!==void 0&&!U;){var F=R.get(t);if(L+=1,typeof F<"u"){if(F===L)throw new RangeError("Cyclic object value");U=!0}typeof R.get(nR)>"u"&&(L=0)}if(typeof c=="function"?T=c(o,T):T instanceof Date?T=B(T):a==="comma"&&bs(T)&&(T=Tm.maybeMap(T,function(oe){return oe instanceof Date?B(oe):oe})),T===null){if(A)return Q(g&&!y?g(o,jr.encoder,m,"key",f):o);T=""}if(NMe(T)||Tm.isBuffer(T)){if(g){var J=y?o:g(o,jr.encoder,m,"key",f);return[Q(J)+"="+Q(g(T,jr.encoder,m,"value",f))]}return[Q(o)+"="+Q(String(T))]}var V=[];if(typeof T>"u")return V;var H;if(a==="comma"&&bs(T))y&&g&&(T=Tm.maybeMap(T,function(oe){return oe==null?oe:g(oe)})),H=[{value:T.length>0?T.join(",")||null:void 0}];else if(bs(c))H=c;else{var G=Object.keys(T);H=I?G.sort(I):G}var q=s?String(o).replace(/\./g,"%2E"):String(o),K=e&&bs(T)&&T.length===1?q+"[]":q;if(i&&bs(T)&&T.length===0)return K+"[]";for(var N=0;N"u"?t.encodeDotInKeys===!0?!0:jr.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:jr.addQueryPrefix,allowDots:r,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:jr.allowEmptyArrays,arrayFormat:A,charset:o,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:jr.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?jr.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:jr.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:jr.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:jr.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:jr.encodeValuesOnly,filter:i,format:a,formatter:e,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:jr.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:jr.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:jr.strictNullHandling}};Dz.exports=function(n,t){var o=n,a=kMe(t),e,i;typeof a.filter=="function"?(i=a.filter,o=i("",o)):bs(a.filter)&&(i=a.filter,e=i);var A=[];if(typeof o!="object"||o===null)return"";var r=Sz[a.arrayFormat],s=r==="comma"&&a.commaRoundTrip;e||(e=Object.keys(o)),a.sort&&e.sort(a.sort);for(var g=mz(),c=0;c"u"||I===null)){var d=o[I];a.skipNulls&&d===null||wz(A,RMe(d,I,r,s,a.allowEmptyArrays,a.strictNullHandling,a.skipNulls,a.encodeDotInKeys,a.encode?a.encoder:null,a.filter,a.sort,a.allowDots,a.serializeDate,a.format,a.formatter,a.encodeValuesOnly,a.charset,g))}}var B=A.join(a.delimiter),f=a.addQueryPrefix===!0?"?":"";return a.charsetSentinel&&(a.charset==="iso-8859-1"?f+="utf8=%26%2310003%3B"+a.delimiter:f+="utf8=%E2%9C%93"+a.delimiter),B.length>0?f+B:""}});var _z=ee((XdA,Mz)=>{"use strict";var Ms=oR(),Nm=Object.prototype.hasOwnProperty,sR=Array.isArray,hr={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Ms.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},vMe=function(n){return n.replace(/&#(\d+);/g,function(t,o){return String.fromCharCode(parseInt(o,10))})},bz=function(n,t,o,a){if(n&&typeof n=="string"&&t.comma&&n.indexOf(",")>-1){if(a&&t.throwOnLimitExceeded)for(var e=0,i=n.indexOf(",");i>-1;){if(e+=1,e>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(t.arrayLimit===1?"":"s")+" allowed in an array.");i=n.indexOf(",",i+1)}return n.split(",")}if(t.throwOnLimitExceeded&&o>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(t.arrayLimit===1?"":"s")+" allowed in an array.");return n},PMe="utf8=%26%2310003%3B",GMe="utf8=%E2%9C%93",FMe=function(t,o){var a={__proto__:null},e=o.ignoreQueryPrefix?t.replace(/^\?/,""):t;e=e.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=o.parameterLimit===1/0?void 0:o.parameterLimit,A=e.split(o.delimiter,o.throwOnLimitExceeded&&typeof i<"u"?i+1:i);if(o.throwOnLimitExceeded&&typeof i<"u"&&A.length>i)throw new RangeError("Parameter limit exceeded. Only "+i+" parameter"+(i===1?"":"s")+" allowed.");var r=-1,s,g=o.charset;if(o.charsetSentinel)for(s=0;s-1&&(f=sR(f)?[f]:f),o.comma&&sR(f)&&f.length>o.arrayLimit&&(f=Ms.combine([],f,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded)),B!==null){var Q=Nm.call(a,B);Q&&(o.duplicates==="combine"||c.indexOf("[]=")>-1)?a[B]=Ms.combine(a[B],f,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded):(!Q||o.duplicates==="last")&&(a[B]=f)}}return a},LMe=function(n,t,o,a){var e=0;if(n.length>0&&n[n.length-1]==="[]"){var i=n.slice(0,-1).join("");e=Array.isArray(t)&&t[i]?t[i].length:0}for(var A=a?t:bz(t,o,e),r=n.length-1;r>=0;--r){var s,g=n[r];if(g==="[]"&&o.parseArrays)Ms.isOverflow(A)?s=A:s=o.allowEmptyArrays&&(A===""||o.strictNullHandling&&A===null)?[]:Ms.combine([],A,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded);else{s=o.plainObjects?{__proto__:null}:{};var c=g.charAt(0)==="["&&g.charAt(g.length-1)==="]"?g.slice(1,-1):g,I=o.decodeDotInKeys?c.replace(/%2E/g,"."):c,d=parseInt(I,10),B=!isNaN(d)&&g!==I&&String(d)===I&&d>=0&&o.parseArrays;if(!o.parseArrays&&I==="")s={0:A};else if(B&&d=0?a.slice(0,i):a;if(A){if(!o.plainObjects&&Nm.call(Object.prototype,A)&&!o.allowPrototypes)return;e[e.length]=A}for(var r=a.length,s=i,g=0;s>=0&&g=0){if(o.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+o.depth+" and strictDepth is true");e[e.length]="["+a.slice(s)+"]"}return e},HMe=function(t,o,a,e){if(t){var i=UMe(t,a);if(i)return LMe(i,o,a,e)}},KMe=function(t){if(!t)return hr;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof t.throwOnLimitExceeded<"u"&&typeof t.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var o=typeof t.charset>"u"?hr.charset:t.charset,a=typeof t.duplicates>"u"?hr.duplicates:t.duplicates;if(a!=="combine"&&a!=="first"&&a!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var e=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:hr.allowDots:!!t.allowDots;return{allowDots:e,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:hr.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:hr.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:hr.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:hr.arrayLimit,charset:o,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:hr.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:hr.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:hr.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:hr.decoder,delimiter:typeof t.delimiter=="string"||Ms.isRegExp(t.delimiter)?t.delimiter:hr.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:hr.depth,duplicates:a,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:hr.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:hr.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:hr.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:hr.strictDepth,strictMerge:typeof t.strictMerge=="boolean"?!!t.strictMerge:hr.strictMerge,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:hr.strictNullHandling,throwOnLimitExceeded:typeof t.throwOnLimitExceeded=="boolean"?t.throwOnLimitExceeded:!1}};Mz.exports=function(n,t){var o=KMe(t);if(n===""||n===null||typeof n>"u")return o.plainObjects?{__proto__:null}:{};for(var a=typeof n=="string"?FMe(n,o):n,e=o.plainObjects?{__proto__:null}:{},i=Object.keys(a),A=0;A{"use strict";var xMe=Oz(),YMe=_z(),jMe=bm();Tz.exports={formats:jMe,parse:YMe,stringify:xMe}});var kz=ee((epA,Rz)=>{function JMe(n){return n}Rz.exports=JMe});var uV=ee((pC,Yp)=>{var qMe=200,zMe="Expected a function",fR="__lodash_hash_undefined__",Lm=1,jp=2,Yz=1/0,jz=9007199254740991,Rm="[object Arguments]",IR="[object Array]",Jz="[object Boolean]",qz="[object Date]",zz="[object Error]",Vz="[object Function]",VMe="[object GeneratorFunction]",km="[object Map]",Wz="[object Number]",xp="[object Object]",vz="[object Promise]",Zz="[object RegExp]",vm="[object Set]",Xz="[object String]",$z="[object Symbol]",lR="[object WeakMap]",eV="[object ArrayBuffer]",Pm="[object DataView]",WMe="[object Float32Array]",ZMe="[object Float64Array]",XMe="[object Int8Array]",$Me="[object Int16Array]",e_e="[object Int32Array]",A_e="[object Uint8Array]",t_e="[object Uint8ClampedArray]",r_e="[object Uint16Array]",i_e="[object Uint32Array]",a_e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o_e=/^\w*$/,n_e=/^\./,s_e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,g_e=/[\\^$.*+?()[\]{}|]/g,c_e=/\\(\\)?/g,I_e=/^\[object .+?Constructor\]$/,l_e=/^(?:0|[1-9]\d*)$/,qt={};qt[WMe]=qt[ZMe]=qt[XMe]=qt[$Me]=qt[e_e]=qt[A_e]=qt[t_e]=qt[r_e]=qt[i_e]=!0;qt[Rm]=qt[IR]=qt[eV]=qt[Jz]=qt[Pm]=qt[qz]=qt[zz]=qt[Vz]=qt[km]=qt[Wz]=qt[xp]=qt[Zz]=qt[vm]=qt[Xz]=qt[lR]=!1;var AV=typeof global=="object"&&global&&global.Object===Object&&global,d_e=typeof self=="object"&&self&&self.Object===Object&&self,xc=AV||d_e||Function("return this")(),tV=typeof pC=="object"&&pC&&!pC.nodeType&&pC,Pz=tV&&typeof Yp=="object"&&Yp&&!Yp.nodeType&&Yp,p_e=Pz&&Pz.exports===tV,Gz=p_e&&AV.process,Fz=(function(){try{return Gz&&Gz.binding("util")}catch{}})(),Lz=Fz&&Fz.isTypedArray;function rV(n,t){for(var o=-1,a=t.length,e=n.length;++o-1}function x_e(n,t){var o=this.__data__,a=Hm(o,n);return a<0?o.push([n,t]):o[a][1]=t,this}kg.prototype.clear=L_e;kg.prototype.delete=U_e;kg.prototype.get=H_e;kg.prototype.has=K_e;kg.prototype.set=x_e;function vg(n){var t=-1,o=n?n.length:0;for(this.clear();++tr))return!1;var g=i.get(n);if(g&&i.get(t))return g==t;var c=-1,I=!0,d=e&Lm?new Fm:void 0;for(i.set(n,t),i.set(t,n);++c-1&&n%1==0&&n-1&&n%1==0&&n<=jz}function uC(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function jm(n){return!!n&&typeof n=="object"}function DR(n){return typeof n=="symbol"||jm(n)&&Jp.call(n)==$z}var MTe=Lz?C_e(Lz):sTe;function _Te(n){return n==null?"":ETe(n)}function TTe(n,t,o){var a=n==null?void 0:oV(n,t);return a===void 0?o:a}function NTe(n,t){return n!=null&&mTe(n,t,iTe)}function BR(n){return SR(n)?aV(n):cTe(n)}function RTe(n){return SR(n)?aV(n,!0):ITe(n)}function kTe(n,t){return n==null?{}:pTe(n,BTe(n),gTe(t))}function vTe(n){return n}function PTe(n){return xm(n)?E_e(Ym(n)):hTe(n)}function EV(){return[]}Yp.exports=kTe});var JV=ee((CC,zp)=>{var GTe=200,OV="__lodash_hash_undefined__",FTe=800,LTe=16,bV=9007199254740991,MV="[object Arguments]",UTe="[object Array]",HTe="[object AsyncFunction]",KTe="[object Boolean]",xTe="[object Date]",YTe="[object Error]",_V="[object Function]",jTe="[object GeneratorFunction]",JTe="[object Map]",qTe="[object Number]",zTe="[object Null]",TV="[object Object]",VTe="[object Proxy]",WTe="[object RegExp]",ZTe="[object Set]",XTe="[object String]",$Te="[object Undefined]",e0e="[object WeakMap]",A0e="[object ArrayBuffer]",t0e="[object DataView]",r0e="[object Float32Array]",i0e="[object Float64Array]",a0e="[object Int8Array]",o0e="[object Int16Array]",n0e="[object Int32Array]",s0e="[object Uint8Array]",g0e="[object Uint8ClampedArray]",c0e="[object Uint16Array]",I0e="[object Uint32Array]",l0e=/[\\^$.*+?()[\]{}|]/g,d0e=/^\[object .+?Constructor\]$/,p0e=/^(?:0|[1-9]\d*)$/,zt={};zt[r0e]=zt[i0e]=zt[a0e]=zt[o0e]=zt[n0e]=zt[s0e]=zt[g0e]=zt[c0e]=zt[I0e]=!0;zt[MV]=zt[UTe]=zt[A0e]=zt[KTe]=zt[t0e]=zt[xTe]=zt[YTe]=zt[_V]=zt[JTe]=zt[qTe]=zt[TV]=zt[WTe]=zt[ZTe]=zt[XTe]=zt[e0e]=!1;var NV=typeof global=="object"&&global&&global.Object===Object&&global,h0e=typeof self=="object"&&self&&self.Object===Object&&self,QC=NV||h0e||Function("return this")(),RV=typeof CC=="object"&&CC&&!CC.nodeType&&CC,BC=RV&&typeof zp=="object"&&zp&&!zp.nodeType&&zp,kV=BC&&BC.exports===RV,OR=kV&&NV.process,CV=(function(){try{var n=BC&&BC.require&&BC.require("util").types;return n||OR&&OR.binding&&OR.binding("util")}catch{}})(),BV=CV&&CV.isTypedArray;function E0e(n,t,o){switch(o.length){case 0:return n.call(t);case 1:return n.call(t,o[0]);case 2:return n.call(t,o[0],o[1]);case 3:return n.call(t,o[0],o[1],o[2])}return n.apply(t,o)}function u0e(n,t){for(var o=-1,a=Array(n);++o-1}function L0e(n,t){var o=this.__data__,a=Wm(o,n);return a<0?(++this.size,o.push([n,t])):o[a][1]=t,this}Gg.prototype.clear=v0e;Gg.prototype.delete=P0e;Gg.prototype.get=G0e;Gg.prototype.has=F0e;Gg.prototype.set=L0e;function Vp(n){var t=-1,o=n==null?0:n.length;for(this.clear();++t1?o[e-1]:void 0,A=e>2?o[2]:void 0;for(i=n.length>3&&typeof i=="function"?(e--,i):void 0,A&&pNe(o[0],o[1],A)&&(i=e<3?void 0:i,e=1),t=Object(t);++a-1&&n%1==0&&n0){if(++t>=FTe)return arguments[0]}else t=0;return n.apply(void 0,arguments)}}function yNe(n){if(n!=null){try{return Vm.call(n)}catch{}try{return n+""}catch{}}return""}function $m(n,t){return n===t||n!==n&&t!==t}var TR=DV((function(){return arguments})())?DV:function(n){return yC(n)&&Pg.call(n,"callee")&&!w0e.call(n,"callee")},NR=Array.isArray;function vR(n){return n!=null&&KV(n.length)&&!PR(n)}function mNe(n){return yC(n)&&vR(n)}var HV=O0e||bNe;function PR(n){if(!Ol(n))return!1;var t=Zm(n);return t==_V||t==jTe||t==HTe||t==VTe}function KV(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=bV}function Ol(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}function yC(n){return n!=null&&typeof n=="object"}function SNe(n){if(!yC(n)||Zm(n)!=TV)return!1;var t=PV(n);if(t===null)return!0;var o=Pg.call(t,"constructor")&&t.constructor;return typeof o=="function"&&o instanceof o&&Vm.call(o)==m0e}var xV=BV?C0e(BV):eNe;function wNe(n){return gNe(n,YV(n))}function YV(n){return vR(n)?W0e(n,!0):ANe(n)}var DNe=cNe(function(n,t,o){FV(n,t,o)});function ONe(n){return function(){return n}}function jV(n){return n}function bNe(){return!1}zp.exports=DNe});var Fg=ee((ApA,VV)=>{"use strict";var qV=["nodebuffer","arraybuffer","fragments"],zV=typeof Blob<"u";zV&&qV.push("blob");VV.exports={BINARY_TYPES:qV,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:zV,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var mC=ee((tpA,eS)=>{"use strict";var{EMPTY_BUFFER:MNe}=Fg(),GR=Buffer[Symbol.species];function _Ne(n,t){if(n.length===0)return MNe;if(n.length===1)return n[0];let o=Buffer.allocUnsafe(t),a=0;for(let e=0;e{"use strict";var XV=Symbol("kDone"),LR=Symbol("kRun"),UR=class{constructor(t){this[XV]=()=>{this.pending--,this[LR]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[LR]()}[LR](){if(this.pending!==this.concurrency&&this.jobs.length){let t=this.jobs.shift();this.pending++,t(this[XV])}}};$V.exports=UR});var $p=ee((ipA,iW)=>{"use strict";var SC=$e("zlib"),AW=mC(),NNe=eW(),{kStatusCode:tW}=Fg(),RNe=Buffer[Symbol.species],kNe=Buffer.from([0,0,255,255]),tS=Symbol("permessage-deflate"),Lg=Symbol("total-length"),Zp=Symbol("callback"),Yc=Symbol("buffers"),Xp=Symbol("error"),AS,HR=class{constructor(t){if(this._options=t||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!AS){let o=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;AS=new NNe(o)}}static get extensionName(){return"permessage-deflate"}offer(){let t={};return this._options.serverNoContextTakeover&&(t.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(t.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(t.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(t.client_max_window_bits=!0),t}accept(t){return t=this.normalizeParams(t),this.params=this._isServer?this.acceptAsServer(t):this.acceptAsClient(t),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let t=this._deflate[Zp];this._deflate.close(),this._deflate=null,t&&t(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(t){let o=this._options,a=t.find(e=>!(o.serverNoContextTakeover===!1&&e.server_no_context_takeover||e.server_max_window_bits&&(o.serverMaxWindowBits===!1||typeof o.serverMaxWindowBits=="number"&&o.serverMaxWindowBits>e.server_max_window_bits)||typeof o.clientMaxWindowBits=="number"&&(typeof e.client_max_window_bits=="number"?o.clientMaxWindowBits>e.client_max_window_bits:!e.client_max_window_bits)));if(!a)throw new Error("None of the extension offers can be accepted");return o.serverNoContextTakeover&&(a.server_no_context_takeover=!0),o.clientNoContextTakeover&&(a.client_no_context_takeover=!0),typeof o.serverMaxWindowBits=="number"&&(a.server_max_window_bits=o.serverMaxWindowBits),typeof o.clientMaxWindowBits=="number"?a.client_max_window_bits=o.clientMaxWindowBits:(a.client_max_window_bits===!0||o.clientMaxWindowBits===!1)&&delete a.client_max_window_bits,a}acceptAsClient(t){let o=t[0];if(this._options.clientNoContextTakeover===!1&&o.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!o.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(o.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&o.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return o}normalizeParams(t){return t.forEach(o=>{Object.keys(o).forEach(a=>{let e=o[a];if(e.length>1)throw new Error(`Parameter "${a}" must have only a single value`);if(e=e[0],a==="client_max_window_bits"){if(e!==!0){let i=+e;if(!Number.isInteger(i)||i<8||i>15)throw new TypeError(`Invalid value for parameter "${a}": ${e}`);e=i}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${a}": ${e}`)}else if(a==="server_max_window_bits"){let i=+e;if(!Number.isInteger(i)||i<8||i>15)throw new TypeError(`Invalid value for parameter "${a}": ${e}`);e=i}else if(a==="client_no_context_takeover"||a==="server_no_context_takeover"){if(e!==!0)throw new TypeError(`Invalid value for parameter "${a}": ${e}`)}else throw new Error(`Unknown parameter "${a}"`);o[a]=e})}),t}decompress(t,o,a){AS.add(e=>{this._decompress(t,o,(i,A)=>{e(),a(i,A)})})}compress(t,o,a){AS.add(e=>{this._compress(t,o,(i,A)=>{e(),a(i,A)})})}_decompress(t,o,a){let e=this._isServer?"client":"server";if(!this._inflate){let i=`${e}_max_window_bits`,A=typeof this.params[i]!="number"?SC.Z_DEFAULT_WINDOWBITS:this.params[i];this._inflate=SC.createInflateRaw({...this._options.zlibInflateOptions,windowBits:A}),this._inflate[tS]=this,this._inflate[Lg]=0,this._inflate[Yc]=[],this._inflate.on("error",PNe),this._inflate.on("data",rW)}this._inflate[Zp]=a,this._inflate.write(t),o&&this._inflate.write(kNe),this._inflate.flush(()=>{let i=this._inflate[Xp];if(i){this._inflate.close(),this._inflate=null,a(i);return}let A=AW.concat(this._inflate[Yc],this._inflate[Lg]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[Lg]=0,this._inflate[Yc]=[],o&&this.params[`${e}_no_context_takeover`]&&this._inflate.reset()),a(null,A)})}_compress(t,o,a){let e=this._isServer?"server":"client";if(!this._deflate){let i=`${e}_max_window_bits`,A=typeof this.params[i]!="number"?SC.Z_DEFAULT_WINDOWBITS:this.params[i];this._deflate=SC.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:A}),this._deflate[Lg]=0,this._deflate[Yc]=[],this._deflate.on("data",vNe)}this._deflate[Zp]=a,this._deflate.write(t),this._deflate.flush(SC.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let i=AW.concat(this._deflate[Yc],this._deflate[Lg]);o&&(i=new RNe(i.buffer,i.byteOffset,i.length-4)),this._deflate[Zp]=null,this._deflate[Lg]=0,this._deflate[Yc]=[],o&&this.params[`${e}_no_context_takeover`]&&this._deflate.reset(),a(null,i)})}};iW.exports=HR;function vNe(n){this[Yc].push(n),this[Lg]+=n.length}function rW(n){if(this[Lg]+=n.length,this[tS]._maxPayload<1||this[Lg]<=this[tS]._maxPayload){this[Yc].push(n);return}this[Xp]=new RangeError("Max payload size exceeded"),this[Xp].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Xp][tW]=1009,this.removeListener("data",rW),this.reset()}function PNe(n){if(this[tS]._inflate=null,this[Xp]){this[Zp](this[Xp]);return}n[tW]=1007,this[Zp](n)}});var eh=ee((apA,rS)=>{"use strict";var{isUtf8:aW}=$e("buffer"),{hasBlob:GNe}=Fg(),FNe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function LNe(n){return n>=1e3&&n<=1014&&n!==1004&&n!==1005&&n!==1006||n>=3e3&&n<=4999}function KR(n){let t=n.length,o=0;for(;o=t||(n[o+1]&192)!==128||(n[o+2]&192)!==128||n[o]===224&&(n[o+1]&224)===128||n[o]===237&&(n[o+1]&224)===160)return!1;o+=3}else if((n[o]&248)===240){if(o+3>=t||(n[o+1]&192)!==128||(n[o+2]&192)!==128||(n[o+3]&192)!==128||n[o]===240&&(n[o+1]&240)===128||n[o]===244&&n[o+1]>143||n[o]>244)return!1;o+=4}else return!1;return!0}function UNe(n){return GNe&&typeof n=="object"&&typeof n.arrayBuffer=="function"&&typeof n.type=="string"&&typeof n.stream=="function"&&(n[Symbol.toStringTag]==="Blob"||n[Symbol.toStringTag]==="File")}rS.exports={isBlob:UNe,isValidStatusCode:LNe,isValidUTF8:KR,tokenChars:FNe};if(aW)rS.exports.isValidUTF8=function(n){return n.length<24?KR(n):aW(n)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let n=$e("utf-8-validate");rS.exports.isValidUTF8=function(t){return t.length<32?KR(t):n(t)}}catch{}});var qR=ee((opA,lW)=>{"use strict";var{Writable:HNe}=$e("stream"),oW=$p(),{BINARY_TYPES:KNe,EMPTY_BUFFER:nW,kStatusCode:xNe,kWebSocket:YNe}=Fg(),{concat:xR,toArrayBuffer:jNe,unmask:JNe}=mC(),{isValidStatusCode:qNe,isValidUTF8:sW}=eh(),iS=Buffer[Symbol.species],qo=0,gW=1,cW=2,IW=3,YR=4,jR=5,aS=6,JR=class extends HNe{constructor(t={}){super(),this._allowSynchronousEvents=t.allowSynchronousEvents!==void 0?t.allowSynchronousEvents:!0,this._binaryType=t.binaryType||KNe[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxBufferedChunks=t.maxBufferedChunks|0,this._maxFragments=t.maxFragments|0,this._maxPayload=t.maxPayload|0,this._skipUTF8Validation=!!t.skipUTF8Validation,this[YNe]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._numFragments=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=qo}_write(t,o,a){if(this._opcode===8&&this._state==qo)return a();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){a(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=t.length,this._buffers.push(t),this.startLoop(a)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t=a.length?o.set(this._buffers.shift(),e):(o.set(new Uint8Array(a.buffer,a.byteOffset,t),e),this._buffers[0]=new iS(a.buffer,a.byteOffset+t,a.length-t)),t-=a.length}while(t>0);return o}startLoop(t){this._loop=!0;do switch(this._state){case qo:this.getInfo(t);break;case gW:this.getPayloadLength16(t);break;case cW:this.getPayloadLength64(t);break;case IW:this.getMask();break;case YR:this.getData(t);break;case jR:case aS:this._loop=!1;return}while(this._loop);this._errored||t()}getInfo(t){if(this._bufferedBytes<2){this._loop=!1;return}let o=this.consume(2);if((o[0]&48)!==0){let e=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");t(e);return}let a=(o[0]&64)===64;if(a&&!this._extensions[oW.extensionName]){let e=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(e);return}if(this._fin=(o[0]&128)===128,this._opcode=o[0]&15,this._payloadLength=o[1]&127,this._opcode===0){if(a){let e=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(e);return}if(!this._fragmented){let e=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");t(e);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let e=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(e);return}this._compressed=a}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let e=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");t(e);return}if(a){let e=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(e);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let e=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");t(e);return}}else{let e=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(e);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(o[1]&128)===128,this._isServer){if(!this._masked){let e=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");t(e);return}}else if(this._masked){let e=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");t(e);return}this._payloadLength===126?this._state=gW:this._payloadLength===127?this._state=cW:this.haveLength(t)}getPayloadLength16(t){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(t)}getPayloadLength64(t){if(this._bufferedBytes<8){this._loop=!1;return}let o=this.consume(8),a=o.readUInt32BE(0);if(a>Math.pow(2,21)-1){let e=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");t(e);return}this._payloadLength=a*Math.pow(2,32)+o.readUInt32BE(4),this.haveLength(t)}haveLength(t){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(o);return}this._masked?this._state=IW:this._state=YR}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=YR}getData(t){let o=nW;if(this._payloadLength){if(this._bufferedBytes7){this.controlMessage(o,t);return}if(this._maxFragments>0&&++this._numFragments>this._maxFragments){let a=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");t(a);return}if(this._compressed){this._state=jR,this.decompress(o,t);return}o.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(o)),this.dataMessage(t)}decompress(t,o){this._extensions[oW.extensionName].decompress(t,this._fin,(e,i)=>{if(e)return o(e);if(i.length){if(this._messageLength+=i.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let A=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");o(A);return}this._fragments.push(i)}this.dataMessage(o),this._state===qo&&this.startLoop(o)})}dataMessage(t){if(!this._fin){this._state=qo;return}let o=this._messageLength,a=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._numFragments=0,this._fragments=[],this._opcode===2){let e;this._binaryType==="nodebuffer"?e=xR(a,o):this._binaryType==="arraybuffer"?e=jNe(xR(a,o)):this._binaryType==="blob"?e=new Blob(a):e=a,this._allowSynchronousEvents?(this.emit("message",e,!0),this._state=qo):(this._state=aS,setImmediate(()=>{this.emit("message",e,!0),this._state=qo,this.startLoop(t)}))}else{let e=xR(a,o);if(!this._skipUTF8Validation&&!sW(e)){let i=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(i);return}this._state===jR||this._allowSynchronousEvents?(this.emit("message",e,!1),this._state=qo):(this._state=aS,setImmediate(()=>{this.emit("message",e,!1),this._state=qo,this.startLoop(t)}))}}controlMessage(t,o){if(this._opcode===8){if(t.length===0)this._loop=!1,this.emit("conclude",1005,nW),this.end();else{let a=t.readUInt16BE(0);if(!qNe(a)){let i=this.createError(RangeError,`invalid status code ${a}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");o(i);return}let e=new iS(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!sW(e)){let i=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");o(i);return}this._loop=!1,this.emit("conclude",a,e),this.end()}this._state=qo;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",t),this._state=qo):(this._state=aS,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",t),this._state=qo,this.startLoop(o)}))}createError(t,o,a,e,i){this._loop=!1,this._errored=!0;let A=new t(a?`Invalid WebSocket frame: ${o}`:o);return Error.captureStackTrace(A,this.createError),A.code=i,A[xNe]=e,A}};lW.exports=JR});var WR=ee((spA,hW)=>{"use strict";var{Duplex:npA}=$e("stream"),{randomFillSync:zNe}=$e("crypto"),{types:{isUint8Array:VNe}}=$e("util"),dW=$p(),{EMPTY_BUFFER:WNe,kWebSocket:ZNe,NOOP:XNe}=Fg(),{isBlob:Ah,isValidStatusCode:$Ne}=eh(),{mask:pW,toBuffer:bl}=mC(),zo=Symbol("kByteLength"),eRe=Buffer.alloc(4),oS=8*1024,Ml,th=oS,vn=0,ARe=1,tRe=2,zR=class n{constructor(t,o,a){this._extensions=o||{},a&&(this._generateMask=a,this._maskBuffer=Buffer.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=vn,this.onerror=XNe,this[ZNe]=void 0}static frame(t,o){let a,e=!1,i=2,A=!1;o.mask&&(a=o.maskBuffer||eRe,o.generateMask?o.generateMask(a):(th===oS&&(Ml===void 0&&(Ml=Buffer.alloc(oS)),zNe(Ml,0,oS),th=0),a[0]=Ml[th++],a[1]=Ml[th++],a[2]=Ml[th++],a[3]=Ml[th++]),A=(a[0]|a[1]|a[2]|a[3])===0,i=6);let r;typeof t=="string"?(!o.mask||A)&&o[zo]!==void 0?r=o[zo]:(t=Buffer.from(t),r=t.length):(r=t.length,e=o.mask&&o.readOnly&&!A);let s=r;r>=65536?(i+=8,s=127):r>125&&(i+=2,s=126);let g=Buffer.allocUnsafe(e?r+i:i);return g[0]=o.fin?o.opcode|128:o.opcode,o.rsv1&&(g[0]|=64),g[1]=s,s===126?g.writeUInt16BE(r,2):s===127&&(g[2]=g[3]=0,g.writeUIntBE(r,4,6)),o.mask?(g[1]|=128,g[i-4]=a[0],g[i-3]=a[1],g[i-2]=a[2],g[i-1]=a[3],A?[g,t]:e?(pW(t,a,g,i,r),[g]):(pW(t,a,t,0,r),[g,t])):[g,t]}close(t,o,a,e){let i;if(t===void 0)i=WNe;else{if(typeof t!="number"||!$Ne(t))throw new TypeError("First argument must be a valid error code number");if(o===void 0||!o.length)i=Buffer.allocUnsafe(2),i.writeUInt16BE(t,0);else{let r=Buffer.byteLength(o);if(r>123)throw new RangeError("The message must not be greater than 123 bytes");if(i=Buffer.allocUnsafe(2+r),i.writeUInt16BE(t,0),typeof o=="string")i.write(o,2);else if(VNe(o))i.set(o,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let A={[zo]:i.length,fin:!0,generateMask:this._generateMask,mask:a,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==vn?this.enqueue([this.dispatch,i,!1,A,e]):this.sendFrame(n.frame(i,A),e)}ping(t,o,a){let e,i;if(typeof t=="string"?(e=Buffer.byteLength(t),i=!1):Ah(t)?(e=t.size,i=!1):(t=bl(t),e=t.length,i=bl.readOnly),e>125)throw new RangeError("The data size must not be greater than 125 bytes");let A={[zo]:e,fin:!0,generateMask:this._generateMask,mask:o,maskBuffer:this._maskBuffer,opcode:9,readOnly:i,rsv1:!1};Ah(t)?this._state!==vn?this.enqueue([this.getBlobData,t,!1,A,a]):this.getBlobData(t,!1,A,a):this._state!==vn?this.enqueue([this.dispatch,t,!1,A,a]):this.sendFrame(n.frame(t,A),a)}pong(t,o,a){let e,i;if(typeof t=="string"?(e=Buffer.byteLength(t),i=!1):Ah(t)?(e=t.size,i=!1):(t=bl(t),e=t.length,i=bl.readOnly),e>125)throw new RangeError("The data size must not be greater than 125 bytes");let A={[zo]:e,fin:!0,generateMask:this._generateMask,mask:o,maskBuffer:this._maskBuffer,opcode:10,readOnly:i,rsv1:!1};Ah(t)?this._state!==vn?this.enqueue([this.getBlobData,t,!1,A,a]):this.getBlobData(t,!1,A,a):this._state!==vn?this.enqueue([this.dispatch,t,!1,A,a]):this.sendFrame(n.frame(t,A),a)}send(t,o,a){let e=this._extensions[dW.extensionName],i=o.binary?2:1,A=o.compress,r,s;typeof t=="string"?(r=Buffer.byteLength(t),s=!1):Ah(t)?(r=t.size,s=!1):(t=bl(t),r=t.length,s=bl.readOnly),this._firstFragment?(this._firstFragment=!1,A&&e&&e.params[e._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(A=r>=e._threshold),this._compress=A):(A=!1,i=0),o.fin&&(this._firstFragment=!0);let g={[zo]:r,fin:o.fin,generateMask:this._generateMask,mask:o.mask,maskBuffer:this._maskBuffer,opcode:i,readOnly:s,rsv1:A};Ah(t)?this._state!==vn?this.enqueue([this.getBlobData,t,this._compress,g,a]):this.getBlobData(t,this._compress,g,a):this._state!==vn?this.enqueue([this.dispatch,t,this._compress,g,a]):this.dispatch(t,this._compress,g,a)}getBlobData(t,o,a,e){this._bufferedBytes+=a[zo],this._state=tRe,t.arrayBuffer().then(i=>{if(this._socket.destroyed){let r=new Error("The socket was closed while the blob was being read");process.nextTick(VR,this,r,e);return}this._bufferedBytes-=a[zo];let A=bl(i);o?this.dispatch(A,o,a,e):(this._state=vn,this.sendFrame(n.frame(A,a),e),this.dequeue())}).catch(i=>{process.nextTick(rRe,this,i,e)})}dispatch(t,o,a,e){if(!o){this.sendFrame(n.frame(t,a),e);return}let i=this._extensions[dW.extensionName];this._bufferedBytes+=a[zo],this._state=ARe,i.compress(t,a.fin,(A,r)=>{if(this._socket.destroyed){let s=new Error("The socket was closed while data was being compressed");VR(this,s,e);return}this._bufferedBytes-=a[zo],this._state=vn,a.readOnly=!1,this.sendFrame(n.frame(r,a),e),this.dequeue()})}dequeue(){for(;this._state===vn&&this._queue.length;){let t=this._queue.shift();this._bufferedBytes-=t[3][zo],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][zo],this._queue.push(t)}sendFrame(t,o){t.length===2?(this._socket.cork(),this._socket.write(t[0]),this._socket.write(t[1],o),this._socket.uncork()):this._socket.write(t[0],o)}};hW.exports=zR;function VR(n,t,o){typeof o=="function"&&o(t);for(let a=0;a{"use strict";var{kForOnEventAttribute:wC,kListener:ZR}=Fg(),EW=Symbol("kCode"),uW=Symbol("kData"),CW=Symbol("kError"),BW=Symbol("kMessage"),fW=Symbol("kReason"),rh=Symbol("kTarget"),QW=Symbol("kType"),yW=Symbol("kWasClean"),Ug=class{constructor(t){this[rh]=null,this[QW]=t}get target(){return this[rh]}get type(){return this[QW]}};Object.defineProperty(Ug.prototype,"target",{enumerable:!0});Object.defineProperty(Ug.prototype,"type",{enumerable:!0});var _l=class extends Ug{constructor(t,o={}){super(t),this[EW]=o.code===void 0?0:o.code,this[fW]=o.reason===void 0?"":o.reason,this[yW]=o.wasClean===void 0?!1:o.wasClean}get code(){return this[EW]}get reason(){return this[fW]}get wasClean(){return this[yW]}};Object.defineProperty(_l.prototype,"code",{enumerable:!0});Object.defineProperty(_l.prototype,"reason",{enumerable:!0});Object.defineProperty(_l.prototype,"wasClean",{enumerable:!0});var ih=class extends Ug{constructor(t,o={}){super(t),this[CW]=o.error===void 0?null:o.error,this[BW]=o.message===void 0?"":o.message}get error(){return this[CW]}get message(){return this[BW]}};Object.defineProperty(ih.prototype,"error",{enumerable:!0});Object.defineProperty(ih.prototype,"message",{enumerable:!0});var DC=class extends Ug{constructor(t,o={}){super(t),this[uW]=o.data===void 0?null:o.data}get data(){return this[uW]}};Object.defineProperty(DC.prototype,"data",{enumerable:!0});var iRe={addEventListener(n,t,o={}){for(let e of this.listeners(n))if(!o[wC]&&e[ZR]===t&&!e[wC])return;let a;if(n==="message")a=function(i,A){let r=new DC("message",{data:A?i:i.toString()});r[rh]=this,nS(t,this,r)};else if(n==="close")a=function(i,A){let r=new _l("close",{code:i,reason:A.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[rh]=this,nS(t,this,r)};else if(n==="error")a=function(i){let A=new ih("error",{error:i,message:i.message});A[rh]=this,nS(t,this,A)};else if(n==="open")a=function(){let i=new Ug("open");i[rh]=this,nS(t,this,i)};else return;a[wC]=!!o[wC],a[ZR]=t,o.once?this.once(n,a):this.on(n,a)},removeEventListener(n,t){for(let o of this.listeners(n))if(o[ZR]===t&&!o[wC]){this.removeListener(n,o);break}}};mW.exports={CloseEvent:_l,ErrorEvent:ih,Event:Ug,EventTarget:iRe,MessageEvent:DC};function nS(n,t,o){typeof n=="object"&&n.handleEvent?n.handleEvent.call(n,o):n.call(t,o)}});var sS=ee((cpA,wW)=>{"use strict";var{tokenChars:OC}=eh();function Ts(n,t,o){n[t]===void 0?n[t]=[o]:n[t].push(o)}function aRe(n){let t=Object.create(null),o=Object.create(null),a=!1,e=!1,i=!1,A,r,s=-1,g=-1,c=-1,I=0;for(;I{let o=n[t];return Array.isArray(o)||(o=[o]),o.map(a=>[t].concat(Object.keys(a).map(e=>{let i=a[e];return Array.isArray(i)||(i=[i]),i.map(A=>A===!0?e:`${e}=${A}`).join("; ")})).join("; ")).join(", ")}).join(", ")}wW.exports={format:oRe,parse:aRe}});var lS=ee((dpA,GW)=>{"use strict";var nRe=$e("events"),sRe=$e("https"),gRe=$e("http"),bW=$e("net"),cRe=$e("tls"),{randomBytes:IRe,createHash:lRe}=$e("crypto"),{Duplex:IpA,Readable:lpA}=$e("stream"),{URL:XR}=$e("url"),jc=$p(),dRe=qR(),pRe=WR(),{isBlob:hRe}=eh(),{BINARY_TYPES:DW,CLOSE_TIMEOUT:ERe,EMPTY_BUFFER:gS,GUID:uRe,kForOnEventAttribute:$R,kListener:CRe,kStatusCode:BRe,kWebSocket:pi,NOOP:MW}=Fg(),{EventTarget:{addEventListener:fRe,removeEventListener:QRe}}=SW(),{format:yRe,parse:mRe}=sS(),{toBuffer:SRe}=mC(),_W=Symbol("kAborted"),ek=[8,13],Hg=["CONNECTING","OPEN","CLOSING","CLOSED"],wRe=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,ir=class n extends nRe{constructor(t,o,a){super(),this._binaryType=DW[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=gS,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=n.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,t!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,o===void 0?o=[]:Array.isArray(o)||(typeof o=="object"&&o!==null?(a=o,o=[]):o=[o]),TW(this,t,o,a)):(this._autoPong=a.autoPong,this._closeTimeout=a.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(t){DW.includes(t)&&(this._binaryType=t,this._receiver&&(this._receiver._binaryType=t))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,o,a){let e=new dRe({allowSynchronousEvents:a.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:a.maxBufferedChunks,maxFragments:a.maxFragments,maxPayload:a.maxPayload,skipUTF8Validation:a.skipUTF8Validation}),i=new pRe(t,this._extensions,a.generateMask);this._receiver=e,this._sender=i,this._socket=t,e[pi]=this,i[pi]=this,t[pi]=this,e.on("conclude",bRe),e.on("drain",MRe),e.on("error",_Re),e.on("message",TRe),e.on("ping",NRe),e.on("pong",RRe),i.onerror=kRe,t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),o.length>0&&t.unshift(o),t.on("close",kW),t.on("data",IS),t.on("end",vW),t.on("error",PW),this._readyState=n.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=n.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[jc.extensionName]&&this._extensions[jc.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=n.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,o){if(this.readyState!==n.CLOSED){if(this.readyState===n.CONNECTING){Eo(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===n.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=n.CLOSING,this._sender.close(t,o,!this._isServer,a=>{a||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),RW(this)}}pause(){this.readyState===n.CONNECTING||this.readyState===n.CLOSED||(this._paused=!0,this._socket.pause())}ping(t,o,a){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(a=t,t=o=void 0):typeof o=="function"&&(a=o,o=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==n.OPEN){Ak(this,t,a);return}o===void 0&&(o=!this._isServer),this._sender.ping(t||gS,o,a)}pong(t,o,a){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(a=t,t=o=void 0):typeof o=="function"&&(a=o,o=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==n.OPEN){Ak(this,t,a);return}o===void 0&&(o=!this._isServer),this._sender.pong(t||gS,o,a)}resume(){this.readyState===n.CONNECTING||this.readyState===n.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,o,a){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof o=="function"&&(a=o,o={}),typeof t=="number"&&(t=t.toString()),this.readyState!==n.OPEN){Ak(this,t,a);return}let e={binary:typeof t!="string",mask:!this._isServer,compress:!0,fin:!0,...o};this._extensions[jc.extensionName]||(e.compress=!1),this._sender.send(t||gS,e,a)}terminate(){if(this.readyState!==n.CLOSED){if(this.readyState===n.CONNECTING){Eo(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=n.CLOSING,this._socket.destroy())}}};Object.defineProperty(ir,"CONNECTING",{enumerable:!0,value:Hg.indexOf("CONNECTING")});Object.defineProperty(ir.prototype,"CONNECTING",{enumerable:!0,value:Hg.indexOf("CONNECTING")});Object.defineProperty(ir,"OPEN",{enumerable:!0,value:Hg.indexOf("OPEN")});Object.defineProperty(ir.prototype,"OPEN",{enumerable:!0,value:Hg.indexOf("OPEN")});Object.defineProperty(ir,"CLOSING",{enumerable:!0,value:Hg.indexOf("CLOSING")});Object.defineProperty(ir.prototype,"CLOSING",{enumerable:!0,value:Hg.indexOf("CLOSING")});Object.defineProperty(ir,"CLOSED",{enumerable:!0,value:Hg.indexOf("CLOSED")});Object.defineProperty(ir.prototype,"CLOSED",{enumerable:!0,value:Hg.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(n=>{Object.defineProperty(ir.prototype,n,{enumerable:!0})});["open","error","close","message"].forEach(n=>{Object.defineProperty(ir.prototype,`on${n}`,{enumerable:!0,get(){for(let t of this.listeners(n))if(t[$R])return t[CRe];return null},set(t){for(let o of this.listeners(n))if(o[$R]){this.removeListener(n,o);break}typeof t=="function"&&this.addEventListener(n,t,{[$R]:!0})}})});ir.prototype.addEventListener=fRe;ir.prototype.removeEventListener=QRe;GW.exports=ir;function TW(n,t,o,a){let e={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:ERe,protocolVersion:ek[1],maxBufferedChunks:262144,maxFragments:16384,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...a,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(n._autoPong=e.autoPong,n._closeTimeout=e.closeTimeout,!ek.includes(e.protocolVersion))throw new RangeError(`Unsupported protocol version: ${e.protocolVersion} (supported versions: ${ek.join(", ")})`);let i;if(t instanceof XR)i=t;else try{i=new XR(t)}catch{throw new SyntaxError(`Invalid URL: ${t}`)}i.protocol==="http:"?i.protocol="ws:":i.protocol==="https:"&&(i.protocol="wss:"),n._url=i.href;let A=i.protocol==="wss:",r=i.protocol==="ws+unix:",s;if(i.protocol!=="ws:"&&!A&&!r?s=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:r&&!i.pathname?s="The URL's pathname is empty":i.hash&&(s="The URL contains a fragment identifier"),s){let Q=new SyntaxError(s);if(n._redirects===0)throw Q;cS(n,Q);return}let g=A?443:80,c=IRe(16).toString("base64"),I=A?sRe.request:gRe.request,d=new Set,B;if(e.createConnection=e.createConnection||(A?ORe:DRe),e.defaultPort=e.defaultPort||g,e.port=i.port||g,e.host=i.hostname.startsWith("[")?i.hostname.slice(1,-1):i.hostname,e.headers={...e.headers,"Sec-WebSocket-Version":e.protocolVersion,"Sec-WebSocket-Key":c,Connection:"Upgrade",Upgrade:"websocket"},e.path=i.pathname+i.search,e.timeout=e.handshakeTimeout,e.perMessageDeflate&&(B=new jc({...e.perMessageDeflate,isServer:!1,maxPayload:e.maxPayload}),e.headers["Sec-WebSocket-Extensions"]=yRe({[jc.extensionName]:B.offer()})),o.length){for(let Q of o){if(typeof Q!="string"||!wRe.test(Q)||d.has(Q))throw new SyntaxError("An invalid or duplicated subprotocol was specified");d.add(Q)}e.headers["Sec-WebSocket-Protocol"]=o.join(",")}if(e.origin&&(e.protocolVersion<13?e.headers["Sec-WebSocket-Origin"]=e.origin:e.headers.Origin=e.origin),(i.username||i.password)&&(e.auth=`${i.username}:${i.password}`),r){let Q=e.path.split(":");e.socketPath=Q[0],e.path=Q[1]}let f;if(e.followRedirects){if(n._redirects===0){n._originalIpc=r,n._originalSecure=A,n._originalHostOrSocketPath=r?e.socketPath:i.host;let Q=a&&a.headers;if(a={...a,headers:{}},Q)for(let[y,m]of Object.entries(Q))a.headers[y.toLowerCase()]=m}else if(n.listenerCount("redirect")===0){let Q=r?n._originalIpc?e.socketPath===n._originalHostOrSocketPath:!1:n._originalIpc?!1:i.host===n._originalHostOrSocketPath;(!Q||n._originalSecure&&!A)&&(delete e.headers.authorization,delete e.headers.cookie,Q||delete e.headers.host,e.auth=void 0)}e.auth&&!a.headers.authorization&&(a.headers.authorization="Basic "+Buffer.from(e.auth).toString("base64")),f=n._req=I(e),n._redirects&&n.emit("redirect",n.url,f)}else f=n._req=I(e);e.timeout&&f.on("timeout",()=>{Eo(n,f,"Opening handshake has timed out")}),f.on("error",Q=>{f===null||f[_W]||(f=n._req=null,cS(n,Q))}),f.on("response",Q=>{let y=Q.headers.location,m=Q.statusCode;if(y&&e.followRedirects&&m>=300&&m<400){if(++n._redirects>e.maxRedirects){Eo(n,f,"Maximum redirects exceeded");return}f.abort();let _;try{_=new XR(y,t)}catch{let R=new SyntaxError(`Invalid URL: ${y}`);cS(n,R);return}TW(n,_,o,a)}else n.emit("unexpected-response",f,Q)||Eo(n,f,`Unexpected server response: ${Q.statusCode}`)}),f.on("upgrade",(Q,y,m)=>{if(n.emit("upgrade",Q),n.readyState!==ir.CONNECTING)return;f=n._req=null;let _=Q.headers.upgrade;if(_===void 0||_.toLowerCase()!=="websocket"){Eo(n,y,"Invalid Upgrade header");return}let T=lRe("sha1").update(c+uRe).digest("base64");if(Q.headers["sec-websocket-accept"]!==T){Eo(n,y,"Invalid Sec-WebSocket-Accept header");return}let R=Q.headers["sec-websocket-protocol"],L;if(R!==void 0?d.size?d.has(R)||(L="Server sent an invalid subprotocol"):L="Server sent a subprotocol but none was requested":d.size&&(L="Server sent no subprotocol"),L){Eo(n,y,L);return}R&&(n._protocol=R);let U=Q.headers["sec-websocket-extensions"];if(U!==void 0){if(!B){Eo(n,y,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let F;try{F=mRe(U)}catch{Eo(n,y,"Invalid Sec-WebSocket-Extensions header");return}let J=Object.keys(F);if(J.length!==1||J[0]!==jc.extensionName){Eo(n,y,"Server indicated an extension that was not requested");return}try{B.accept(F[jc.extensionName])}catch{Eo(n,y,"Invalid Sec-WebSocket-Extensions header");return}n._extensions[jc.extensionName]=B}n.setSocket(y,m,{allowSynchronousEvents:e.allowSynchronousEvents,generateMask:e.generateMask,maxBufferedChunks:e.maxBufferedChunks,maxFragments:e.maxFragments,maxPayload:e.maxPayload,skipUTF8Validation:e.skipUTF8Validation})}),e.finishRequest?e.finishRequest(f,n):f.end()}function cS(n,t){n._readyState=ir.CLOSING,n._errorEmitted=!0,n.emit("error",t),n.emitClose()}function DRe(n){return n.path=n.socketPath,bW.connect(n)}function ORe(n){return n.path=void 0,!n.servername&&n.servername!==""&&(n.servername=bW.isIP(n.host)?"":n.host),cRe.connect(n)}function Eo(n,t,o){n._readyState=ir.CLOSING;let a=new Error(o);Error.captureStackTrace(a,Eo),t.setHeader?(t[_W]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(cS,n,a)):(t.destroy(a),t.once("error",n.emit.bind(n,"error")),t.once("close",n.emitClose.bind(n)))}function Ak(n,t,o){if(t){let a=hRe(t)?t.size:SRe(t).length;n._socket?n._sender._bufferedBytes+=a:n._bufferedAmount+=a}if(o){let a=new Error(`WebSocket is not open: readyState ${n.readyState} (${Hg[n.readyState]})`);process.nextTick(o,a)}}function bRe(n,t){let o=this[pi];o._closeFrameReceived=!0,o._closeMessage=t,o._closeCode=n,o._socket[pi]!==void 0&&(o._socket.removeListener("data",IS),process.nextTick(NW,o._socket),n===1005?o.close():o.close(n,t))}function MRe(){let n=this[pi];n.isPaused||n._socket.resume()}function _Re(n){let t=this[pi];t._socket[pi]!==void 0&&(t._socket.removeListener("data",IS),process.nextTick(NW,t._socket),t.close(n[BRe])),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",n))}function OW(){this[pi].emitClose()}function TRe(n,t){this[pi].emit("message",n,t)}function NRe(n){let t=this[pi];t._autoPong&&t.pong(n,!this._isServer,MW),t.emit("ping",n)}function RRe(n){this[pi].emit("pong",n)}function NW(n){n.resume()}function kRe(n){let t=this[pi];t.readyState!==ir.CLOSED&&(t.readyState===ir.OPEN&&(t._readyState=ir.CLOSING,RW(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",n)))}function RW(n){n._closeTimer=setTimeout(n._socket.destroy.bind(n._socket),n._closeTimeout)}function kW(){let n=this[pi];if(this.removeListener("close",kW),this.removeListener("data",IS),this.removeListener("end",vW),n._readyState=ir.CLOSING,!this._readableState.endEmitted&&!n._closeFrameReceived&&!n._receiver._writableState.errorEmitted&&this._readableState.length!==0){let t=this.read(this._readableState.length);n._receiver.write(t)}n._receiver.end(),this[pi]=void 0,clearTimeout(n._closeTimer),n._receiver._writableState.finished||n._receiver._writableState.errorEmitted?n.emitClose():(n._receiver.on("error",OW),n._receiver.on("finish",OW))}function IS(n){this[pi]._receiver.write(n)||this.pause()}function vW(){let n=this[pi];n._readyState=ir.CLOSING,n._receiver.end(),this.end()}function PW(){let n=this[pi];this.removeListener("error",PW),this.on("error",MW),n&&(n._readyState=ir.CLOSING,this.destroy())}});var HW=ee((hpA,UW)=>{"use strict";var ppA=lS(),{Duplex:vRe}=$e("stream");function FW(n){n.emit("close")}function PRe(){!this.destroyed&&this._writableState.finished&&this.destroy()}function LW(n){this.removeListener("error",LW),this.destroy(),this.listenerCount("error")===0&&this.emit("error",n)}function GRe(n,t){let o=!0,a=new vRe({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return n.on("message",function(i,A){let r=!A&&a._readableState.objectMode?i.toString():i;a.push(r)||n.pause()}),n.once("error",function(i){a.destroyed||(o=!1,a.destroy(i))}),n.once("close",function(){a.destroyed||a.push(null)}),a._destroy=function(e,i){if(n.readyState===n.CLOSED){i(e),process.nextTick(FW,a);return}let A=!1;n.once("error",function(s){A=!0,i(s)}),n.once("close",function(){A||i(e),process.nextTick(FW,a)}),o&&n.terminate()},a._final=function(e){if(n.readyState===n.CONNECTING){n.once("open",function(){a._final(e)});return}n._socket!==null&&(n._socket._writableState.finished?(e(),a._readableState.endEmitted&&a.destroy()):(n._socket.once("finish",function(){e()}),n.close()))},a._read=function(){n.isPaused&&n.resume()},a._write=function(e,i,A){if(n.readyState===n.CONNECTING){n.once("open",function(){a._write(e,i,A)});return}n.send(e,A)},a.on("end",PRe),a.on("error",LW),a}UW.exports=GRe});var tk=ee((EpA,KW)=>{"use strict";var{tokenChars:FRe}=eh();function LRe(n){let t=new Set,o=-1,a=-1,e=0;for(e;e{"use strict";var URe=$e("events"),dS=$e("http"),{Duplex:upA}=$e("stream"),{createHash:HRe}=$e("crypto"),xW=sS(),Tl=$p(),KRe=tk(),xRe=lS(),{CLOSE_TIMEOUT:YRe,GUID:jRe,kWebSocket:JRe}=Fg(),qRe=/^[+/0-9A-Za-z]{22}==$/,YW=0,jW=1,qW=2,rk=class extends URe{constructor(t,o){if(super(),t={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:256*1024,maxFragments:16*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:YRe,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:xRe,...t},t.port==null&&!t.server&&!t.noServer||t.port!=null&&(t.server||t.noServer)||t.server&&t.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(t.port!=null?(this._server=dS.createServer((a,e)=>{let i=dS.STATUS_CODES[426];e.writeHead(426,{"Content-Length":i.length,"Content-Type":"text/plain"}),e.end(i)}),this._server.listen(t.port,t.host,t.backlog,o)):t.server&&(this._server=t.server),this._server){let a=this.emit.bind(this,"connection");this._removeListeners=zRe(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(e,i,A)=>{this.handleUpgrade(e,i,A,a)}})}t.perMessageDeflate===!0&&(t.perMessageDeflate={}),t.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=t,this._state=YW}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(t){if(this._state===qW){t&&this.once("close",()=>{t(new Error("The server is not running"))}),process.nextTick(bC,this);return}if(t&&this.once("close",t),this._state!==jW)if(this._state=jW,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(bC,this):process.nextTick(bC,this);else{let o=this._server;this._removeListeners(),this._removeListeners=this._server=null,o.close(()=>{bC(this)})}}shouldHandle(t){if(this.options.path){let o=t.url.indexOf("?");if((o!==-1?t.url.slice(0,o):t.url)!==this.options.path)return!1}return!0}handleUpgrade(t,o,a,e){o.on("error",JW);let i=t.headers["sec-websocket-key"],A=t.headers.upgrade,r=+t.headers["sec-websocket-version"];if(t.method!=="GET"){Nl(this,t,o,405,"Invalid HTTP method");return}if(A===void 0||A.toLowerCase()!=="websocket"){Nl(this,t,o,400,"Invalid Upgrade header");return}if(i===void 0||!qRe.test(i)){Nl(this,t,o,400,"Missing or invalid Sec-WebSocket-Key header");return}if(r!==13&&r!==8){Nl(this,t,o,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(t)){MC(o,400);return}let s=t.headers["sec-websocket-protocol"],g=new Set;if(s!==void 0)try{g=KRe.parse(s)}catch{Nl(this,t,o,400,"Invalid Sec-WebSocket-Protocol header");return}let c=t.headers["sec-websocket-extensions"],I={};if(this.options.perMessageDeflate&&c!==void 0){let d=new Tl({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let B=xW.parse(c);B[Tl.extensionName]&&(d.accept(B[Tl.extensionName]),I[Tl.extensionName]=d)}catch{Nl(this,t,o,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let d={origin:t.headers[`${r===8?"sec-websocket-origin":"origin"}`],secure:!!(t.socket.authorized||t.socket.encrypted),req:t};if(this.options.verifyClient.length===2){this.options.verifyClient(d,(B,f,Q,y)=>{if(!B)return MC(o,f||401,Q,y);this.completeUpgrade(I,i,g,t,o,a,e)});return}if(!this.options.verifyClient(d))return MC(o,401)}this.completeUpgrade(I,i,g,t,o,a,e)}completeUpgrade(t,o,a,e,i,A,r){if(!i.readable||!i.writable)return i.destroy();if(i[JRe])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>YW)return MC(i,503);let g=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${HRe("sha1").update(o+jRe).digest("base64")}`],c=new this.options.WebSocket(null,void 0,this.options);if(a.size){let I=this.options.handleProtocols?this.options.handleProtocols(a,e):a.values().next().value;I&&(g.push(`Sec-WebSocket-Protocol: ${I}`),c._protocol=I)}if(t[Tl.extensionName]){let I=t[Tl.extensionName].params,d=xW.format({[Tl.extensionName]:[I]});g.push(`Sec-WebSocket-Extensions: ${d}`),c._extensions=t}this.emit("headers",g,e),i.write(g.concat(`\r `).join(`\r -`)),i.removeListener("error",xW),c.setSocket(i,A,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(c),c.on("close",()=>{this.clients.delete(c),this._shouldEmitClose&&!this.clients.size&&process.nextTick(bC,this)})),r(c,e)}};jW.exports=rk;function xRe(n,t){for(let o of Object.keys(t))n.on(o,t[o]);return function(){for(let a of Object.keys(t))n.removeListener(a,t[a])}}function bC(n){n._state=YW,n.emit("close")}function xW(){this.destroy()}function MC(n,t,o,a){o=o||lS.STATUS_CODES[t],a={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(o),...a},n.once("finish",n.destroy),n.end(`HTTP/1.1 ${t} ${lS.STATUS_CODES[t]}\r +`)),i.removeListener("error",JW),c.setSocket(i,A,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(c),c.on("close",()=>{this.clients.delete(c),this._shouldEmitClose&&!this.clients.size&&process.nextTick(bC,this)})),r(c,e)}};zW.exports=rk;function zRe(n,t){for(let o of Object.keys(t))n.on(o,t[o]);return function(){for(let a of Object.keys(t))n.removeListener(a,t[a])}}function bC(n){n._state=qW,n.emit("close")}function JW(){this.destroy()}function MC(n,t,o,a){o=o||dS.STATUS_CODES[t],a={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(o),...a},n.once("finish",n.destroy),n.end(`HTTP/1.1 ${t} ${dS.STATUS_CODES[t]}\r `+Object.keys(a).map(e=>`${e}: ${a[e]}`).join(`\r `)+`\r \r -`+o)}function Nl(n,t,o,a,e,i){if(n.listenerCount("wsClientError")){let A=new Error(e);Error.captureStackTrace(A,Nl),n.emit("wsClientError",A,o,t)}else MC(o,a,e,i)}});var VW=ee((lpA,zW)=>{"use strict";zW.exports=ZRe;function ZRe(n,t){for(var o=new Array(arguments.length-1),a=0,e=2,i=!0;e{"use strict";var dS=XW;dS.length=function(t){var o=t.length;if(!o)return 0;for(var a=0;--o%4>1&&t.charAt(o)==="=";)++a;return Math.ceil(t.length*3)/4-a};var ah=new Array(64),ZW=new Array(123);for(Pn=0;Pn<64;)ZW[ah[Pn]=Pn<26?Pn+65:Pn<52?Pn+71:Pn<62?Pn-4:Pn-59|43]=Pn++;var Pn;dS.encode=function(t,o,a){for(var e=null,i=[],A=0,r=0,s;o>2],s=(g&3)<<4,r=1;break;case 1:i[A++]=ah[s|g>>4],s=(g&15)<<2,r=2;break;case 2:i[A++]=ah[s|g>>6],i[A++]=ah[g&63],r=0;break}A>8191&&((e||(e=[])).push(String.fromCharCode.apply(String,i)),A=0)}return r&&(i[A++]=ah[s],i[A++]=61,r===1&&(i[A++]=61)),e?(A&&e.push(String.fromCharCode.apply(String,i.slice(0,A))),e.join("")):String.fromCharCode.apply(String,i.slice(0,A))};var WW="invalid encoding";dS.decode=function(t,o,a){for(var e=a,i=0,A,r=0;r1)break;if((s=ZW[s])===void 0)throw Error(WW);switch(i){case 0:A=s,i=1;break;case 1:o[a++]=A<<2|(s&48)>>4,A=s,i=2;break;case 2:o[a++]=(A&15)<<4|(s&60)>>2,A=s,i=3;break;case 3:o[a++]=(A&3)<<6|s,i=0;break}}if(i===1)throw Error(WW);return a-e};dS.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}});var A6=ee((ppA,e6)=>{"use strict";e6.exports=pS;function pS(){this._listeners=Object.create(null)}pS.prototype.on=function(t,o,a){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:o,ctx:a||this}),this};pS.prototype.off=function(t,o){if(t===void 0)this._listeners=Object.create(null);else if(o===void 0)this._listeners[t]=[];else{var a=this._listeners[t];if(!a)return this;for(var e=0;e{"use strict";n6.exports=t6(t6);function t6(n){return typeof Float32Array<"u"?(function(){var t=new Float32Array([-0]),o=new Uint8Array(t.buffer),a=o[3]===128;function e(s,g,c){t[0]=s,g[c]=o[0],g[c+1]=o[1],g[c+2]=o[2],g[c+3]=o[3]}function i(s,g,c){t[0]=s,g[c]=o[3],g[c+1]=o[2],g[c+2]=o[1],g[c+3]=o[0]}n.writeFloatLE=a?e:i,n.writeFloatBE=a?i:e;function A(s,g){return o[0]=s[g],o[1]=s[g+1],o[2]=s[g+2],o[3]=s[g+3],t[0]}function r(s,g){return o[3]=s[g],o[2]=s[g+1],o[1]=s[g+2],o[0]=s[g+3],t[0]}n.readFloatLE=a?A:r,n.readFloatBE=a?r:A})():(function(){function t(a,e,i,A){var r=e<0?1:0;if(r&&(e=-e),e===0)a(1/e>0?0:2147483648,i,A);else if(isNaN(e))a(2143289344,i,A);else if(e>34028234663852886e22)a((r<<31|2139095040)>>>0,i,A);else if(e<11754943508222875e-54)a((r<<31|Math.round(e/1401298464324817e-60))>>>0,i,A);else{var s=Math.floor(Math.log(e)/Math.LN2),g=Math.round(e*Math.pow(2,-s)*8388608)&8388607;a((r<<31|s+127<<23|g)>>>0,i,A)}}n.writeFloatLE=t.bind(null,r6),n.writeFloatBE=t.bind(null,i6);function o(a,e,i){var A=a(e,i),r=(A>>31)*2+1,s=A>>>23&255,g=A&8388607;return s===255?g?NaN:r*(1/0):s===0?r*1401298464324817e-60*g:r*Math.pow(2,s-150)*(g+8388608)}n.readFloatLE=o.bind(null,a6),n.readFloatBE=o.bind(null,o6)})(),typeof Float64Array<"u"?(function(){var t=new Float64Array([-0]),o=new Uint8Array(t.buffer),a=o[7]===128;function e(s,g,c){t[0]=s,g[c]=o[0],g[c+1]=o[1],g[c+2]=o[2],g[c+3]=o[3],g[c+4]=o[4],g[c+5]=o[5],g[c+6]=o[6],g[c+7]=o[7]}function i(s,g,c){t[0]=s,g[c]=o[7],g[c+1]=o[6],g[c+2]=o[5],g[c+3]=o[4],g[c+4]=o[3],g[c+5]=o[2],g[c+6]=o[1],g[c+7]=o[0]}n.writeDoubleLE=a?e:i,n.writeDoubleBE=a?i:e;function A(s,g){return o[0]=s[g],o[1]=s[g+1],o[2]=s[g+2],o[3]=s[g+3],o[4]=s[g+4],o[5]=s[g+5],o[6]=s[g+6],o[7]=s[g+7],t[0]}function r(s,g){return o[7]=s[g],o[6]=s[g+1],o[5]=s[g+2],o[4]=s[g+3],o[3]=s[g+4],o[2]=s[g+5],o[1]=s[g+6],o[0]=s[g+7],t[0]}n.readDoubleLE=a?A:r,n.readDoubleBE=a?r:A})():(function(){function t(a,e,i,A,r,s){var g=A<0?1:0;if(g&&(A=-A),A===0)a(0,r,s+e),a(1/A>0?0:2147483648,r,s+i);else if(isNaN(A))a(0,r,s+e),a(2146959360,r,s+i);else if(A>17976931348623157e292)a(0,r,s+e),a((g<<31|2146435072)>>>0,r,s+i);else{var c;if(A<22250738585072014e-324)c=A/5e-324,a(c>>>0,r,s+e),a((g<<31|c/4294967296)>>>0,r,s+i);else{var I=Math.floor(Math.log(A)/Math.LN2);I===1024&&(I=1023),c=A*Math.pow(2,-I),a(c*4503599627370496>>>0,r,s+e),a((g<<31|I+1023<<20|c*1048576&1048575)>>>0,r,s+i)}}}n.writeDoubleLE=t.bind(null,r6,0,4),n.writeDoubleBE=t.bind(null,i6,4,0);function o(a,e,i,A,r){var s=a(A,r+e),g=a(A,r+i),c=(g>>31)*2+1,I=g>>>20&2047,d=4294967296*(g&1048575)+s;return I===2047?d?NaN:c*(1/0):I===0?c*5e-324*d:c*Math.pow(2,I-1075)*(d+4503599627370496)}n.readDoubleLE=o.bind(null,a6,0,4),n.readDoubleBE=o.bind(null,o6,4,0)})(),n}function r6(n,t,o){t[o]=n&255,t[o+1]=n>>>8&255,t[o+2]=n>>>16&255,t[o+3]=n>>>24}function i6(n,t,o){t[o]=n>>>24,t[o+1]=n>>>16&255,t[o+2]=n>>>8&255,t[o+3]=n&255}function a6(n,t){return(n[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24)>>>0}function o6(n,t){return(n[t]<<24|n[t+1]<<16|n[t+2]<<8|n[t+3])>>>0}});var c6=ee(g6=>{"use strict";var ak=g6,ik=65533;ak.length=function(t){for(var o=0,a=0,e=0;e=192&&r<224?(g=(r&31)<<6|t[o++]&63,i[A++]=g>=128?g:ik):r>=224&&r<240?(c=(r&15)<<12|(t[o++]&63)<<6|t[o++]&63,i[A++]=c>=2048?c:ik):r>=240&&(s=(r&7)<<18|(t[o++]&63)<<12|(t[o++]&63)<<6|t[o++]&63,s<65536||s>1114111?i[A++]=ik:(s-=65536,i[A++]=55296+(s>>10),i[A++]=56320+(s&1023))),A>8191&&((e||(e=[])).push(String.fromCharCode.apply(String,i.slice(0,A))),A=0);return e?(A&&e.push(String.fromCharCode.apply(String,i.slice(0,A))),e.join("")):String.fromCharCode.apply(String,i.slice(0,A))};ak.write=function(t,o,a){for(var e=a,i,A,r=0;r>6|192,o[a++]=i&63|128):(i&64512)===55296&&((A=t.charCodeAt(r+1))&64512)===56320?(i=65536+((i&1023)<<10)+(A&1023),++r,o[a++]=i>>18|240,o[a++]=i>>12&63|128,o[a++]=i>>6&63|128,o[a++]=i&63|128):(o[a++]=i>>12|224,o[a++]=i>>6&63|128,o[a++]=i&63|128);return a-e}});var l6=ee((upA,I6)=>{"use strict";I6.exports=XRe;function XRe(n,t,o){var a=o||8192,e=a>>>1,i=null,A=a;return function(s){if(s<1||s>e)return n(s);A+s>a&&(i=n(a),A=0);var g=t.call(i,A,A+=s);return A&7&&(A=(A|7)+1),g}}});var p6=ee((CpA,d6)=>{"use strict";d6.exports=hi;var _C=Jc();function hi(n,t){this.lo=n>>>0,this.hi=t>>>0}var Rl=hi.zero=new hi(0,0);Rl.toNumber=function(){return 0};Rl.zzEncode=Rl.zzDecode=function(){return this};Rl.length=function(){return 1};var $Re=hi.zeroHash="\0\0\0\0\0\0\0\0";hi.fromNumber=function(t){if(t===0)return Rl;var o=t<0;o&&(t=-t);var a=t>>>0,e=(t-a)/4294967296>>>0;return o&&(e=~e>>>0,a=~a>>>0,++a>4294967295&&(a=0,++e>4294967295&&(e=0))),new hi(a,e)};hi.from=function(t){if(typeof t=="number")return hi.fromNumber(t);if(_C.isString(t))if(_C.Long)t=_C.Long.fromString(t);else return hi.fromNumber(parseInt(t,10));return t.low||t.high?new hi(t.low>>>0,t.high>>>0):Rl};hi.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var o=~this.lo+1>>>0,a=~this.hi>>>0;return o||(a=a+1>>>0),-(o+a*4294967296)}return this.lo+this.hi*4294967296};hi.prototype.toLong=function(t){return _C.Long?new _C.Long(this.lo|0,this.hi|0,!!t):{low:this.lo|0,high:this.hi|0,unsigned:!!t}};var jc=String.prototype.charCodeAt;hi.fromHash=function(t){return t===$Re?Rl:new hi((jc.call(t,0)|jc.call(t,1)<<8|jc.call(t,2)<<16|jc.call(t,3)<<24)>>>0,(jc.call(t,4)|jc.call(t,5)<<8|jc.call(t,6)<<16|jc.call(t,7)<<24)>>>0)};hi.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};hi.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this};hi.prototype.zzDecode=function(){var t=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this};hi.prototype.length=function(){var t=this.lo,o=(this.lo>>>28|this.hi<<4)>>>0,a=this.hi>>>24;return a===0?o===0?t<16384?t<128?1:2:t<2097152?3:4:o<16384?o<128?5:6:o<2097152?7:8:a<128?9:10}});var h6=ee((TC,ok)=>{(function(n,t){function o(a){return a.default||a}typeof define=="function"&&define.amd?define([],function(){var a={};return t(a),o(a)}):typeof TC=="object"?(t(TC),typeof ok=="object"&&(ok.exports=o(TC))):(function(){var a={};t(a),n.Long=o(a)})()})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:TC,function(n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function o(H,N,k){this.low=H|0,this.high=N|0,this.unsigned=!!k}o.prototype.__isLong__,Object.defineProperty(o.prototype,"__isLong__",{value:!0});function a(H){return(H&&H.__isLong__)===!0}function e(H){var N=Math.clz32(H&-H);return H?31-N:N}o.isLong=a;var i={},A={};function r(H,N){var k,q,X;return N?(H>>>=0,(X=0<=H&&H<256)&&(q=A[H],q)?q:(k=g(H,0,!0),X&&(A[H]=k),k)):(H|=0,(X=-128<=H&&H<128)&&(q=i[H],q)?q:(k=g(H,H<0?-1:0,!1),X&&(i[H]=k),k))}o.fromInt=r;function s(H,N){if(isNaN(H))return N?R:T;if(N){if(H<0)return R;if(H>=y)return J}else{if(H<=-m)return K;if(H+1>=m)return z}return H<0?s(-H,N).neg():g(H%Q|0,H/Q|0,N)}o.fromNumber=s;function g(H,N,k){return new o(H,N,k)}o.fromBits=g;var c=Math.pow;function I(H,N,k){if(H.length===0)throw Error("empty string");if(typeof N=="number"?(k=N,N=!1):N=!!N,H==="NaN"||H==="Infinity"||H==="+Infinity"||H==="-Infinity")return N?R:T;if(k=k||10,k<2||360)throw Error("interior hyphen");if(q===0)return I(H.substring(1),N,k).neg();for(var X=s(c(k,8)),ie=T,De=0;De>>0:this.low},G.toNumber=function(){return this.unsigned?(this.high>>>0)*Q+(this.low>>>0):this.high*Q+(this.low>>>0)},G.toString=function(N){if(N=N||10,N<2||36>>0,Re=Be.toString(N);if(De=Se,De.isZero())return Re+oe;for(;Re.length<6;)Re="0"+Re;oe=""+Re+oe}},G.getHighBits=function(){return this.high},G.getHighBitsUnsigned=function(){return this.high>>>0},G.getLowBits=function(){return this.low},G.getLowBitsUnsigned=function(){return this.low>>>0},G.getNumBitsAbs=function(){if(this.isNegative())return this.eq(K)?64:this.neg().getNumBitsAbs();for(var N=this.high!=0?this.high:this.low,k=31;k>0&&(N&1<>21;return N?this.unsigned?!1:N===-1&&!(this.low===0&&this.high===-2097152):!0},G.isZero=function(){return this.high===0&&this.low===0},G.eqz=G.isZero,G.isNegative=function(){return!this.unsigned&&this.high<0},G.isPositive=function(){return this.unsigned||this.high>=0},G.isOdd=function(){return(this.low&1)===1},G.isEven=function(){return(this.low&1)===0},G.equals=function(N){return a(N)||(N=d(N)),this.unsigned!==N.unsigned&&this.high>>>31===1&&N.high>>>31===1?!1:this.high===N.high&&this.low===N.low},G.eq=G.equals,G.notEquals=function(N){return!this.eq(N)},G.neq=G.notEquals,G.ne=G.notEquals,G.lessThan=function(N){return this.comp(N)<0},G.lt=G.lessThan,G.lessThanOrEqual=function(N){return this.comp(N)<=0},G.lte=G.lessThanOrEqual,G.le=G.lessThanOrEqual,G.greaterThan=function(N){return this.comp(N)>0},G.gt=G.greaterThan,G.greaterThanOrEqual=function(N){return this.comp(N)>=0},G.gte=G.greaterThanOrEqual,G.ge=G.greaterThanOrEqual,G.compare=function(N){if(a(N)||(N=d(N)),this.eq(N))return 0;var k=this.isNegative(),q=N.isNegative();return k&&!q?-1:!k&&q?1:this.unsigned?N.high>>>0>this.high>>>0||N.high===this.high&&N.low>>>0>this.low>>>0?-1:1:this.sub(N).isNegative()?-1:1},G.comp=G.compare,G.negate=function(){return!this.unsigned&&this.eq(K)?K:this.not().add(L)},G.neg=G.negate,G.add=function(N){a(N)||(N=d(N));var k=this.high>>>16,q=this.high&65535,X=this.low>>>16,ie=this.low&65535,De=N.high>>>16,oe=N.high&65535,Se=N.low>>>16,Be=N.low&65535,Re=0,Ne=0,Je=0,ve=0;return ve+=ie+Be,Je+=ve>>>16,ve&=65535,Je+=X+Se,Ne+=Je>>>16,Je&=65535,Ne+=q+oe,Re+=Ne>>>16,Ne&=65535,Re+=k+De,Re&=65535,g(Je<<16|ve,Re<<16|Ne,this.unsigned)},G.subtract=function(N){return a(N)||(N=d(N)),this.add(N.neg())},G.sub=G.subtract,G.multiply=function(N){if(this.isZero())return this;if(a(N)||(N=d(N)),t){var k=t.mul(this.low,this.high,N.low,N.high);return g(k,t.get_high(),this.unsigned)}if(N.isZero())return this.unsigned?R:T;if(this.eq(K))return N.isOdd()?K:T;if(N.eq(K))return this.isOdd()?K:T;if(this.isNegative())return N.isNegative()?this.neg().mul(N.neg()):this.neg().mul(N).neg();if(N.isNegative())return this.mul(N.neg()).neg();if(this.lt(_)&&N.lt(_))return s(this.toNumber()*N.toNumber(),this.unsigned);var q=this.high>>>16,X=this.high&65535,ie=this.low>>>16,De=this.low&65535,oe=N.high>>>16,Se=N.high&65535,Be=N.low>>>16,Re=N.low&65535,Ne=0,Je=0,ve=0,tA=0;return tA+=De*Re,ve+=tA>>>16,tA&=65535,ve+=ie*Re,Je+=ve>>>16,ve&=65535,ve+=De*Be,Je+=ve>>>16,ve&=65535,Je+=X*Re,Ne+=Je>>>16,Je&=65535,Je+=ie*Be,Ne+=Je>>>16,Je&=65535,Je+=De*Se,Ne+=Je>>>16,Je&=65535,Ne+=q*Re+X*Be+ie*Se+De*oe,Ne&=65535,g(ve<<16|tA,Ne<<16|Je,this.unsigned)},G.mul=G.multiply,G.divide=function(N){if(a(N)||(N=d(N)),N.isZero())throw Error("division by zero");if(t){if(!this.unsigned&&this.high===-2147483648&&N.low===-1&&N.high===-1)return this;var k=(this.unsigned?t.div_u:t.div_s)(this.low,this.high,N.low,N.high);return g(k,t.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?R:T;var q,X,ie;if(this.unsigned){if(N.unsigned||(N=N.toUnsigned()),N.gt(this))return R;if(N.gt(this.shru(1)))return U;ie=R}else{if(this.eq(K)){if(N.eq(L)||N.eq(F))return K;if(N.eq(K))return L;var De=this.shr(1);return q=De.div(N).shl(1),q.eq(T)?N.isNegative()?L:F:(X=this.sub(N.mul(q)),ie=q.add(X.div(N)),ie)}else if(N.eq(K))return this.unsigned?R:T;if(this.isNegative())return N.isNegative()?this.neg().div(N.neg()):this.neg().div(N).neg();if(N.isNegative())return this.div(N.neg()).neg();ie=T}for(X=this;X.gte(N);){q=Math.max(1,Math.floor(X.toNumber()/N.toNumber()));for(var oe=Math.ceil(Math.log(q)/Math.LN2),Se=oe<=48?1:c(2,oe-48),Be=s(q),Re=Be.mul(N);Re.isNegative()||Re.gt(X);)q-=Se,Be=s(q,this.unsigned),Re=Be.mul(N);Be.isZero()&&(Be=L),ie=ie.add(Be),X=X.sub(Re)}return ie},G.div=G.divide,G.modulo=function(N){if(a(N)||(N=d(N)),t){var k=(this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,N.low,N.high);return g(k,t.get_high(),this.unsigned)}return this.sub(this.div(N).mul(N))},G.mod=G.modulo,G.rem=G.modulo,G.not=function(){return g(~this.low,~this.high,this.unsigned)},G.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},G.clz=G.countLeadingZeros,G.countTrailingZeros=function(){return this.low?e(this.low):e(this.high)+32},G.ctz=G.countTrailingZeros,G.and=function(N){return a(N)||(N=d(N)),g(this.low&N.low,this.high&N.high,this.unsigned)},G.or=function(N){return a(N)||(N=d(N)),g(this.low|N.low,this.high|N.high,this.unsigned)},G.xor=function(N){return a(N)||(N=d(N)),g(this.low^N.low,this.high^N.high,this.unsigned)},G.shiftLeft=function(N){return a(N)&&(N=N.toInt()),(N&=63)===0?this:N<32?g(this.low<>>32-N,this.unsigned):g(0,this.low<>>N|this.high<<32-N,this.high>>N,this.unsigned):g(this.high>>N-32,this.high>=0?0:-1,this.unsigned)},G.shr=G.shiftRight,G.shiftRightUnsigned=function(N){return a(N)&&(N=N.toInt()),(N&=63)===0?this:N<32?g(this.low>>>N|this.high<<32-N,this.high>>>N,this.unsigned):N===32?g(this.high,0,this.unsigned):g(this.high>>>N-32,0,this.unsigned)},G.shru=G.shiftRightUnsigned,G.shr_u=G.shiftRightUnsigned,G.rotateLeft=function(N){var k;return a(N)&&(N=N.toInt()),(N&=63)===0?this:N===32?g(this.high,this.low,this.unsigned):N<32?(k=32-N,g(this.low<>>k,this.high<>>k,this.unsigned)):(N-=32,k=32-N,g(this.high<>>k,this.low<>>k,this.unsigned))},G.rotl=G.rotateLeft,G.rotateRight=function(N){var k;return a(N)&&(N=N.toInt()),(N&=63)===0?this:N===32?g(this.high,this.low,this.unsigned):N<32?(k=32-N,g(this.high<>>N,this.low<>>N,this.unsigned)):(N-=32,k=32-N,g(this.low<>>N,this.high<>>N,this.unsigned))},G.rotr=G.rotateRight,G.toSigned=function(){return this.unsigned?g(this.low,this.high,!1):this},G.toUnsigned=function(){return this.unsigned?this:g(this.low,this.high,!0)},G.toBytes=function(N){return N?this.toBytesLE():this.toBytesBE()},G.toBytesLE=function(){var N=this.high,k=this.low;return[k&255,k>>>8&255,k>>>16&255,k>>>24,N&255,N>>>8&255,N>>>16&255,N>>>24]},G.toBytesBE=function(){var N=this.high,k=this.low;return[N>>>24,N>>>16&255,N>>>8&255,N&255,k>>>24,k>>>16&255,k>>>8&255,k&255]},o.fromBytes=function(N,k,q){return q?o.fromBytesLE(N,k):o.fromBytesBE(N,k)},o.fromBytesLE=function(N,k){return new o(N[0]|N[1]<<8|N[2]<<16|N[3]<<24,N[4]|N[5]<<8|N[6]<<16|N[7]<<24,k)},o.fromBytesBE=function(N,k){return new o(N[4]<<24|N[5]<<16|N[6]<<8|N[7],N[0]<<24|N[1]<<16|N[2]<<8|N[3],k)},typeof BigInt=="function"&&(o.fromBigInt=function(N,k){var q=Number(BigInt.asIntN(32,N)),X=Number(BigInt.asIntN(32,N>>BigInt(32)));return g(q,X,k)},o.fromValue=function(N,k){return typeof N=="bigint"?o.fromBigInt(N,k):d(N,k)},G.toBigInt=function(){var N=BigInt(this.low>>>0),k=BigInt(this.unsigned?this.high>>>0:this.high);return k<{"use strict";var fA=nk;fA.asPromise=VW();fA.base64=$W();fA.EventEmitter=A6();fA.float=s6();fA.utf8=c6();fA.pool=l6();fA.LongBits=p6();function E6(n){return n==="__proto__"||n==="prototype"||n==="constructor"}fA.isUnsafeProperty=E6;fA.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);fA.global=fA.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||nk;fA.emptyArray=Object.freeze?Object.freeze([]):[];fA.emptyObject=Object.freeze?Object.freeze({}):{};fA.isInteger=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};fA.isString=function(t){return typeof t=="string"||t instanceof String};fA.isObject=function(t){return t&&typeof t=="object"};fA.isset=fA.isSet=function(t,o){var a=t[o];return a!=null&&Object.hasOwnProperty.call(t,o)?typeof a!="object"||(Array.isArray(a)?a.length:Object.keys(a).length)>0:!1};fA.Buffer=(function(){try{var n=fA.global.Buffer;return n.prototype.utf8Write?n:null}catch{return null}})();fA._Buffer_from=null;fA._Buffer_allocUnsafe=null;fA.newBuffer=function(t){return typeof t=="number"?fA.Buffer?fA._Buffer_allocUnsafe(t):new fA.Array(t):fA.Buffer?fA._Buffer_from(t):typeof Uint8Array>"u"?t:new Uint8Array(t)};fA.Array=typeof Uint8Array<"u"?Uint8Array:Array;fA.Long=fA.global.dcodeIO&&fA.global.dcodeIO.Long||fA.global.Long||(function(){try{var n=h6();return n&&n.isLong?n:null}catch{return null}})();fA.key2Re=/^true|false|0|1$/;fA.key32Re=/^-?(?:0|[1-9][0-9]*)$/;fA.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;fA.longToHash=function(t){return t?fA.LongBits.from(t).toHash():fA.LongBits.zeroHash};fA.longFromHash=function(t,o){var a=fA.LongBits.fromHash(t);return fA.Long?fA.Long.fromBits(a.lo,a.hi,o):a.toNumber(!!o)};function u6(n){var t=typeof arguments[arguments.length-1]=="boolean",o=t?arguments.length-1:arguments.length;t=t&&arguments[arguments.length-1];for(var a=1;a-1;--i)if(o[e[i]]===1&&this[e[i]]!==void 0&&this[e[i]]!==null)return e[i]}};fA.oneOfSetter=function(t){return function(o){for(var a=0;a{"use strict";y6.exports=mt;var Wo=Jc(),sk,hS=Wo.LongBits,B6=Wo.base64,f6=Wo.utf8;function NC(n,t,o){this.fn=n,this.len=t,this.next=void 0,this.val=o}function ck(){}function eke(n){this.head=n.head,this.tail=n.tail,this.len=n.len,this.next=n.states}function mt(){this.len=0,this.head=new NC(ck,0,0),this.tail=this.head,this.states=null}var Q6=function(){return Wo.Buffer?function(){return(mt.create=function(){return new sk})()}:function(){return new mt}};mt.create=Q6();mt.alloc=function(t){return new Wo.Array(t)};Wo.Array!==Array&&(mt.alloc=Wo.pool(mt.alloc,Wo.Array.prototype.subarray));mt.prototype._push=function(t,o,a){return this.tail=this.tail.next=new NC(t,o,a),this.len+=o,this};function Ik(n,t,o){t[o]=n&255}function Ake(n,t,o){for(;n>127;)t[o++]=n&127|128,n>>>=7;t[o]=n}function lk(n,t){this.len=n,this.next=void 0,this.val=t}lk.prototype=Object.create(NC.prototype);lk.prototype.fn=Ake;mt.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new lk((t=t>>>0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this};mt.prototype.int32=function(t){return(t|=0)<0?this._push(dk,10,hS.fromNumber(t)):this.uint32(t)};mt.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)};function dk(n,t,o){for(var a=n.lo,e=n.hi;e;)t[o++]=a&127|128,a=(a>>>7|e<<25)>>>0,e>>>=7;for(;a>127;)t[o++]=a&127|128,a=a>>>7;t[o++]=a}mt.prototype.uint64=function(t){var o=hS.from(t);return this._push(dk,o.length(),o)};mt.prototype.int64=mt.prototype.uint64;mt.prototype.sint64=function(t){var o=hS.from(t).zzEncode();return this._push(dk,o.length(),o)};mt.prototype.bool=function(t){return this._push(Ik,1,t?1:0)};function gk(n,t,o){t[o]=n&255,t[o+1]=n>>>8&255,t[o+2]=n>>>16&255,t[o+3]=n>>>24}mt.prototype.fixed32=function(t){return this._push(gk,4,t>>>0)};mt.prototype.sfixed32=mt.prototype.fixed32;mt.prototype.fixed64=function(t){var o=hS.from(t);return this._push(gk,4,o.lo)._push(gk,4,o.hi)};mt.prototype.sfixed64=mt.prototype.fixed64;mt.prototype.float=function(t){return this._push(Wo.float.writeFloatLE,4,t)};mt.prototype.double=function(t){return this._push(Wo.float.writeDoubleLE,8,t)};var tke=Wo.Array.prototype.set?function(t,o,a){o.set(t,a)}:function(t,o,a){for(var e=0;e>>0;if(!o)return this._push(Ik,1,0);if(Wo.isString(t)){var a=mt.alloc(o=B6.length(t));B6.decode(t,a,0),t=a}return this.uint32(o)._push(tke,o,t)};mt.prototype.string=function(t){var o=f6.length(t);return o?this.uint32(o)._push(f6.write,o,t):this._push(Ik,1,0)};mt.prototype.fork=function(){return this.states=new eke(this),this.head=this.tail=new NC(ck,0,0),this.len=0,this};mt.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new NC(ck,0,0),this.len=0),this};mt.prototype.ldelim=function(){var t=this.head,o=this.tail,a=this.len;return this.reset().uint32(a),a&&(this.tail.next=t.next,this.tail=o,this.len+=a),this};mt.prototype.finish=function(){for(var t=this.head.next,o=this.constructor.alloc(this.len),a=0;t;)t.fn(t.val,o,a),a+=t.len,t=t.next;return o};mt._configure=function(n){sk=n,mt.create=Q6(),sk._configure()}});var w6=ee((QpA,S6)=>{"use strict";S6.exports=Ns;var m6=pk();(Ns.prototype=Object.create(m6.prototype)).constructor=Ns;var qc=Jc();function Ns(){m6.call(this)}Ns._configure=function(){Ns.alloc=qc._Buffer_allocUnsafe,Ns.writeBytesBuffer=qc.Buffer&&qc.Buffer.prototype instanceof Uint8Array&&qc.Buffer.prototype.set.name==="set"?function(t,o,a){o.set(t,a)}:function(t,o,a){if(t.copy)t.copy(o,a,0,t.length);else for(var e=0;e>>0;return this.uint32(o),o&&this._push(Ns.writeBytesBuffer,o,t),this};function rke(n,t,o){n.length<40?qc.utf8.write(n,t,o):t.utf8Write?t.utf8Write(n,o):t.write(n,o)}Ns.prototype.string=function(t){var o=qc.Buffer.byteLength(t);return this.uint32(o),o&&this._push(rke,o,t),this};Ns._configure()});var uk=ee((ypA,_6)=>{"use strict";_6.exports=Er;var Zo=Jc(),Ek,b6=Zo.LongBits,ike=Zo.utf8;function Gn(n,t){return RangeError("index out of range: "+n.pos+" + "+(t||1)+" > "+n.len)}function Er(n){this.buf=n,this.pos=0,this.len=n.length}var D6=typeof Uint8Array<"u"?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new Er(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new Er(t);throw Error("illegal buffer")},M6=function(){return Zo.Buffer?function(o){return(Er.create=function(e){return Zo.Buffer.isBuffer(e)?new Ek(e):D6(e)})(o)}:D6};Er.create=M6();Er.prototype._slice=Zo.Array.prototype.subarray||Zo.Array.prototype.slice;Er.prototype.uint32=(function(){var t=4294967295;return function(){if(t=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(t=(t|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return t;if((this.pos+=5)>this.len)throw this.pos=this.len,Gn(this,10);return t}})();Er.prototype.int32=function(){return this.uint32()|0};Er.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(t&1)|0};function hk(){var n=new b6(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(n.lo=(n.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n;if(n.lo=(n.lo|(this.buf[this.pos]&127)<<28)>>>0,n.hi=(n.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return n;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw Gn(this);if(n.lo=(n.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}return n.lo=(n.lo|(this.buf[this.pos++]&127)<>>0,n}if(this.len-this.pos>4){for(;t<5;++t)if(n.hi=(n.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}else for(;t<5;++t){if(this.pos>=this.len)throw Gn(this);if(n.hi=(n.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}throw Error("invalid varint encoding")}Er.prototype.bool=function(){return this.uint32()!==0};function ES(n,t){return(n[t-4]|n[t-3]<<8|n[t-2]<<16|n[t-1]<<24)>>>0}Er.prototype.fixed32=function(){if(this.pos+4>this.len)throw Gn(this,4);return ES(this.buf,this.pos+=4)};Er.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Gn(this,4);return ES(this.buf,this.pos+=4)|0};function O6(){if(this.pos+8>this.len)throw Gn(this,8);return new b6(ES(this.buf,this.pos+=4),ES(this.buf,this.pos+=4))}Er.prototype.float=function(){if(this.pos+4>this.len)throw Gn(this,4);var t=Zo.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t};Er.prototype.double=function(){if(this.pos+8>this.len)throw Gn(this,4);var t=Zo.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t};Er.prototype.bytes=function(){var t=this.uint32(),o=this.pos,a=this.pos+t;if(a>this.len)throw Gn(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(o,a);if(o===a){var e=Zo.Buffer;return e?e.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,a)};Er.prototype.string=function(){var t=this.bytes();return ike.read(t,0,t.length)};Er.prototype.skip=function(t){if(typeof t=="number"){if(this.pos+t>this.len)throw Gn(this,t);this.pos+=t}else do if(this.pos>=this.len)throw Gn(this);while(this.buf[this.pos++]&128);return this};Er.recursionLimit=Zo.recursionLimit;Er.prototype.skipType=function(n,t){if(t===void 0&&(t=0),t>Er.recursionLimit)throw Error("maximum nesting depth exceeded");switch(n){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(n=this.uint32()&7)!==4;)this.skipType(n,t+1);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+n+" at offset "+this.pos)}return this};Er._configure=function(n){Ek=n,Er.create=M6(),Ek._configure();var t=Zo.Long?"toLong":"toNumber";Zo.merge(Er.prototype,{int64:function(){return hk.call(this)[t](!1)},uint64:function(){return hk.call(this)[t](!0)},sint64:function(){return hk.call(this).zzDecode()[t](!1)},fixed64:function(){return O6.call(this)[t](!0)},sfixed64:function(){return O6.call(this)[t](!1)}})}});var k6=ee((mpA,R6)=>{"use strict";R6.exports=kl;var N6=uk();(kl.prototype=Object.create(N6.prototype)).constructor=kl;var T6=Jc();function kl(n){N6.call(this,n)}kl._configure=function(){T6.Buffer&&(kl.prototype._slice=T6.Buffer.prototype.slice)};kl.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))};kl._configure()});var P6=ee((SpA,v6)=>{"use strict";v6.exports=RC;var Ck=Jc();(RC.prototype=Object.create(Ck.EventEmitter.prototype)).constructor=RC;function RC(n,t,o){if(typeof n!="function")throw TypeError("rpcImpl must be a function");Ck.EventEmitter.call(this),this.rpcImpl=n,this.requestDelimited=!!t,this.responseDelimited=!!o}RC.prototype.rpcCall=function n(t,o,a,e,i){if(!e)throw TypeError("request must be specified");var A=this;if(!i)return Ck.asPromise(n,A,t,o,a,e);if(!A.rpcImpl){setTimeout(function(){i(Error("already ended"))},0);return}try{return A.rpcImpl(t,o[A.requestDelimited?"encodeDelimited":"encode"](e).finish(),function(s,g){if(s)return A.emit("error",s,t),i(s);if(g===null){A.end(!0);return}if(!(g instanceof a))try{g=a[A.responseDelimited?"decodeDelimited":"decode"](g)}catch(c){return A.emit("error",c,t),i(c)}return A.emit("data",g,t),i(null,g)})}catch(r){A.emit("error",r,t),setTimeout(function(){i(r)},0);return}};RC.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var F6=ee(G6=>{"use strict";var ake=G6;ake.Service=P6()});var U6=ee((DpA,L6)=>{"use strict";L6.exports=Object.create(null)});var x6=ee(K6=>{"use strict";var za=K6;za.build="minimal";za.Writer=pk();za.BufferWriter=w6();za.Reader=uk();za.BufferReader=k6();za.util=Jc();za.rpc=F6();za.roots=U6();za.configure=H6;function H6(){za.util._configure(),za.Writer._configure(za.BufferWriter),za.Reader._configure(za.BufferReader)}H6()});var uS=ee((bpA,Y6)=>{"use strict";Y6.exports=x6()});var qZ=ee(st=>{"use strict";var nB=Symbol.for("react.element"),bFe=Symbol.for("react.portal"),MFe=Symbol.for("react.fragment"),_Fe=Symbol.for("react.strict_mode"),TFe=Symbol.for("react.profiler"),NFe=Symbol.for("react.provider"),RFe=Symbol.for("react.context"),kFe=Symbol.for("react.forward_ref"),vFe=Symbol.for("react.suspense"),PFe=Symbol.for("react.memo"),GFe=Symbol.for("react.lazy"),PZ=Symbol.iterator;function FFe(n){return n===null||typeof n!="object"?null:(n=PZ&&n[PZ]||n["@@iterator"],typeof n=="function"?n:null)}var LZ={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},UZ=Object.assign,HZ={};function uh(n,t,o){this.props=n,this.context=t,this.refs=HZ,this.updater=o||LZ}uh.prototype.isReactComponent={};uh.prototype.setState=function(n,t){if(typeof n!="object"&&typeof n!="function"&&n!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,n,t,"setState")};uh.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function KZ(){}KZ.prototype=uh.prototype;function MG(n,t,o){this.props=n,this.context=t,this.refs=HZ,this.updater=o||LZ}var _G=MG.prototype=new KZ;_G.constructor=MG;UZ(_G,uh.prototype);_G.isPureReactComponent=!0;var GZ=Array.isArray,xZ=Object.prototype.hasOwnProperty,TG={current:null},YZ={key:!0,ref:!0,__self:!0,__source:!0};function jZ(n,t,o){var a,e={},i=null,A=null;if(t!=null)for(a in t.ref!==void 0&&(A=t.ref),t.key!==void 0&&(i=""+t.key),t)xZ.call(t,a)&&!YZ.hasOwnProperty(a)&&(e[a]=t[a]);var r=arguments.length-2;if(r===1)e.children=o;else if(1{"use strict";process.env.NODE_ENV!=="production"&&(function(){"use strict";typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var n="18.3.1",t=Symbol.for("react.element"),o=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),r=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),B=Symbol.for("react.offscreen"),f=Symbol.iterator,Q="@@iterator";function y(x){if(x===null||typeof x!="object")return null;var te=f&&x[f]||x[Q];return typeof te=="function"?te:null}var m={current:null},_={transition:null},T={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},R={current:null},L={},U=null;function F(x){U=x}L.setExtraStackFrame=function(x){U=x},L.getCurrentStack=null,L.getStackAddendum=function(){var x="";U&&(x+=U);var te=L.getCurrentStack;return te&&(x+=te()||""),x};var z=!1,J=!1,K=!1,G=!1,V=!1,H={ReactCurrentDispatcher:m,ReactCurrentBatchConfig:_,ReactCurrentOwner:R};H.ReactDebugCurrentFrame=L,H.ReactCurrentActQueue=T;function N(x){{for(var te=arguments.length,pe=new Array(te>1?te-1:0),me=1;me1?te-1:0),me=1;me1){for(var Ar=Array(Ht),tr=0;tr1){for(var lr=Array(tr),Nr=0;Nr is not supported and will be removed in a future major release. Did you mean to render instead?")),te.Provider},set:function(CA){te.Provider=CA}},_currentValue:{get:function(){return te._currentValue},set:function(CA){te._currentValue=CA}},_currentValue2:{get:function(){return te._currentValue2},set:function(CA){te._currentValue2=CA}},_threadCount:{get:function(){return te._threadCount},set:function(CA){te._threadCount=CA}},Consumer:{get:function(){return pe||(pe=!0,k("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),te.Consumer}},displayName:{get:function(){return te.displayName},set:function(CA){Ve||(N("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",CA),Ve=!0)}}}),te.Consumer=TA}return te._currentRenderer=null,te._currentRenderer2=null,te}var he=-1,ye=0,qe=1,IA=2;function yA(x){if(x._status===he){var te=x._result,pe=te();if(pe.then(function(TA){if(x._status===ye||x._status===he){var CA=x;CA._status=qe,CA._result=TA}},function(TA){if(x._status===ye||x._status===he){var CA=x;CA._status=IA,CA._result=TA}}),x._status===he){var me=x;me._status=ye,me._result=pe}}if(x._status===qe){var Ve=x._result;return Ve===void 0&&k(`lazy: Expected the result of a dynamic import() call. Instead received: %s +`+o)}function Nl(n,t,o,a,e,i){if(n.listenerCount("wsClientError")){let A=new Error(e);Error.captureStackTrace(A,Nl),n.emit("wsClientError",A,o,t)}else MC(o,a,e,i)}});var XW=ee((fpA,ZW)=>{"use strict";ZW.exports=tke;function tke(n,t){for(var o=new Array(arguments.length-1),a=0,e=2,i=!0;e{"use strict";var pS=A6;pS.length=function(t){var o=t.length;if(!o)return 0;for(var a=0;--o%4>1&&t.charAt(o)==="=";)++a;return Math.ceil(t.length*3)/4-a};var ah=new Array(64),e6=new Array(123);for(Pn=0;Pn<64;)e6[ah[Pn]=Pn<26?Pn+65:Pn<52?Pn+71:Pn<62?Pn-4:Pn-59|43]=Pn++;var Pn;pS.encode=function(t,o,a){for(var e=null,i=[],A=0,r=0,s;o>2],s=(g&3)<<4,r=1;break;case 1:i[A++]=ah[s|g>>4],s=(g&15)<<2,r=2;break;case 2:i[A++]=ah[s|g>>6],i[A++]=ah[g&63],r=0;break}A>8191&&((e||(e=[])).push(String.fromCharCode.apply(String,i)),A=0)}return r&&(i[A++]=ah[s],i[A++]=61,r===1&&(i[A++]=61)),e?(A&&e.push(String.fromCharCode.apply(String,i.slice(0,A))),e.join("")):String.fromCharCode.apply(String,i.slice(0,A))};var $W="invalid encoding";pS.decode=function(t,o,a){for(var e=a,i=0,A,r=0;r1)break;if((s=e6[s])===void 0)throw Error($W);switch(i){case 0:A=s,i=1;break;case 1:o[a++]=A<<2|(s&48)>>4,A=s,i=2;break;case 2:o[a++]=(A&15)<<4|(s&60)>>2,A=s,i=3;break;case 3:o[a++]=(A&3)<<6|s,i=0;break}}if(i===1)throw Error($W);return a-e};pS.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}});var i6=ee((ypA,r6)=>{"use strict";r6.exports=hS;function hS(){this._listeners=Object.create(null)}hS.prototype.on=function(t,o,a){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:o,ctx:a||this}),this};hS.prototype.off=function(t,o){if(t===void 0)this._listeners=Object.create(null);else if(o===void 0)this._listeners[t]=[];else{var a=this._listeners[t];if(!a)return this;for(var e=0;e{"use strict";c6.exports=a6(a6);function a6(n){return typeof Float32Array<"u"?(function(){var t=new Float32Array([-0]),o=new Uint8Array(t.buffer),a=o[3]===128;function e(s,g,c){t[0]=s,g[c]=o[0],g[c+1]=o[1],g[c+2]=o[2],g[c+3]=o[3]}function i(s,g,c){t[0]=s,g[c]=o[3],g[c+1]=o[2],g[c+2]=o[1],g[c+3]=o[0]}n.writeFloatLE=a?e:i,n.writeFloatBE=a?i:e;function A(s,g){return o[0]=s[g],o[1]=s[g+1],o[2]=s[g+2],o[3]=s[g+3],t[0]}function r(s,g){return o[3]=s[g],o[2]=s[g+1],o[1]=s[g+2],o[0]=s[g+3],t[0]}n.readFloatLE=a?A:r,n.readFloatBE=a?r:A})():(function(){function t(a,e,i,A){var r=e<0?1:0;if(r&&(e=-e),e===0)a(1/e>0?0:2147483648,i,A);else if(isNaN(e))a(2143289344,i,A);else if(e>34028234663852886e22)a((r<<31|2139095040)>>>0,i,A);else if(e<11754943508222875e-54)a((r<<31|Math.round(e/1401298464324817e-60))>>>0,i,A);else{var s=Math.floor(Math.log(e)/Math.LN2),g=Math.round(e*Math.pow(2,-s)*8388608)&8388607;a((r<<31|s+127<<23|g)>>>0,i,A)}}n.writeFloatLE=t.bind(null,o6),n.writeFloatBE=t.bind(null,n6);function o(a,e,i){var A=a(e,i),r=(A>>31)*2+1,s=A>>>23&255,g=A&8388607;return s===255?g?NaN:r*(1/0):s===0?r*1401298464324817e-60*g:r*Math.pow(2,s-150)*(g+8388608)}n.readFloatLE=o.bind(null,s6),n.readFloatBE=o.bind(null,g6)})(),typeof Float64Array<"u"?(function(){var t=new Float64Array([-0]),o=new Uint8Array(t.buffer),a=o[7]===128;function e(s,g,c){t[0]=s,g[c]=o[0],g[c+1]=o[1],g[c+2]=o[2],g[c+3]=o[3],g[c+4]=o[4],g[c+5]=o[5],g[c+6]=o[6],g[c+7]=o[7]}function i(s,g,c){t[0]=s,g[c]=o[7],g[c+1]=o[6],g[c+2]=o[5],g[c+3]=o[4],g[c+4]=o[3],g[c+5]=o[2],g[c+6]=o[1],g[c+7]=o[0]}n.writeDoubleLE=a?e:i,n.writeDoubleBE=a?i:e;function A(s,g){return o[0]=s[g],o[1]=s[g+1],o[2]=s[g+2],o[3]=s[g+3],o[4]=s[g+4],o[5]=s[g+5],o[6]=s[g+6],o[7]=s[g+7],t[0]}function r(s,g){return o[7]=s[g],o[6]=s[g+1],o[5]=s[g+2],o[4]=s[g+3],o[3]=s[g+4],o[2]=s[g+5],o[1]=s[g+6],o[0]=s[g+7],t[0]}n.readDoubleLE=a?A:r,n.readDoubleBE=a?r:A})():(function(){function t(a,e,i,A,r,s){var g=A<0?1:0;if(g&&(A=-A),A===0)a(0,r,s+e),a(1/A>0?0:2147483648,r,s+i);else if(isNaN(A))a(0,r,s+e),a(2146959360,r,s+i);else if(A>17976931348623157e292)a(0,r,s+e),a((g<<31|2146435072)>>>0,r,s+i);else{var c;if(A<22250738585072014e-324)c=A/5e-324,a(c>>>0,r,s+e),a((g<<31|c/4294967296)>>>0,r,s+i);else{var I=Math.floor(Math.log(A)/Math.LN2);I===1024&&(I=1023),c=A*Math.pow(2,-I),a(c*4503599627370496>>>0,r,s+e),a((g<<31|I+1023<<20|c*1048576&1048575)>>>0,r,s+i)}}}n.writeDoubleLE=t.bind(null,o6,0,4),n.writeDoubleBE=t.bind(null,n6,4,0);function o(a,e,i,A,r){var s=a(A,r+e),g=a(A,r+i),c=(g>>31)*2+1,I=g>>>20&2047,d=4294967296*(g&1048575)+s;return I===2047?d?NaN:c*(1/0):I===0?c*5e-324*d:c*Math.pow(2,I-1075)*(d+4503599627370496)}n.readDoubleLE=o.bind(null,s6,0,4),n.readDoubleBE=o.bind(null,g6,4,0)})(),n}function o6(n,t,o){t[o]=n&255,t[o+1]=n>>>8&255,t[o+2]=n>>>16&255,t[o+3]=n>>>24}function n6(n,t,o){t[o]=n>>>24,t[o+1]=n>>>16&255,t[o+2]=n>>>8&255,t[o+3]=n&255}function s6(n,t){return(n[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24)>>>0}function g6(n,t){return(n[t]<<24|n[t+1]<<16|n[t+2]<<8|n[t+3])>>>0}});var d6=ee(l6=>{"use strict";var ak=l6,ik=65533;ak.length=function(t){for(var o=0,a=0,e=0;e=192&&r<224?(g=(r&31)<<6|t[o++]&63,i[A++]=g>=128?g:ik):r>=224&&r<240?(c=(r&15)<<12|(t[o++]&63)<<6|t[o++]&63,i[A++]=c>=2048?c:ik):r>=240&&(s=(r&7)<<18|(t[o++]&63)<<12|(t[o++]&63)<<6|t[o++]&63,s<65536||s>1114111?i[A++]=ik:(s-=65536,i[A++]=55296+(s>>10),i[A++]=56320+(s&1023))),A>8191&&((e||(e=[])).push(String.fromCharCode.apply(String,i.slice(0,A))),A=0);return e?(A&&e.push(String.fromCharCode.apply(String,i.slice(0,A))),e.join("")):String.fromCharCode.apply(String,i.slice(0,A))};ak.write=function(t,o,a){for(var e=a,i,A,r=0;r>6|192,o[a++]=i&63|128):(i&64512)===55296&&((A=t.charCodeAt(r+1))&64512)===56320?(i=65536+((i&1023)<<10)+(A&1023),++r,o[a++]=i>>18|240,o[a++]=i>>12&63|128,o[a++]=i>>6&63|128,o[a++]=i&63|128):(o[a++]=i>>12|224,o[a++]=i>>6&63|128,o[a++]=i&63|128);return a-e}});var h6=ee((wpA,p6)=>{"use strict";p6.exports=rke;function rke(n,t,o){var a=o||8192,e=a>>>1,i=null,A=a;return function(s){if(s<1||s>e)return n(s);A+s>a&&(i=n(a),A=0);var g=t.call(i,A,A+=s);return A&7&&(A=(A|7)+1),g}}});var u6=ee((DpA,E6)=>{"use strict";E6.exports=hi;var _C=qc();function hi(n,t){this.lo=n>>>0,this.hi=t>>>0}var Rl=hi.zero=new hi(0,0);Rl.toNumber=function(){return 0};Rl.zzEncode=Rl.zzDecode=function(){return this};Rl.length=function(){return 1};var ike=hi.zeroHash="\0\0\0\0\0\0\0\0";hi.fromNumber=function(t){if(t===0)return Rl;var o=t<0;o&&(t=-t);var a=t>>>0,e=(t-a)/4294967296>>>0;return o&&(e=~e>>>0,a=~a>>>0,++a>4294967295&&(a=0,++e>4294967295&&(e=0))),new hi(a,e)};hi.from=function(t){if(typeof t=="number")return hi.fromNumber(t);if(_C.isString(t))if(_C.Long)t=_C.Long.fromString(t);else return hi.fromNumber(parseInt(t,10));return t.low||t.high?new hi(t.low>>>0,t.high>>>0):Rl};hi.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var o=~this.lo+1>>>0,a=~this.hi>>>0;return o||(a=a+1>>>0),-(o+a*4294967296)}return this.lo+this.hi*4294967296};hi.prototype.toLong=function(t){return _C.Long?new _C.Long(this.lo|0,this.hi|0,!!t):{low:this.lo|0,high:this.hi|0,unsigned:!!t}};var Jc=String.prototype.charCodeAt;hi.fromHash=function(t){return t===ike?Rl:new hi((Jc.call(t,0)|Jc.call(t,1)<<8|Jc.call(t,2)<<16|Jc.call(t,3)<<24)>>>0,(Jc.call(t,4)|Jc.call(t,5)<<8|Jc.call(t,6)<<16|Jc.call(t,7)<<24)>>>0)};hi.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};hi.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this};hi.prototype.zzDecode=function(){var t=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this};hi.prototype.length=function(){var t=this.lo,o=(this.lo>>>28|this.hi<<4)>>>0,a=this.hi>>>24;return a===0?o===0?t<16384?t<128?1:2:t<2097152?3:4:o<16384?o<128?5:6:o<2097152?7:8:a<128?9:10}});var C6=ee((TC,ok)=>{(function(n,t){function o(a){return a.default||a}typeof define=="function"&&define.amd?define([],function(){var a={};return t(a),o(a)}):typeof TC=="object"?(t(TC),typeof ok=="object"&&(ok.exports=o(TC))):(function(){var a={};t(a),n.Long=o(a)})()})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:TC,function(n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function o(K,N,k){this.low=K|0,this.high=N|0,this.unsigned=!!k}o.prototype.__isLong__,Object.defineProperty(o.prototype,"__isLong__",{value:!0});function a(K){return(K&&K.__isLong__)===!0}function e(K){var N=Math.clz32(K&-K);return K?31-N:N}o.isLong=a;var i={},A={};function r(K,N){var k,z,X;return N?(K>>>=0,(X=0<=K&&K<256)&&(z=A[K],z)?z:(k=g(K,0,!0),X&&(A[K]=k),k)):(K|=0,(X=-128<=K&&K<128)&&(z=i[K],z)?z:(k=g(K,K<0?-1:0,!1),X&&(i[K]=k),k))}o.fromInt=r;function s(K,N){if(isNaN(K))return N?R:T;if(N){if(K<0)return R;if(K>=y)return V}else{if(K<=-m)return H;if(K+1>=m)return J}return K<0?s(-K,N).neg():g(K%Q|0,K/Q|0,N)}o.fromNumber=s;function g(K,N,k){return new o(K,N,k)}o.fromBits=g;var c=Math.pow;function I(K,N,k){if(K.length===0)throw Error("empty string");if(typeof N=="number"?(k=N,N=!1):N=!!N,K==="NaN"||K==="Infinity"||K==="+Infinity"||K==="-Infinity")return N?R:T;if(k=k||10,k<2||360)throw Error("interior hyphen");if(z===0)return I(K.substring(1),N,k).neg();for(var X=s(c(k,8)),ie=T,De=0;De>>0:this.low},G.toNumber=function(){return this.unsigned?(this.high>>>0)*Q+(this.low>>>0):this.high*Q+(this.low>>>0)},G.toString=function(N){if(N=N||10,N<2||36>>0,Re=Be.toString(N);if(De=Se,De.isZero())return Re+oe;for(;Re.length<6;)Re="0"+Re;oe=""+Re+oe}},G.getHighBits=function(){return this.high},G.getHighBitsUnsigned=function(){return this.high>>>0},G.getLowBits=function(){return this.low},G.getLowBitsUnsigned=function(){return this.low>>>0},G.getNumBitsAbs=function(){if(this.isNegative())return this.eq(H)?64:this.neg().getNumBitsAbs();for(var N=this.high!=0?this.high:this.low,k=31;k>0&&(N&1<>21;return N?this.unsigned?!1:N===-1&&!(this.low===0&&this.high===-2097152):!0},G.isZero=function(){return this.high===0&&this.low===0},G.eqz=G.isZero,G.isNegative=function(){return!this.unsigned&&this.high<0},G.isPositive=function(){return this.unsigned||this.high>=0},G.isOdd=function(){return(this.low&1)===1},G.isEven=function(){return(this.low&1)===0},G.equals=function(N){return a(N)||(N=d(N)),this.unsigned!==N.unsigned&&this.high>>>31===1&&N.high>>>31===1?!1:this.high===N.high&&this.low===N.low},G.eq=G.equals,G.notEquals=function(N){return!this.eq(N)},G.neq=G.notEquals,G.ne=G.notEquals,G.lessThan=function(N){return this.comp(N)<0},G.lt=G.lessThan,G.lessThanOrEqual=function(N){return this.comp(N)<=0},G.lte=G.lessThanOrEqual,G.le=G.lessThanOrEqual,G.greaterThan=function(N){return this.comp(N)>0},G.gt=G.greaterThan,G.greaterThanOrEqual=function(N){return this.comp(N)>=0},G.gte=G.greaterThanOrEqual,G.ge=G.greaterThanOrEqual,G.compare=function(N){if(a(N)||(N=d(N)),this.eq(N))return 0;var k=this.isNegative(),z=N.isNegative();return k&&!z?-1:!k&&z?1:this.unsigned?N.high>>>0>this.high>>>0||N.high===this.high&&N.low>>>0>this.low>>>0?-1:1:this.sub(N).isNegative()?-1:1},G.comp=G.compare,G.negate=function(){return!this.unsigned&&this.eq(H)?H:this.not().add(L)},G.neg=G.negate,G.add=function(N){a(N)||(N=d(N));var k=this.high>>>16,z=this.high&65535,X=this.low>>>16,ie=this.low&65535,De=N.high>>>16,oe=N.high&65535,Se=N.low>>>16,Be=N.low&65535,Re=0,Ne=0,Je=0,ve=0;return ve+=ie+Be,Je+=ve>>>16,ve&=65535,Je+=X+Se,Ne+=Je>>>16,Je&=65535,Ne+=z+oe,Re+=Ne>>>16,Ne&=65535,Re+=k+De,Re&=65535,g(Je<<16|ve,Re<<16|Ne,this.unsigned)},G.subtract=function(N){return a(N)||(N=d(N)),this.add(N.neg())},G.sub=G.subtract,G.multiply=function(N){if(this.isZero())return this;if(a(N)||(N=d(N)),t){var k=t.mul(this.low,this.high,N.low,N.high);return g(k,t.get_high(),this.unsigned)}if(N.isZero())return this.unsigned?R:T;if(this.eq(H))return N.isOdd()?H:T;if(N.eq(H))return this.isOdd()?H:T;if(this.isNegative())return N.isNegative()?this.neg().mul(N.neg()):this.neg().mul(N).neg();if(N.isNegative())return this.mul(N.neg()).neg();if(this.lt(_)&&N.lt(_))return s(this.toNumber()*N.toNumber(),this.unsigned);var z=this.high>>>16,X=this.high&65535,ie=this.low>>>16,De=this.low&65535,oe=N.high>>>16,Se=N.high&65535,Be=N.low>>>16,Re=N.low&65535,Ne=0,Je=0,ve=0,tA=0;return tA+=De*Re,ve+=tA>>>16,tA&=65535,ve+=ie*Re,Je+=ve>>>16,ve&=65535,ve+=De*Be,Je+=ve>>>16,ve&=65535,Je+=X*Re,Ne+=Je>>>16,Je&=65535,Je+=ie*Be,Ne+=Je>>>16,Je&=65535,Je+=De*Se,Ne+=Je>>>16,Je&=65535,Ne+=z*Re+X*Be+ie*Se+De*oe,Ne&=65535,g(ve<<16|tA,Ne<<16|Je,this.unsigned)},G.mul=G.multiply,G.divide=function(N){if(a(N)||(N=d(N)),N.isZero())throw Error("division by zero");if(t){if(!this.unsigned&&this.high===-2147483648&&N.low===-1&&N.high===-1)return this;var k=(this.unsigned?t.div_u:t.div_s)(this.low,this.high,N.low,N.high);return g(k,t.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?R:T;var z,X,ie;if(this.unsigned){if(N.unsigned||(N=N.toUnsigned()),N.gt(this))return R;if(N.gt(this.shru(1)))return U;ie=R}else{if(this.eq(H)){if(N.eq(L)||N.eq(F))return H;if(N.eq(H))return L;var De=this.shr(1);return z=De.div(N).shl(1),z.eq(T)?N.isNegative()?L:F:(X=this.sub(N.mul(z)),ie=z.add(X.div(N)),ie)}else if(N.eq(H))return this.unsigned?R:T;if(this.isNegative())return N.isNegative()?this.neg().div(N.neg()):this.neg().div(N).neg();if(N.isNegative())return this.div(N.neg()).neg();ie=T}for(X=this;X.gte(N);){z=Math.max(1,Math.floor(X.toNumber()/N.toNumber()));for(var oe=Math.ceil(Math.log(z)/Math.LN2),Se=oe<=48?1:c(2,oe-48),Be=s(z),Re=Be.mul(N);Re.isNegative()||Re.gt(X);)z-=Se,Be=s(z,this.unsigned),Re=Be.mul(N);Be.isZero()&&(Be=L),ie=ie.add(Be),X=X.sub(Re)}return ie},G.div=G.divide,G.modulo=function(N){if(a(N)||(N=d(N)),t){var k=(this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,N.low,N.high);return g(k,t.get_high(),this.unsigned)}return this.sub(this.div(N).mul(N))},G.mod=G.modulo,G.rem=G.modulo,G.not=function(){return g(~this.low,~this.high,this.unsigned)},G.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},G.clz=G.countLeadingZeros,G.countTrailingZeros=function(){return this.low?e(this.low):e(this.high)+32},G.ctz=G.countTrailingZeros,G.and=function(N){return a(N)||(N=d(N)),g(this.low&N.low,this.high&N.high,this.unsigned)},G.or=function(N){return a(N)||(N=d(N)),g(this.low|N.low,this.high|N.high,this.unsigned)},G.xor=function(N){return a(N)||(N=d(N)),g(this.low^N.low,this.high^N.high,this.unsigned)},G.shiftLeft=function(N){return a(N)&&(N=N.toInt()),(N&=63)===0?this:N<32?g(this.low<>>32-N,this.unsigned):g(0,this.low<>>N|this.high<<32-N,this.high>>N,this.unsigned):g(this.high>>N-32,this.high>=0?0:-1,this.unsigned)},G.shr=G.shiftRight,G.shiftRightUnsigned=function(N){return a(N)&&(N=N.toInt()),(N&=63)===0?this:N<32?g(this.low>>>N|this.high<<32-N,this.high>>>N,this.unsigned):N===32?g(this.high,0,this.unsigned):g(this.high>>>N-32,0,this.unsigned)},G.shru=G.shiftRightUnsigned,G.shr_u=G.shiftRightUnsigned,G.rotateLeft=function(N){var k;return a(N)&&(N=N.toInt()),(N&=63)===0?this:N===32?g(this.high,this.low,this.unsigned):N<32?(k=32-N,g(this.low<>>k,this.high<>>k,this.unsigned)):(N-=32,k=32-N,g(this.high<>>k,this.low<>>k,this.unsigned))},G.rotl=G.rotateLeft,G.rotateRight=function(N){var k;return a(N)&&(N=N.toInt()),(N&=63)===0?this:N===32?g(this.high,this.low,this.unsigned):N<32?(k=32-N,g(this.high<>>N,this.low<>>N,this.unsigned)):(N-=32,k=32-N,g(this.low<>>N,this.high<>>N,this.unsigned))},G.rotr=G.rotateRight,G.toSigned=function(){return this.unsigned?g(this.low,this.high,!1):this},G.toUnsigned=function(){return this.unsigned?this:g(this.low,this.high,!0)},G.toBytes=function(N){return N?this.toBytesLE():this.toBytesBE()},G.toBytesLE=function(){var N=this.high,k=this.low;return[k&255,k>>>8&255,k>>>16&255,k>>>24,N&255,N>>>8&255,N>>>16&255,N>>>24]},G.toBytesBE=function(){var N=this.high,k=this.low;return[N>>>24,N>>>16&255,N>>>8&255,N&255,k>>>24,k>>>16&255,k>>>8&255,k&255]},o.fromBytes=function(N,k,z){return z?o.fromBytesLE(N,k):o.fromBytesBE(N,k)},o.fromBytesLE=function(N,k){return new o(N[0]|N[1]<<8|N[2]<<16|N[3]<<24,N[4]|N[5]<<8|N[6]<<16|N[7]<<24,k)},o.fromBytesBE=function(N,k){return new o(N[4]<<24|N[5]<<16|N[6]<<8|N[7],N[0]<<24|N[1]<<16|N[2]<<8|N[3],k)},typeof BigInt=="function"&&(o.fromBigInt=function(N,k){var z=Number(BigInt.asIntN(32,N)),X=Number(BigInt.asIntN(32,N>>BigInt(32)));return g(z,X,k)},o.fromValue=function(N,k){return typeof N=="bigint"?o.fromBigInt(N,k):d(N,k)},G.toBigInt=function(){var N=BigInt(this.low>>>0),k=BigInt(this.unsigned?this.high>>>0:this.high);return k<{"use strict";var fA=nk;fA.asPromise=XW();fA.base64=t6();fA.EventEmitter=i6();fA.float=I6();fA.utf8=d6();fA.pool=h6();fA.LongBits=u6();function B6(n){return n==="__proto__"||n==="prototype"||n==="constructor"}fA.isUnsafeProperty=B6;fA.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);fA.global=fA.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||nk;fA.emptyArray=Object.freeze?Object.freeze([]):[];fA.emptyObject=Object.freeze?Object.freeze({}):{};fA.isInteger=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};fA.isString=function(t){return typeof t=="string"||t instanceof String};fA.isObject=function(t){return t&&typeof t=="object"};fA.isset=fA.isSet=function(t,o){var a=t[o];return a!=null&&Object.hasOwnProperty.call(t,o)?typeof a!="object"||(Array.isArray(a)?a.length:Object.keys(a).length)>0:!1};fA.Buffer=(function(){try{var n=fA.global.Buffer;return n.prototype.utf8Write?n:null}catch{return null}})();fA._Buffer_from=null;fA._Buffer_allocUnsafe=null;fA.newBuffer=function(t){return typeof t=="number"?fA.Buffer?fA._Buffer_allocUnsafe(t):new fA.Array(t):fA.Buffer?fA._Buffer_from(t):typeof Uint8Array>"u"?t:new Uint8Array(t)};fA.Array=typeof Uint8Array<"u"?Uint8Array:Array;fA.Long=fA.global.dcodeIO&&fA.global.dcodeIO.Long||fA.global.Long||(function(){try{var n=C6();return n&&n.isLong?n:null}catch{return null}})();fA.key2Re=/^true|false|0|1$/;fA.key32Re=/^-?(?:0|[1-9][0-9]*)$/;fA.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;fA.longToHash=function(t){return t?fA.LongBits.from(t).toHash():fA.LongBits.zeroHash};fA.longFromHash=function(t,o){var a=fA.LongBits.fromHash(t);return fA.Long?fA.Long.fromBits(a.lo,a.hi,o):a.toNumber(!!o)};function f6(n){var t=typeof arguments[arguments.length-1]=="boolean",o=t?arguments.length-1:arguments.length;t=t&&arguments[arguments.length-1];for(var a=1;a-1;--i)if(o[e[i]]===1&&this[e[i]]!==void 0&&this[e[i]]!==null)return e[i]}};fA.oneOfSetter=function(t){return function(o){for(var a=0;a{"use strict";w6.exports=mt;var Wo=qc(),sk,ES=Wo.LongBits,y6=Wo.base64,m6=Wo.utf8;function NC(n,t,o){this.fn=n,this.len=t,this.next=void 0,this.val=o}function ck(){}function ake(n){this.head=n.head,this.tail=n.tail,this.len=n.len,this.next=n.states}function mt(){this.len=0,this.head=new NC(ck,0,0),this.tail=this.head,this.states=null}var S6=function(){return Wo.Buffer?function(){return(mt.create=function(){return new sk})()}:function(){return new mt}};mt.create=S6();mt.alloc=function(t){return new Wo.Array(t)};Wo.Array!==Array&&(mt.alloc=Wo.pool(mt.alloc,Wo.Array.prototype.subarray));mt.prototype._push=function(t,o,a){return this.tail=this.tail.next=new NC(t,o,a),this.len+=o,this};function Ik(n,t,o){t[o]=n&255}function oke(n,t,o){for(;n>127;)t[o++]=n&127|128,n>>>=7;t[o]=n}function lk(n,t){this.len=n,this.next=void 0,this.val=t}lk.prototype=Object.create(NC.prototype);lk.prototype.fn=oke;mt.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new lk((t=t>>>0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this};mt.prototype.int32=function(t){return(t|=0)<0?this._push(dk,10,ES.fromNumber(t)):this.uint32(t)};mt.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)};function dk(n,t,o){for(var a=n.lo,e=n.hi;e;)t[o++]=a&127|128,a=(a>>>7|e<<25)>>>0,e>>>=7;for(;a>127;)t[o++]=a&127|128,a=a>>>7;t[o++]=a}mt.prototype.uint64=function(t){var o=ES.from(t);return this._push(dk,o.length(),o)};mt.prototype.int64=mt.prototype.uint64;mt.prototype.sint64=function(t){var o=ES.from(t).zzEncode();return this._push(dk,o.length(),o)};mt.prototype.bool=function(t){return this._push(Ik,1,t?1:0)};function gk(n,t,o){t[o]=n&255,t[o+1]=n>>>8&255,t[o+2]=n>>>16&255,t[o+3]=n>>>24}mt.prototype.fixed32=function(t){return this._push(gk,4,t>>>0)};mt.prototype.sfixed32=mt.prototype.fixed32;mt.prototype.fixed64=function(t){var o=ES.from(t);return this._push(gk,4,o.lo)._push(gk,4,o.hi)};mt.prototype.sfixed64=mt.prototype.fixed64;mt.prototype.float=function(t){return this._push(Wo.float.writeFloatLE,4,t)};mt.prototype.double=function(t){return this._push(Wo.float.writeDoubleLE,8,t)};var nke=Wo.Array.prototype.set?function(t,o,a){o.set(t,a)}:function(t,o,a){for(var e=0;e>>0;if(!o)return this._push(Ik,1,0);if(Wo.isString(t)){var a=mt.alloc(o=y6.length(t));y6.decode(t,a,0),t=a}return this.uint32(o)._push(nke,o,t)};mt.prototype.string=function(t){var o=m6.length(t);return o?this.uint32(o)._push(m6.write,o,t):this._push(Ik,1,0)};mt.prototype.fork=function(){return this.states=new ake(this),this.head=this.tail=new NC(ck,0,0),this.len=0,this};mt.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new NC(ck,0,0),this.len=0),this};mt.prototype.ldelim=function(){var t=this.head,o=this.tail,a=this.len;return this.reset().uint32(a),a&&(this.tail.next=t.next,this.tail=o,this.len+=a),this};mt.prototype.finish=function(){for(var t=this.head.next,o=this.constructor.alloc(this.len),a=0;t;)t.fn(t.val,o,a),a+=t.len,t=t.next;return o};mt._configure=function(n){sk=n,mt.create=S6(),sk._configure()}});var b6=ee((MpA,O6)=>{"use strict";O6.exports=Ns;var D6=pk();(Ns.prototype=Object.create(D6.prototype)).constructor=Ns;var zc=qc();function Ns(){D6.call(this)}Ns._configure=function(){Ns.alloc=zc._Buffer_allocUnsafe,Ns.writeBytesBuffer=zc.Buffer&&zc.Buffer.prototype instanceof Uint8Array&&zc.Buffer.prototype.set.name==="set"?function(t,o,a){o.set(t,a)}:function(t,o,a){if(t.copy)t.copy(o,a,0,t.length);else for(var e=0;e>>0;return this.uint32(o),o&&this._push(Ns.writeBytesBuffer,o,t),this};function ske(n,t,o){n.length<40?zc.utf8.write(n,t,o):t.utf8Write?t.utf8Write(n,o):t.write(n,o)}Ns.prototype.string=function(t){var o=zc.Buffer.byteLength(t);return this.uint32(o),o&&this._push(ske,o,t),this};Ns._configure()});var uk=ee((_pA,R6)=>{"use strict";R6.exports=Er;var Zo=qc(),Ek,T6=Zo.LongBits,gke=Zo.utf8;function Gn(n,t){return RangeError("index out of range: "+n.pos+" + "+(t||1)+" > "+n.len)}function Er(n){this.buf=n,this.pos=0,this.len=n.length}var M6=typeof Uint8Array<"u"?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new Er(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new Er(t);throw Error("illegal buffer")},N6=function(){return Zo.Buffer?function(o){return(Er.create=function(e){return Zo.Buffer.isBuffer(e)?new Ek(e):M6(e)})(o)}:M6};Er.create=N6();Er.prototype._slice=Zo.Array.prototype.subarray||Zo.Array.prototype.slice;Er.prototype.uint32=(function(){var t=4294967295;return function(){if(t=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(t=(t|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return t;if((this.pos+=5)>this.len)throw this.pos=this.len,Gn(this,10);return t}})();Er.prototype.int32=function(){return this.uint32()|0};Er.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(t&1)|0};function hk(){var n=new T6(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(n.lo=(n.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n;if(n.lo=(n.lo|(this.buf[this.pos]&127)<<28)>>>0,n.hi=(n.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return n;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw Gn(this);if(n.lo=(n.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}return n.lo=(n.lo|(this.buf[this.pos++]&127)<>>0,n}if(this.len-this.pos>4){for(;t<5;++t)if(n.hi=(n.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}else for(;t<5;++t){if(this.pos>=this.len)throw Gn(this);if(n.hi=(n.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}throw Error("invalid varint encoding")}Er.prototype.bool=function(){return this.uint32()!==0};function uS(n,t){return(n[t-4]|n[t-3]<<8|n[t-2]<<16|n[t-1]<<24)>>>0}Er.prototype.fixed32=function(){if(this.pos+4>this.len)throw Gn(this,4);return uS(this.buf,this.pos+=4)};Er.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Gn(this,4);return uS(this.buf,this.pos+=4)|0};function _6(){if(this.pos+8>this.len)throw Gn(this,8);return new T6(uS(this.buf,this.pos+=4),uS(this.buf,this.pos+=4))}Er.prototype.float=function(){if(this.pos+4>this.len)throw Gn(this,4);var t=Zo.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t};Er.prototype.double=function(){if(this.pos+8>this.len)throw Gn(this,4);var t=Zo.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t};Er.prototype.bytes=function(){var t=this.uint32(),o=this.pos,a=this.pos+t;if(a>this.len)throw Gn(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(o,a);if(o===a){var e=Zo.Buffer;return e?e.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,a)};Er.prototype.string=function(){var t=this.bytes();return gke.read(t,0,t.length)};Er.prototype.skip=function(t){if(typeof t=="number"){if(this.pos+t>this.len)throw Gn(this,t);this.pos+=t}else do if(this.pos>=this.len)throw Gn(this);while(this.buf[this.pos++]&128);return this};Er.recursionLimit=Zo.recursionLimit;Er.prototype.skipType=function(n,t){if(t===void 0&&(t=0),t>Er.recursionLimit)throw Error("maximum nesting depth exceeded");switch(n){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(n=this.uint32()&7)!==4;)this.skipType(n,t+1);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+n+" at offset "+this.pos)}return this};Er._configure=function(n){Ek=n,Er.create=N6(),Ek._configure();var t=Zo.Long?"toLong":"toNumber";Zo.merge(Er.prototype,{int64:function(){return hk.call(this)[t](!1)},uint64:function(){return hk.call(this)[t](!0)},sint64:function(){return hk.call(this).zzDecode()[t](!1)},fixed64:function(){return _6.call(this)[t](!0)},sfixed64:function(){return _6.call(this)[t](!1)}})}});var G6=ee((TpA,P6)=>{"use strict";P6.exports=kl;var v6=uk();(kl.prototype=Object.create(v6.prototype)).constructor=kl;var k6=qc();function kl(n){v6.call(this,n)}kl._configure=function(){k6.Buffer&&(kl.prototype._slice=k6.Buffer.prototype.slice)};kl.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))};kl._configure()});var L6=ee((NpA,F6)=>{"use strict";F6.exports=RC;var Ck=qc();(RC.prototype=Object.create(Ck.EventEmitter.prototype)).constructor=RC;function RC(n,t,o){if(typeof n!="function")throw TypeError("rpcImpl must be a function");Ck.EventEmitter.call(this),this.rpcImpl=n,this.requestDelimited=!!t,this.responseDelimited=!!o}RC.prototype.rpcCall=function n(t,o,a,e,i){if(!e)throw TypeError("request must be specified");var A=this;if(!i)return Ck.asPromise(n,A,t,o,a,e);if(!A.rpcImpl){setTimeout(function(){i(Error("already ended"))},0);return}try{return A.rpcImpl(t,o[A.requestDelimited?"encodeDelimited":"encode"](e).finish(),function(s,g){if(s)return A.emit("error",s,t),i(s);if(g===null){A.end(!0);return}if(!(g instanceof a))try{g=a[A.responseDelimited?"decodeDelimited":"decode"](g)}catch(c){return A.emit("error",c,t),i(c)}return A.emit("data",g,t),i(null,g)})}catch(r){A.emit("error",r,t),setTimeout(function(){i(r)},0);return}};RC.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var H6=ee(U6=>{"use strict";var cke=U6;cke.Service=L6()});var x6=ee((kpA,K6)=>{"use strict";K6.exports=Object.create(null)});var J6=ee(j6=>{"use strict";var za=j6;za.build="minimal";za.Writer=pk();za.BufferWriter=b6();za.Reader=uk();za.BufferReader=G6();za.util=qc();za.rpc=H6();za.roots=x6();za.configure=Y6;function Y6(){za.util._configure(),za.Writer._configure(za.BufferWriter),za.Reader._configure(za.BufferReader)}Y6()});var CS=ee((PpA,q6)=>{"use strict";q6.exports=J6()});var WZ=ee(st=>{"use strict";var nB=Symbol.for("react.element"),RFe=Symbol.for("react.portal"),kFe=Symbol.for("react.fragment"),vFe=Symbol.for("react.strict_mode"),PFe=Symbol.for("react.profiler"),GFe=Symbol.for("react.provider"),FFe=Symbol.for("react.context"),LFe=Symbol.for("react.forward_ref"),UFe=Symbol.for("react.suspense"),HFe=Symbol.for("react.memo"),KFe=Symbol.for("react.lazy"),LZ=Symbol.iterator;function xFe(n){return n===null||typeof n!="object"?null:(n=LZ&&n[LZ]||n["@@iterator"],typeof n=="function"?n:null)}var KZ={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xZ=Object.assign,YZ={};function uh(n,t,o){this.props=n,this.context=t,this.refs=YZ,this.updater=o||KZ}uh.prototype.isReactComponent={};uh.prototype.setState=function(n,t){if(typeof n!="object"&&typeof n!="function"&&n!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,n,t,"setState")};uh.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function jZ(){}jZ.prototype=uh.prototype;function MG(n,t,o){this.props=n,this.context=t,this.refs=YZ,this.updater=o||KZ}var _G=MG.prototype=new jZ;_G.constructor=MG;xZ(_G,uh.prototype);_G.isPureReactComponent=!0;var UZ=Array.isArray,JZ=Object.prototype.hasOwnProperty,TG={current:null},qZ={key:!0,ref:!0,__self:!0,__source:!0};function zZ(n,t,o){var a,e={},i=null,A=null;if(t!=null)for(a in t.ref!==void 0&&(A=t.ref),t.key!==void 0&&(i=""+t.key),t)JZ.call(t,a)&&!qZ.hasOwnProperty(a)&&(e[a]=t[a]);var r=arguments.length-2;if(r===1)e.children=o;else if(1{"use strict";process.env.NODE_ENV!=="production"&&(function(){"use strict";typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var n="18.3.1",t=Symbol.for("react.element"),o=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),r=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),B=Symbol.for("react.offscreen"),f=Symbol.iterator,Q="@@iterator";function y(x){if(x===null||typeof x!="object")return null;var te=f&&x[f]||x[Q];return typeof te=="function"?te:null}var m={current:null},_={transition:null},T={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},R={current:null},L={},U=null;function F(x){U=x}L.setExtraStackFrame=function(x){U=x},L.getCurrentStack=null,L.getStackAddendum=function(){var x="";U&&(x+=U);var te=L.getCurrentStack;return te&&(x+=te()||""),x};var J=!1,V=!1,H=!1,G=!1,q=!1,K={ReactCurrentDispatcher:m,ReactCurrentBatchConfig:_,ReactCurrentOwner:R};K.ReactDebugCurrentFrame=L,K.ReactCurrentActQueue=T;function N(x){{for(var te=arguments.length,pe=new Array(te>1?te-1:0),me=1;me1?te-1:0),me=1;me1){for(var Ar=Array(Ht),tr=0;tr1){for(var lr=Array(tr),Nr=0;Nr is not supported and will be removed in a future major release. Did you mean to render instead?")),te.Provider},set:function(CA){te.Provider=CA}},_currentValue:{get:function(){return te._currentValue},set:function(CA){te._currentValue=CA}},_currentValue2:{get:function(){return te._currentValue2},set:function(CA){te._currentValue2=CA}},_threadCount:{get:function(){return te._threadCount},set:function(CA){te._threadCount=CA}},Consumer:{get:function(){return pe||(pe=!0,k("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),te.Consumer}},displayName:{get:function(){return te.displayName},set:function(CA){Ve||(N("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",CA),Ve=!0)}}}),te.Consumer=TA}return te._currentRenderer=null,te._currentRenderer2=null,te}var he=-1,ye=0,qe=1,IA=2;function yA(x){if(x._status===he){var te=x._result,pe=te();if(pe.then(function(TA){if(x._status===ye||x._status===he){var CA=x;CA._status=qe,CA._result=TA}},function(TA){if(x._status===ye||x._status===he){var CA=x;CA._status=IA,CA._result=TA}}),x._status===he){var me=x;me._status=ye,me._result=pe}}if(x._status===qe){var Ve=x._result;return Ve===void 0&&k(`lazy: Expected the result of a dynamic import() call. Instead received: %s Your code should look like: const MyComponent = lazy(() => import('./MyComponent')) @@ -33,49 +33,49 @@ Your code should look like: Did you accidentally put curly braces around the import?`,Ve),"default"in Ve||k(`lazy: Expected the result of a dynamic import() call. Instead received: %s Your code should look like: - const MyComponent = lazy(() => import('./MyComponent'))`,Ve),Ve.default}else throw x._result}function $A(x){var te={_status:he,_result:x},pe={$$typeof:d,_payload:te,_init:yA};{var me,Ve;Object.defineProperties(pe,{defaultProps:{configurable:!0,get:function(){return me},set:function(TA){k("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),me=TA,Object.defineProperty(pe,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return Ve},set:function(TA){k("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),Ve=TA,Object.defineProperty(pe,"propTypes",{enumerable:!0})}}})}return pe}function vA(x){x!=null&&x.$$typeof===I?k("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof x!="function"?k("forwardRef requires a render function but was given %s.",x===null?"null":typeof x):x.length!==0&&x.length!==2&&k("forwardRef render functions accept exactly two parameters: props and ref. %s",x.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),x!=null&&(x.defaultProps!=null||x.propTypes!=null)&&k("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var te={$$typeof:s,render:x};{var pe;Object.defineProperty(te,"displayName",{enumerable:!1,configurable:!0,get:function(){return pe},set:function(me){pe=me,!x.name&&!x.displayName&&(x.displayName=me)}})}return te}var YA;YA=Symbol.for("react.module.reference");function At(x){return!!(typeof x=="string"||typeof x=="function"||x===a||x===i||V||x===e||x===g||x===c||G||x===B||z||J||K||typeof x=="object"&&x!==null&&(x.$$typeof===d||x.$$typeof===I||x.$$typeof===A||x.$$typeof===r||x.$$typeof===s||x.$$typeof===YA||x.getModuleId!==void 0))}function Ge(x,te){At(x)||k("memo: The first argument must be a component. Instead received: %s",x===null?"null":typeof x);var pe={$$typeof:I,type:x,compare:te===void 0?null:te};{var me;Object.defineProperty(pe,"displayName",{enumerable:!1,configurable:!0,get:function(){return me},set:function(Ve){me=Ve,!x.name&&!x.displayName&&(x.displayName=Ve)}})}return pe}function rA(){var x=m.current;return x===null&&k(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: + const MyComponent = lazy(() => import('./MyComponent'))`,Ve),Ve.default}else throw x._result}function $A(x){var te={_status:he,_result:x},pe={$$typeof:d,_payload:te,_init:yA};{var me,Ve;Object.defineProperties(pe,{defaultProps:{configurable:!0,get:function(){return me},set:function(TA){k("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),me=TA,Object.defineProperty(pe,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return Ve},set:function(TA){k("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),Ve=TA,Object.defineProperty(pe,"propTypes",{enumerable:!0})}}})}return pe}function vA(x){x!=null&&x.$$typeof===I?k("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof x!="function"?k("forwardRef requires a render function but was given %s.",x===null?"null":typeof x):x.length!==0&&x.length!==2&&k("forwardRef render functions accept exactly two parameters: props and ref. %s",x.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),x!=null&&(x.defaultProps!=null||x.propTypes!=null)&&k("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var te={$$typeof:s,render:x};{var pe;Object.defineProperty(te,"displayName",{enumerable:!1,configurable:!0,get:function(){return pe},set:function(me){pe=me,!x.name&&!x.displayName&&(x.displayName=me)}})}return te}var YA;YA=Symbol.for("react.module.reference");function At(x){return!!(typeof x=="string"||typeof x=="function"||x===a||x===i||q||x===e||x===g||x===c||G||x===B||J||V||H||typeof x=="object"&&x!==null&&(x.$$typeof===d||x.$$typeof===I||x.$$typeof===A||x.$$typeof===r||x.$$typeof===s||x.$$typeof===YA||x.getModuleId!==void 0))}function Ge(x,te){At(x)||k("memo: The first argument must be a component. Instead received: %s",x===null?"null":typeof x);var pe={$$typeof:I,type:x,compare:te===void 0?null:te};{var me;Object.defineProperty(pe,"displayName",{enumerable:!1,configurable:!0,get:function(){return me},set:function(Ve){me=Ve,!x.name&&!x.displayName&&(x.displayName=Ve)}})}return pe}function rA(){var x=m.current;return x===null&&k(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: 1. You might have mismatching versions of React and the renderer (such as React DOM) 2. You might be breaking the Rules of Hooks 3. You might have more than one copy of React in the same app -See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),x}function tt(x){var te=rA();if(x._context!==void 0){var pe=x._context;pe.Consumer===x?k("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):pe.Provider===x&&k("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return te.useContext(x)}function ri(x){var te=rA();return te.useState(x)}function Ir(x,te,pe){var me=rA();return me.useReducer(x,te,pe)}function Mo(x){var te=rA();return te.useRef(x)}function p_(x,te){var pe=rA();return pe.useEffect(x,te)}function h_(x,te){var pe=rA();return pe.useInsertionEffect(x,te)}function _o(x,te){var pe=rA();return pe.useLayoutEffect(x,te)}function Ud(x,te){var pe=rA();return pe.useCallback(x,te)}function E_(x,te){var pe=rA();return pe.useMemo(x,te)}function u_(x,te,pe){var me=rA();return me.useImperativeHandle(x,te,pe)}function Mde(x,te){{var pe=rA();return pe.useDebugValue(x,te)}}function _de(){var x=rA();return x.useTransition()}function Tde(x){var te=rA();return te.useDeferredValue(x)}function Nde(){var x=rA();return x.useId()}function Rde(x,te,pe){var me=rA();return me.useSyncExternalStore(x,te,pe)}var au=0,Sx,wx,Dx,Ox,bx,Mx,_x;function Tx(){}Tx.__reactDisabledLog=!0;function kde(){{if(au===0){Sx=console.log,wx=console.info,Dx=console.warn,Ox=console.error,bx=console.group,Mx=console.groupCollapsed,_x=console.groupEnd;var x={configurable:!0,enumerable:!0,value:Tx,writable:!0};Object.defineProperties(console,{info:x,log:x,warn:x,error:x,group:x,groupCollapsed:x,groupEnd:x})}au++}}function vde(){{if(au--,au===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:oe({},x,{value:Sx}),info:oe({},x,{value:wx}),warn:oe({},x,{value:Dx}),error:oe({},x,{value:Ox}),group:oe({},x,{value:bx}),groupCollapsed:oe({},x,{value:Mx}),groupEnd:oe({},x,{value:_x})})}au<0&&k("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var C_=H.ReactCurrentDispatcher,B_;function kQ(x,te,pe){{if(B_===void 0)try{throw Error()}catch(Ve){var me=Ve.stack.trim().match(/\n( *(at )?)/);B_=me&&me[1]||""}return` -`+B_+x}}var f_=!1,vQ;{var Pde=typeof WeakMap=="function"?WeakMap:Map;vQ=new Pde}function Nx(x,te){if(!x||f_)return"";{var pe=vQ.get(x);if(pe!==void 0)return pe}var me;f_=!0;var Ve=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var TA;TA=C_.current,C_.current=null,kde();try{if(te){var CA=function(){throw Error()};if(Object.defineProperty(CA.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(CA,[])}catch(Oi){me=Oi}Reflect.construct(x,[],CA)}else{try{CA.call()}catch(Oi){me=Oi}x.call(CA.prototype)}}else{try{throw Error()}catch(Oi){me=Oi}x()}}catch(Oi){if(Oi&&me&&typeof Oi.stack=="string"){for(var xA=Oi.stack.split(` +See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),x}function tt(x){var te=rA();if(x._context!==void 0){var pe=x._context;pe.Consumer===x?k("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):pe.Provider===x&&k("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return te.useContext(x)}function ri(x){var te=rA();return te.useState(x)}function Ir(x,te,pe){var me=rA();return me.useReducer(x,te,pe)}function Mo(x){var te=rA();return te.useRef(x)}function p_(x,te){var pe=rA();return pe.useEffect(x,te)}function h_(x,te){var pe=rA();return pe.useInsertionEffect(x,te)}function _o(x,te){var pe=rA();return pe.useLayoutEffect(x,te)}function Ud(x,te){var pe=rA();return pe.useCallback(x,te)}function E_(x,te){var pe=rA();return pe.useMemo(x,te)}function u_(x,te,pe){var me=rA();return me.useImperativeHandle(x,te,pe)}function Nde(x,te){{var pe=rA();return pe.useDebugValue(x,te)}}function Rde(){var x=rA();return x.useTransition()}function kde(x){var te=rA();return te.useDeferredValue(x)}function vde(){var x=rA();return x.useId()}function Pde(x,te,pe){var me=rA();return me.useSyncExternalStore(x,te,pe)}var au=0,Sx,wx,Dx,Ox,bx,Mx,_x;function Tx(){}Tx.__reactDisabledLog=!0;function Gde(){{if(au===0){Sx=console.log,wx=console.info,Dx=console.warn,Ox=console.error,bx=console.group,Mx=console.groupCollapsed,_x=console.groupEnd;var x={configurable:!0,enumerable:!0,value:Tx,writable:!0};Object.defineProperties(console,{info:x,log:x,warn:x,error:x,group:x,groupCollapsed:x,groupEnd:x})}au++}}function Fde(){{if(au--,au===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:oe({},x,{value:Sx}),info:oe({},x,{value:wx}),warn:oe({},x,{value:Dx}),error:oe({},x,{value:Ox}),group:oe({},x,{value:bx}),groupCollapsed:oe({},x,{value:Mx}),groupEnd:oe({},x,{value:_x})})}au<0&&k("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var C_=K.ReactCurrentDispatcher,B_;function vQ(x,te,pe){{if(B_===void 0)try{throw Error()}catch(Ve){var me=Ve.stack.trim().match(/\n( *(at )?)/);B_=me&&me[1]||""}return` +`+B_+x}}var f_=!1,PQ;{var Lde=typeof WeakMap=="function"?WeakMap:Map;PQ=new Lde}function Nx(x,te){if(!x||f_)return"";{var pe=PQ.get(x);if(pe!==void 0)return pe}var me;f_=!0;var Ve=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var TA;TA=C_.current,C_.current=null,Gde();try{if(te){var CA=function(){throw Error()};if(Object.defineProperty(CA.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(CA,[])}catch(Oi){me=Oi}Reflect.construct(x,[],CA)}else{try{CA.call()}catch(Oi){me=Oi}x.call(CA.prototype)}}else{try{throw Error()}catch(Oi){me=Oi}x()}}catch(Oi){if(Oi&&me&&typeof Oi.stack=="string"){for(var xA=Oi.stack.split(` `),Et=me.stack.split(` `),Ht=xA.length-1,Ar=Et.length-1;Ht>=1&&Ar>=0&&xA[Ht]!==Et[Ar];)Ar--;for(;Ht>=1&&Ar>=0;Ht--,Ar--)if(xA[Ht]!==Et[Ar]){if(Ht!==1||Ar!==1)do if(Ht--,Ar--,Ar<0||xA[Ht]!==Et[Ar]){var tr=` -`+xA[Ht].replace(" at new "," at ");return x.displayName&&tr.includes("")&&(tr=tr.replace("",x.displayName)),typeof x=="function"&&vQ.set(x,tr),tr}while(Ht>=1&&Ar>=0);break}}}finally{f_=!1,C_.current=TA,vde(),Error.prepareStackTrace=Ve}var lr=x?x.displayName||x.name:"",Nr=lr?kQ(lr):"";return typeof x=="function"&&vQ.set(x,Nr),Nr}function Gde(x,te,pe){return Nx(x,!1)}function Fde(x){var te=x.prototype;return!!(te&&te.isReactComponent)}function PQ(x,te,pe){if(x==null)return"";if(typeof x=="function")return Nx(x,Fde(x));if(typeof x=="string")return kQ(x);switch(x){case g:return kQ("Suspense");case c:return kQ("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case s:return Gde(x.render);case I:return PQ(x.type,te,pe);case d:{var me=x,Ve=me._payload,TA=me._init;try{return PQ(TA(Ve),te,pe)}catch{}}}return""}var Rx={},kx=H.ReactDebugCurrentFrame;function GQ(x){if(x){var te=x._owner,pe=PQ(x.type,x._source,te?te.type:null);kx.setExtraStackFrame(pe)}else kx.setExtraStackFrame(null)}function Lde(x,te,pe,me,Ve){{var TA=Function.call.bind(ke);for(var CA in x)if(TA(x,CA)){var xA=void 0;try{if(typeof x[CA]!="function"){var Et=Error((me||"React class")+": "+pe+" type `"+CA+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[CA]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Et.name="Invariant Violation",Et}xA=x[CA](te,CA,me,pe,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ht){xA=Ht}xA&&!(xA instanceof Error)&&(GQ(Ve),k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",me||"React class",pe,CA,typeof xA),GQ(null)),xA instanceof Error&&!(xA.message in Rx)&&(Rx[xA.message]=!0,GQ(Ve),k("Failed %s type: %s",pe,xA.message),GQ(null))}}}function Hd(x){if(x){var te=x._owner,pe=PQ(x.type,x._source,te?te.type:null);F(pe)}else F(null)}var Q_;Q_=!1;function vx(){if(R.current){var x=Ce(R.current.type);if(x)return` +`+xA[Ht].replace(" at new "," at ");return x.displayName&&tr.includes("")&&(tr=tr.replace("",x.displayName)),typeof x=="function"&&PQ.set(x,tr),tr}while(Ht>=1&&Ar>=0);break}}}finally{f_=!1,C_.current=TA,Fde(),Error.prepareStackTrace=Ve}var lr=x?x.displayName||x.name:"",Nr=lr?vQ(lr):"";return typeof x=="function"&&PQ.set(x,Nr),Nr}function Ude(x,te,pe){return Nx(x,!1)}function Hde(x){var te=x.prototype;return!!(te&&te.isReactComponent)}function GQ(x,te,pe){if(x==null)return"";if(typeof x=="function")return Nx(x,Hde(x));if(typeof x=="string")return vQ(x);switch(x){case g:return vQ("Suspense");case c:return vQ("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case s:return Ude(x.render);case I:return GQ(x.type,te,pe);case d:{var me=x,Ve=me._payload,TA=me._init;try{return GQ(TA(Ve),te,pe)}catch{}}}return""}var Rx={},kx=K.ReactDebugCurrentFrame;function FQ(x){if(x){var te=x._owner,pe=GQ(x.type,x._source,te?te.type:null);kx.setExtraStackFrame(pe)}else kx.setExtraStackFrame(null)}function Kde(x,te,pe,me,Ve){{var TA=Function.call.bind(ke);for(var CA in x)if(TA(x,CA)){var xA=void 0;try{if(typeof x[CA]!="function"){var Et=Error((me||"React class")+": "+pe+" type `"+CA+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[CA]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Et.name="Invariant Violation",Et}xA=x[CA](te,CA,me,pe,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ht){xA=Ht}xA&&!(xA instanceof Error)&&(FQ(Ve),k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",me||"React class",pe,CA,typeof xA),FQ(null)),xA instanceof Error&&!(xA.message in Rx)&&(Rx[xA.message]=!0,FQ(Ve),k("Failed %s type: %s",pe,xA.message),FQ(null))}}}function Hd(x){if(x){var te=x._owner,pe=GQ(x.type,x._source,te?te.type:null);F(pe)}else F(null)}var Q_;Q_=!1;function vx(){if(R.current){var x=Ce(R.current.type);if(x)return` -Check the render method of \``+x+"`."}return""}function Ude(x){if(x!==void 0){var te=x.fileName.replace(/^.*[\\\/]/,""),pe=x.lineNumber;return` +Check the render method of \``+x+"`."}return""}function xde(x){if(x!==void 0){var te=x.fileName.replace(/^.*[\\\/]/,""),pe=x.lineNumber;return` -Check your code at `+te+":"+pe+"."}return""}function Hde(x){return x!=null?Ude(x.__source):""}var Px={};function Kde(x){var te=vx();if(!te){var pe=typeof x=="string"?x:x.displayName||x.name;pe&&(te=` +Check your code at `+te+":"+pe+"."}return""}function Yde(x){return x!=null?xde(x.__source):""}var Px={};function jde(x){var te=vx();if(!te){var pe=typeof x=="string"?x:x.displayName||x.name;pe&&(te=` -Check the top-level render call using <`+pe+">.")}return te}function Gx(x,te){if(!(!x._store||x._store.validated||x.key!=null)){x._store.validated=!0;var pe=Kde(te);if(!Px[pe]){Px[pe]=!0;var me="";x&&x._owner&&x._owner!==R.current&&(me=" It was passed a child from "+Ce(x._owner.type)+"."),Hd(x),k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',pe,me),Hd(null)}}}function Fx(x,te){if(typeof x=="object"){if(je(x))for(var pe=0;pe",Ve=" Did you accidentally export a JSX literal instead of a component?"):CA=typeof x,k("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",CA,Ve)}var xA=Qe.apply(this,arguments);if(xA==null)return xA;if(me)for(var Et=2;Et10&&N("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),me._updatedFibers.clear()}}}var Kx=!1,FQ=null;function qde(x){if(FQ===null)try{var te=("require"+Math.random()).slice(0,7),pe=hw&&hw[te];FQ=pe.call(hw,"timers").setImmediate}catch{FQ=function(Ve){Kx===!1&&(Kx=!0,typeof MessageChannel>"u"&&k("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var TA=new MessageChannel;TA.port1.onmessage=Ve,TA.port2.postMessage(void 0)}}return FQ(x)}var Kd=0,xx=!1;function Yx(x){{var te=Kd;Kd++,T.current===null&&(T.current=[]);var pe=T.isBatchingLegacy,me;try{if(T.isBatchingLegacy=!0,me=x(),!pe&&T.didScheduleLegacyUpdate){var Ve=T.current;Ve!==null&&(T.didScheduleLegacyUpdate=!1,S_(Ve))}}catch(lr){throw LQ(te),lr}finally{T.isBatchingLegacy=pe}if(me!==null&&typeof me=="object"&&typeof me.then=="function"){var TA=me,CA=!1,xA={then:function(lr,Nr){CA=!0,TA.then(function(Oi){LQ(te),Kd===0?y_(Oi,lr,Nr):lr(Oi)},function(Oi){LQ(te),Nr(Oi)})}};return!xx&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){CA||(xx=!0,k("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),xA}else{var Et=me;if(LQ(te),Kd===0){var Ht=T.current;Ht!==null&&(S_(Ht),T.current=null);var Ar={then:function(lr,Nr){T.current===null?(T.current=[],y_(Et,lr,Nr)):lr(Et)}};return Ar}else{var tr={then:function(lr,Nr){lr(Et)}};return tr}}}}function LQ(x){x!==Kd-1&&k("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Kd=x}function y_(x,te,pe){{var me=T.current;if(me!==null)try{S_(me),qde(function(){me.length===0?(T.current=null,te(x)):y_(x,te,pe)})}catch(Ve){pe(Ve)}else te(x)}}var m_=!1;function S_(x){if(!m_){m_=!0;var te=0;try{for(;te{"use strict";process.env.NODE_ENV==="production"?RG.exports=qZ():RG.exports=zZ()});var Zl=ee((MSA,a7)=>{"use strict";var OD=$e("crypto"),dxe=$e("assert");function tn(n){if(!(n instanceof Buffer))throw TypeError(`Expected Buffer instead of: ${n.constructor.name}`);return n}function pxe(n,t,o){tn(n),tn(t),tn(o);let a=OD.createCipheriv("aes-256-cbc",n,o);return Buffer.concat([a.update(t),a.final()])}function hxe(n,t,o){tn(n),tn(t),tn(o);let a=OD.createDecipheriv("aes-256-cbc",n,o);return Buffer.concat([a.update(t),a.final()])}function _h(n,t){tn(n),tn(t);let o=OD.createHmac("sha256",n);return o.update(t),Buffer.from(o.digest())}function Exe(n){tn(n);let t=OD.createHash("sha512");return t.update(n),t.digest()}function uxe(n,t,o,a){if(tn(n),tn(t),tn(o),t.byteLength!=32)throw new Error("Got salt of incorrect length");a=a||3,dxe(a>=1&&a<=3);let e=_h(t,n),i=new Uint8Array(o.byteLength+1+32);i.set(o,32),i[i.length-1]=1;let A=[_h(e,Buffer.from(i.slice(32)))];return a>1&&(i.set(A[A.length-1]),i[i.length-1]=2,A.push(_h(e,Buffer.from(i)))),a>2&&(i.set(A[A.length-1]),i[i.length-1]=3,A.push(_h(e,Buffer.from(i)))),A}function Cxe(n,t,o,a){let e=_h(t,n).slice(0,a);if(o.length!==a||e.length!==a)throw new Error("Bad MAC length");if(!o.equals(e))throw new Error("Bad MAC")}a7.exports={deriveSecrets:uxe,decrypt:hxe,encrypt:pxe,hash:Exe,calculateMAC:_h,verifyMAC:Cxe}});var B7=ee(Vg=>{"use strict";Object.defineProperty(Vg,"__esModule",{value:!0});var _SA=new Uint8Array(16),d7=new Uint8Array(32);d7[0]=9;function hA(n){var t,o=new Float64Array(16);if(n)for(t=0;t>24&255,n[t+1]=o>>16&255,n[t+2]=o>>8&255,n[t+3]=o&255,n[t+4]=a>>24&255,n[t+5]=a>>16&255,n[t+6]=a>>8&255,n[t+7]=a&255}function mxe(n,t,o,a,e){var i,A=0;for(i=0;i>>8)-1}function p7(n,t,o,a){return mxe(n,t,o,a,32)}function aI(n,t){var o;for(o=0;o<16;o++)n[o]=t[o]|0}function IL(n){var t,o,a=1;for(t=0;t<16;t++)o=n[t]+a+65535,a=Math.floor(o/65536),n[t]=o-a*65536;n[0]+=a-1+37*(a-1)}function Th(n,t,o){for(var a,e=~(o-1),i=0;i<16;i++)a=e&(n[i]^t[i]),n[i]^=a,t[i]^=a}function Rh(n,t){var o,a,e,i=hA(),A=hA();for(o=0;o<16;o++)A[o]=t[o];for(IL(A),IL(A),IL(A),a=0;a<2;a++){for(i[0]=A[0]-65517,o=1;o<15;o++)i[o]=A[o]-65535-(i[o-1]>>16&1),i[o-1]&=65535;i[15]=A[15]-32767-(i[14]>>16&1),e=i[15]>>16&1,i[14]&=65535,Th(A,i,1-e)}for(o=0;o<16;o++)n[2*o]=A[o]&255,n[2*o+1]=A[o]>>8}function g7(n,t){var o=new Uint8Array(32),a=new Uint8Array(32);return Rh(o,n),Rh(a,t),p7(o,0,a,0)}function h7(n){var t=new Uint8Array(32);return Rh(t,n),t[0]&1}function EL(n,t){var o;for(o=0;o<16;o++)n[o]=t[2*o]+(t[2*o+1]<<8);n[15]&=32767}function jn(n,t,o){for(var a=0;a<16;a++)n[a]=t[a]+o[a]}function qn(n,t,o){for(var a=0;a<16;a++)n[a]=t[a]-o[a]}function pt(n,t,o){var a,e,i=0,A=0,r=0,s=0,g=0,c=0,I=0,d=0,B=0,f=0,Q=0,y=0,m=0,_=0,T=0,R=0,L=0,U=0,F=0,z=0,J=0,K=0,G=0,V=0,H=0,N=0,k=0,q=0,X=0,ie=0,De=0,oe=o[0],Se=o[1],Be=o[2],Re=o[3],Ne=o[4],Je=o[5],ve=o[6],tA=o[7],fe=o[8],Ie=o[9],Xe=o[10],je=o[11],be=o[12],uA=o[13],EA=o[14],aA=o[15];a=t[0],i+=a*oe,A+=a*Se,r+=a*Be,s+=a*Re,g+=a*Ne,c+=a*Je,I+=a*ve,d+=a*tA,B+=a*fe,f+=a*Ie,Q+=a*Xe,y+=a*je,m+=a*be,_+=a*uA,T+=a*EA,R+=a*aA,a=t[1],A+=a*oe,r+=a*Se,s+=a*Be,g+=a*Re,c+=a*Ne,I+=a*Je,d+=a*ve,B+=a*tA,f+=a*fe,Q+=a*Ie,y+=a*Xe,m+=a*je,_+=a*be,T+=a*uA,R+=a*EA,L+=a*aA,a=t[2],r+=a*oe,s+=a*Se,g+=a*Be,c+=a*Re,I+=a*Ne,d+=a*Je,B+=a*ve,f+=a*tA,Q+=a*fe,y+=a*Ie,m+=a*Xe,_+=a*je,T+=a*be,R+=a*uA,L+=a*EA,U+=a*aA,a=t[3],s+=a*oe,g+=a*Se,c+=a*Be,I+=a*Re,d+=a*Ne,B+=a*Je,f+=a*ve,Q+=a*tA,y+=a*fe,m+=a*Ie,_+=a*Xe,T+=a*je,R+=a*be,L+=a*uA,U+=a*EA,F+=a*aA,a=t[4],g+=a*oe,c+=a*Se,I+=a*Be,d+=a*Re,B+=a*Ne,f+=a*Je,Q+=a*ve,y+=a*tA,m+=a*fe,_+=a*Ie,T+=a*Xe,R+=a*je,L+=a*be,U+=a*uA,F+=a*EA,z+=a*aA,a=t[5],c+=a*oe,I+=a*Se,d+=a*Be,B+=a*Re,f+=a*Ne,Q+=a*Je,y+=a*ve,m+=a*tA,_+=a*fe,T+=a*Ie,R+=a*Xe,L+=a*je,U+=a*be,F+=a*uA,z+=a*EA,J+=a*aA,a=t[6],I+=a*oe,d+=a*Se,B+=a*Be,f+=a*Re,Q+=a*Ne,y+=a*Je,m+=a*ve,_+=a*tA,T+=a*fe,R+=a*Ie,L+=a*Xe,U+=a*je,F+=a*be,z+=a*uA,J+=a*EA,K+=a*aA,a=t[7],d+=a*oe,B+=a*Se,f+=a*Be,Q+=a*Re,y+=a*Ne,m+=a*Je,_+=a*ve,T+=a*tA,R+=a*fe,L+=a*Ie,U+=a*Xe,F+=a*je,z+=a*be,J+=a*uA,K+=a*EA,G+=a*aA,a=t[8],B+=a*oe,f+=a*Se,Q+=a*Be,y+=a*Re,m+=a*Ne,_+=a*Je,T+=a*ve,R+=a*tA,L+=a*fe,U+=a*Ie,F+=a*Xe,z+=a*je,J+=a*be,K+=a*uA,G+=a*EA,V+=a*aA,a=t[9],f+=a*oe,Q+=a*Se,y+=a*Be,m+=a*Re,_+=a*Ne,T+=a*Je,R+=a*ve,L+=a*tA,U+=a*fe,F+=a*Ie,z+=a*Xe,J+=a*je,K+=a*be,G+=a*uA,V+=a*EA,H+=a*aA,a=t[10],Q+=a*oe,y+=a*Se,m+=a*Be,_+=a*Re,T+=a*Ne,R+=a*Je,L+=a*ve,U+=a*tA,F+=a*fe,z+=a*Ie,J+=a*Xe,K+=a*je,G+=a*be,V+=a*uA,H+=a*EA,N+=a*aA,a=t[11],y+=a*oe,m+=a*Se,_+=a*Be,T+=a*Re,R+=a*Ne,L+=a*Je,U+=a*ve,F+=a*tA,z+=a*fe,J+=a*Ie,K+=a*Xe,G+=a*je,V+=a*be,H+=a*uA,N+=a*EA,k+=a*aA,a=t[12],m+=a*oe,_+=a*Se,T+=a*Be,R+=a*Re,L+=a*Ne,U+=a*Je,F+=a*ve,z+=a*tA,J+=a*fe,K+=a*Ie,G+=a*Xe,V+=a*je,H+=a*be,N+=a*uA,k+=a*EA,q+=a*aA,a=t[13],_+=a*oe,T+=a*Se,R+=a*Be,L+=a*Re,U+=a*Ne,F+=a*Je,z+=a*ve,J+=a*tA,K+=a*fe,G+=a*Ie,V+=a*Xe,H+=a*je,N+=a*be,k+=a*uA,q+=a*EA,X+=a*aA,a=t[14],T+=a*oe,R+=a*Se,L+=a*Be,U+=a*Re,F+=a*Ne,z+=a*Je,J+=a*ve,K+=a*tA,G+=a*fe,V+=a*Ie,H+=a*Xe,N+=a*je,k+=a*be,q+=a*uA,X+=a*EA,ie+=a*aA,a=t[15],R+=a*oe,L+=a*Se,U+=a*Be,F+=a*Re,z+=a*Ne,J+=a*Je,K+=a*ve,G+=a*tA,V+=a*fe,H+=a*Ie,N+=a*Xe,k+=a*je,q+=a*be,X+=a*uA,ie+=a*EA,De+=a*aA,i+=38*L,A+=38*U,r+=38*F,s+=38*z,g+=38*J,c+=38*K,I+=38*G,d+=38*V,B+=38*H,f+=38*N,Q+=38*k,y+=38*q,m+=38*X,_+=38*ie,T+=38*De,e=1,a=i+e+65535,e=Math.floor(a/65536),i=a-e*65536,a=A+e+65535,e=Math.floor(a/65536),A=a-e*65536,a=r+e+65535,e=Math.floor(a/65536),r=a-e*65536,a=s+e+65535,e=Math.floor(a/65536),s=a-e*65536,a=g+e+65535,e=Math.floor(a/65536),g=a-e*65536,a=c+e+65535,e=Math.floor(a/65536),c=a-e*65536,a=I+e+65535,e=Math.floor(a/65536),I=a-e*65536,a=d+e+65535,e=Math.floor(a/65536),d=a-e*65536,a=B+e+65535,e=Math.floor(a/65536),B=a-e*65536,a=f+e+65535,e=Math.floor(a/65536),f=a-e*65536,a=Q+e+65535,e=Math.floor(a/65536),Q=a-e*65536,a=y+e+65535,e=Math.floor(a/65536),y=a-e*65536,a=m+e+65535,e=Math.floor(a/65536),m=a-e*65536,a=_+e+65535,e=Math.floor(a/65536),_=a-e*65536,a=T+e+65535,e=Math.floor(a/65536),T=a-e*65536,a=R+e+65535,e=Math.floor(a/65536),R=a-e*65536,i+=e-1+37*(e-1),e=1,a=i+e+65535,e=Math.floor(a/65536),i=a-e*65536,a=A+e+65535,e=Math.floor(a/65536),A=a-e*65536,a=r+e+65535,e=Math.floor(a/65536),r=a-e*65536,a=s+e+65535,e=Math.floor(a/65536),s=a-e*65536,a=g+e+65535,e=Math.floor(a/65536),g=a-e*65536,a=c+e+65535,e=Math.floor(a/65536),c=a-e*65536,a=I+e+65535,e=Math.floor(a/65536),I=a-e*65536,a=d+e+65535,e=Math.floor(a/65536),d=a-e*65536,a=B+e+65535,e=Math.floor(a/65536),B=a-e*65536,a=f+e+65535,e=Math.floor(a/65536),f=a-e*65536,a=Q+e+65535,e=Math.floor(a/65536),Q=a-e*65536,a=y+e+65535,e=Math.floor(a/65536),y=a-e*65536,a=m+e+65535,e=Math.floor(a/65536),m=a-e*65536,a=_+e+65535,e=Math.floor(a/65536),_=a-e*65536,a=T+e+65535,e=Math.floor(a/65536),T=a-e*65536,a=R+e+65535,e=Math.floor(a/65536),R=a-e*65536,i+=e-1+37*(e-1),n[0]=i,n[1]=A,n[2]=r,n[3]=s,n[4]=g,n[5]=c,n[6]=I,n[7]=d,n[8]=B,n[9]=f,n[10]=Q,n[11]=y,n[12]=m,n[13]=_,n[14]=T,n[15]=R}function Jn(n,t){pt(n,t,t)}function uL(n,t){var o=hA(),a;for(a=0;a<16;a++)o[a]=t[a];for(a=253;a>=0;a--)Jn(o,o),a!==2&&a!==4&&pt(o,o,t);for(a=0;a<16;a++)n[a]=o[a]}function Sxe(n,t){var o=hA(),a;for(a=0;a<16;a++)o[a]=t[a];for(a=250;a>=0;a--)Jn(o,o),a!==1&&pt(o,o,t);for(a=0;a<16;a++)n[a]=o[a]}function E7(n,t,o){var a=new Uint8Array(32),e=new Float64Array(80),i,A,r=hA(),s=hA(),g=hA(),c=hA(),I=hA(),d=hA();for(A=0;A<31;A++)a[A]=t[A];for(a[31]=t[31]&127|64,a[0]&=248,EL(e,o),A=0;A<16;A++)s[A]=e[A],c[A]=r[A]=g[A]=0;for(r[0]=c[0]=1,A=254;A>=0;--A)i=a[A>>>3]>>>(A&7)&1,Th(r,s,i),Th(g,c,i),jn(I,r,g),qn(r,r,g),jn(g,s,c),qn(s,s,c),Jn(c,I),Jn(d,r),pt(r,g,r),pt(g,s,I),jn(I,r,g),qn(r,r,g),Jn(s,r),qn(g,c,d),pt(r,g,Bxe),jn(r,r,c),pt(g,g,r),pt(r,c,d),pt(c,s,e),Jn(s,I),Th(r,s,i),Th(g,c,i);for(A=0;A<16;A++)e[A+16]=r[A],e[A+32]=g[A],e[A+48]=s[A],e[A+64]=c[A];var B=e.subarray(32),f=e.subarray(16);return uL(B,B),pt(f,f,B),Rh(n,f),0}function wxe(n,t){return E7(n,t,d7)}var c7=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function I7(n,t,o,a){for(var e=new Int32Array(16),i=new Int32Array(16),A,r,s,g,c,I,d,B,f,Q,y,m,_,T,R,L,U,F,z,J,K,G,V,H,N,k,q=n[0],X=n[1],ie=n[2],De=n[3],oe=n[4],Se=n[5],Be=n[6],Re=n[7],Ne=t[0],Je=t[1],ve=t[2],tA=t[3],fe=t[4],Ie=t[5],Xe=t[6],je=t[7],be=0;a>=128;){for(z=0;z<16;z++)J=8*z+be,e[z]=o[J+0]<<24|o[J+1]<<16|o[J+2]<<8|o[J+3],i[z]=o[J+4]<<24|o[J+5]<<16|o[J+6]<<8|o[J+7];for(z=0;z<80;z++)if(A=q,r=X,s=ie,g=De,c=oe,I=Se,d=Be,B=Re,f=Ne,Q=Je,y=ve,m=tA,_=fe,T=Ie,R=Xe,L=je,K=Re,G=je,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=(oe>>>14|fe<<18)^(oe>>>18|fe<<14)^(fe>>>9|oe<<23),G=(fe>>>14|oe<<18)^(fe>>>18|oe<<14)^(oe>>>9|fe<<23),V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,K=oe&Se^~oe&Be,G=fe&Ie^~fe&Xe,V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,K=c7[z*2],G=c7[z*2+1],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,K=e[z%16],G=i[z%16],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,U=N&65535|k<<16,F=V&65535|H<<16,K=U,G=F,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=(q>>>28|Ne<<4)^(Ne>>>2|q<<30)^(Ne>>>7|q<<25),G=(Ne>>>28|q<<4)^(q>>>2|Ne<<30)^(q>>>7|Ne<<25),V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,K=q&X^q&ie^X&ie,G=Ne&Je^Ne&ve^Je&ve,V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,B=N&65535|k<<16,L=V&65535|H<<16,K=g,G=m,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=U,G=F,V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,g=N&65535|k<<16,m=V&65535|H<<16,X=A,ie=r,De=s,oe=g,Se=c,Be=I,Re=d,q=B,Je=f,ve=Q,tA=y,fe=m,Ie=_,Xe=T,je=R,Ne=L,z%16===15)for(J=0;J<16;J++)K=e[J],G=i[J],V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=e[(J+9)%16],G=i[(J+9)%16],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,U=e[(J+1)%16],F=i[(J+1)%16],K=(U>>>1|F<<31)^(U>>>8|F<<24)^U>>>7,G=(F>>>1|U<<31)^(F>>>8|U<<24)^(F>>>7|U<<25),V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,U=e[(J+14)%16],F=i[(J+14)%16],K=(U>>>19|F<<13)^(F>>>29|U<<3)^U>>>6,G=(F>>>19|U<<13)^(U>>>29|F<<3)^(F>>>6|U<<26),V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,e[J]=N&65535|k<<16,i[J]=V&65535|H<<16;K=q,G=Ne,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=n[0],G=t[0],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,n[0]=q=N&65535|k<<16,t[0]=Ne=V&65535|H<<16,K=X,G=Je,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=n[1],G=t[1],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,n[1]=X=N&65535|k<<16,t[1]=Je=V&65535|H<<16,K=ie,G=ve,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=n[2],G=t[2],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,n[2]=ie=N&65535|k<<16,t[2]=ve=V&65535|H<<16,K=De,G=tA,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=n[3],G=t[3],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,n[3]=De=N&65535|k<<16,t[3]=tA=V&65535|H<<16,K=oe,G=fe,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=n[4],G=t[4],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,n[4]=oe=N&65535|k<<16,t[4]=fe=V&65535|H<<16,K=Se,G=Ie,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=n[5],G=t[5],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,n[5]=Se=N&65535|k<<16,t[5]=Ie=V&65535|H<<16,K=Be,G=Xe,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=n[6],G=t[6],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,n[6]=Be=N&65535|k<<16,t[6]=Xe=V&65535|H<<16,K=Re,G=je,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=n[7],G=t[7],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,n[7]=Re=N&65535|k<<16,t[7]=je=V&65535|H<<16,be+=128,a-=128}return a}function HB(n,t,o){var a=new Int32Array(8),e=new Int32Array(8),i=new Uint8Array(256),A,r=o;for(a[0]=1779033703,a[1]=3144134277,a[2]=1013904242,a[3]=2773480762,a[4]=1359893119,a[5]=2600822924,a[6]=528734635,a[7]=1541459225,e[0]=4089235720,e[1]=2227873595,e[2]=4271175723,e[3]=1595750129,e[4]=2917565137,e[5]=725511199,e[6]=4215389547,e[7]=327033209,I7(a,e,t,o),o%=128,A=0;A=0;--e)a=o[e/8|0]>>(e&7)&1,l7(n,t,a),pL(t,n),pL(n,n),l7(n,t,a)}function MD(n,t){var o=[hA(),hA(),hA(),hA()];aI(o[0],o7),aI(o[1],n7),aI(o[2],Nh),pt(o[3],o7,n7),u7(n,o,t)}var lL=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function CL(n,t){var o,a,e,i;for(a=63;a>=32;--a){for(o=0,e=a-32,i=a-12;e>8,t[e]-=o*256;t[e]+=o,t[a]=0}for(o=0,e=0;e<32;e++)t[e]+=o-(t[31]>>4)*lL[e],o=t[e]>>8,t[e]&=255;for(e=0;e<32;e++)t[e]-=o*lL[e];for(a=0;a<32;a++)t[a+1]+=t[a]>>8,n[a]=t[a]&255}function KB(n){var t=new Float64Array(64),o;for(o=0;o<64;o++)t[o]=n[o];for(o=0;o<64;o++)n[o]=0;CL(n,t)}function Dxe(n,t,o,a){var e=new Uint8Array(64),i=new Uint8Array(64),A,r,s=new Float64Array(64),g=[hA(),hA(),hA(),hA()];for(A=0;A>7&&qn(n[0],dL,n[0]),pt(n[3],n[0],n[1]),0)}function Mxe(n,t,o,a){var e,i,A=new Uint8Array(32),r=new Uint8Array(64),s=[hA(),hA(),hA(),hA()],g=[hA(),hA(),hA(),hA()];if(i=-1,o<64||bxe(g,a))return-1;for(e=0;e=0}Vg.verify=vxe;function Pxe(n){if(oI(n),n.length!==32)throw new Error("wrong seed length");for(var t=new Uint8Array(32),o=new Uint8Array(32),a=0;a<32;a++)t[a]=n[a];return wxe(o,t),t[0]&=248,t[31]&=127,t[31]|=64,o[31]&=127,{public:o,private:t}}Vg.generateKeyPair=Pxe;Vg.default={}});var nI=ee(vh=>{"use strict";var xB=B7(),kh=$e("crypto"),BL=Buffer.from([48,42,48,5,6,3,43,101,110,3,33,0]),fL=Buffer.from([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]),Gxe=Buffer.from([5]),QL=function(n){return Buffer.concat([Gxe,n])};function f7(n){if(n===void 0)throw new Error("Undefined private key");if(!(n instanceof Buffer))throw new Error(`Invalid private key type: ${n.constructor.name}`);if(n.byteLength!=32)throw new Error(`Incorrect private key length: ${n.byteLength}`)}function Q7(n){if(!(n instanceof Buffer))throw new Error(`Invalid public key type: ${n.constructor.name}`);if(n===void 0||(n.byteLength!=33||n[0]!=5)&&n.byteLength!=32)throw new Error("Invalid public key");return n.byteLength==33?n.slice(1):(console.error("WARNING: Expected pubkey of length 33, please report the ST and client that generated the pubkey"),n)}function Fxe(n){let t=new Uint8Array(n);return t[0]|=6,t[31]|=128,t[31]&=-65,t}vh.getPublicFromPrivateKey=function(n){let t=Fxe(n),o=xB.generateKeyPair(t);return QL(Buffer.from(o.public))};vh.generateKeyPair=function(){try{let{publicKey:n,privateKey:t}=kh.generateKeyPairSync("x25519",{publicKeyEncoding:{format:"der",type:"spki"},privateKeyEncoding:{format:"der",type:"pkcs8"}}),o=n.slice(BL.length,BL.length+32),a=t.slice(fL.length,fL.length+32);return{pubKey:QL(o),privKey:a}}catch{let t=xB.generateKeyPair(kh.randomBytes(32));return{privKey:Buffer.from(t.private),pubKey:QL(Buffer.from(t.public))}}};vh.calculateAgreement=function(n,t){if(n=Q7(n),f7(t),!n||n.byteLength!=32)throw new Error("Invalid public key");if(typeof kh.diffieHellman=="function"){let o=kh.createPrivateKey({key:Buffer.concat([fL,t]),format:"der",type:"pkcs8"}),a=kh.createPublicKey({key:Buffer.concat([BL,n]),format:"der",type:"spki"});return kh.diffieHellman({privateKey:o,publicKey:a})}else{let o=xB.sharedKey(t,n);return Buffer.from(o)}};vh.calculateSignature=function(n,t){if(f7(n),!t)throw new Error("Invalid message");return Buffer.from(xB.sign(n,t))};vh.verifySignature=function(n,t,o,a){if(n=Q7(n),!n||n.byteLength!=32)throw new Error("Invalid public key");if(!t)throw new Error("Invalid message");if(!o||o.byteLength!=64)throw new Error("Invalid signature");return a?!0:xB.verify(n,t,o)}});var m7=ee(YB=>{var _D=nI(),Lxe=$e("crypto");function y7(n){return typeof n=="number"&&n%1===0&&n>=0}YB.generateIdentityKeyPair=_D.generateKeyPair;YB.generateRegistrationId=function(){var n=Uint16Array.from(Lxe.randomBytes(2))[0];return n&16383};YB.generateSignedPreKey=function(n,t){if(!(n.privKey instanceof Buffer)||n.privKey.byteLength!=32||!(n.pubKey instanceof Buffer)||n.pubKey.byteLength!=33)throw new TypeError("Invalid argument for identityKeyPair");if(!y7(t))throw new TypeError("Invalid argument for signedKeyId: "+t);let o=_D.generateKeyPair(),a=_D.calculateSignature(n.privKey,o.pubKey);return{keyId:t,keyPair:o,signature:a}};YB.generatePreKey=function(n){if(!y7(n))throw new TypeError("Invalid argument for keyId: "+n);let t=_D.generateKeyPair();return{keyId:n,keyPair:t}}});var mL=ee((kSA,S7)=>{var yL=class n{static from(t){if(typeof t!="string"||!t.match(/.*\.\d+/))throw new Error("Invalid address encoding");let o=t.split(".");return new this(o[0],parseInt(o[1]))}constructor(t,o){if(typeof t!="string")throw new TypeError("id required for addr");if(t.indexOf(".")!==-1)throw new TypeError("encoded addr detected");if(this.id=t,typeof o!="number")throw new TypeError("number required for deviceId");this.deviceId=o}toString(){return`${this.id}.${this.deviceId}`}is(t){return t instanceof n?t.id===this.id&&t.deviceId===this.deviceId:!1}};S7.exports=yL});var SL=ee((vSA,w7)=>{var Uxe={OURS:1,THEIRS:2};w7.exports=Uxe});var wL=ee((PSA,D7)=>{var Hxe={SENDING:1,RECEIVING:2};D7.exports=Hxe});var kD=ee((GSA,b7)=>{var Kxe=SL(),xxe=40,O7="v1";function ND(n){if(!Buffer.isBuffer(n))throw new TypeError("Buffer required")}var RD=class{constructor(){this._chains={}}toString(){return``}inspect(){return this.toString()}addChain(t,o){ND(t);let a=t.toString("base64");if(this._chains.hasOwnProperty(a))throw new Error("Overwrite attempt");this._chains[a]=o}getChain(t){return ND(t),this._chains[t.toString("base64")]}deleteChain(t){ND(t);let o=t.toString("base64");if(!this._chains.hasOwnProperty(o))throw new ReferenceError("Not Found");delete this._chains[o]}*chains(){for(let[t,o]of Object.entries(this._chains))yield[Buffer.from(t,"base64"),o]}serialize(){let t={registrationId:this.registrationId,currentRatchet:{ephemeralKeyPair:{pubKey:this.currentRatchet.ephemeralKeyPair.pubKey.toString("base64"),privKey:this.currentRatchet.ephemeralKeyPair.privKey.toString("base64")},lastRemoteEphemeralKey:this.currentRatchet.lastRemoteEphemeralKey.toString("base64"),previousCounter:this.currentRatchet.previousCounter,rootKey:this.currentRatchet.rootKey.toString("base64")},indexInfo:{baseKey:this.indexInfo.baseKey.toString("base64"),baseKeyType:this.indexInfo.baseKeyType,closed:this.indexInfo.closed,used:this.indexInfo.used,created:this.indexInfo.created,remoteIdentityKey:this.indexInfo.remoteIdentityKey.toString("base64")},_chains:this._serialize_chains(this._chains)};return this.pendingPreKey&&(t.pendingPreKey=Object.assign({},this.pendingPreKey),t.pendingPreKey.baseKey=this.pendingPreKey.baseKey.toString("base64")),t}static deserialize(t){let o=new this;return o.registrationId=t.registrationId,o.currentRatchet={ephemeralKeyPair:{pubKey:Buffer.from(t.currentRatchet.ephemeralKeyPair.pubKey,"base64"),privKey:Buffer.from(t.currentRatchet.ephemeralKeyPair.privKey,"base64")},lastRemoteEphemeralKey:Buffer.from(t.currentRatchet.lastRemoteEphemeralKey,"base64"),previousCounter:t.currentRatchet.previousCounter,rootKey:Buffer.from(t.currentRatchet.rootKey,"base64")},o.indexInfo={baseKey:Buffer.from(t.indexInfo.baseKey,"base64"),baseKeyType:t.indexInfo.baseKeyType,closed:t.indexInfo.closed,used:t.indexInfo.used,created:t.indexInfo.created,remoteIdentityKey:Buffer.from(t.indexInfo.remoteIdentityKey,"base64")},o._chains=this._deserialize_chains(t._chains),t.pendingPreKey&&(o.pendingPreKey=Object.assign({},t.pendingPreKey),o.pendingPreKey.baseKey=Buffer.from(t.pendingPreKey.baseKey,"base64")),o}_serialize_chains(t){let o={};for(let a of Object.keys(t)){let e=t[a],i={};for(let[A,r]of Object.entries(e.messageKeys))i[A]=r.toString("base64");o[a]={chainKey:{counter:e.chainKey.counter,key:e.chainKey.key&&e.chainKey.key.toString("base64")},chainType:e.chainType,messageKeys:i}}return o}static _deserialize_chains(t){let o={};for(let a of Object.keys(t)){let e=t[a],i={};for(let[A,r]of Object.entries(e.messageKeys))i[A]=Buffer.from(r,"base64");o[a]={chainKey:{counter:e.chainKey.counter,key:e.chainKey.key&&Buffer.from(e.chainKey.key,"base64")},chainType:e.chainType,messageKeys:i}}return o}},TD=[{version:"v1",migrate:function(t){let o=t._sessions;if(t.registrationId)for(let a in o)o[a].registrationId||(o[a].registrationId=t.registrationId);else for(let a in o)o[a].indexInfo.closed===-1&&console.error("V1 session storage migration error: registrationId",t.registrationId,"for open session version",t.version)}}],DL=class{static createEntry(){return new RD}static migrate(t){let o=t.version===void 0;for(let a=0;a{let a=t.indexInfo.used||0,e=o.indexInfo.used||0;return a===e?0:axxe;){let t,o;for(let[a,e]of Object.entries(this.sessions))e.indexInfo.closed!==-1&&(!o||e.indexInfo.closed{Us.SignalError=class extends Error{};Us.UntrustedIdentityKeyError=class extends Us.SignalError{constructor(t,o){super(),this.name="UntrustedIdentityKeyError",this.addr=t,this.identityKey=o}};Us.SessionError=class extends Us.SignalError{constructor(t){super(t),this.name="SessionError"}};Us.MessageCounterError=class extends Us.SessionError{constructor(t){super(t),this.name="MessageCounterError"}};Us.PreKeyError=class extends Us.SessionError{constructor(t){super(t),this.name="PreKeyError"}}});var OL=ee((YSA,_7)=>{"use strict";var PD=new Map,M7=1e4;async function Yxe(n,t){let o=0;for(;;){let a=Math.min(n.length,M7);for(let e=o;e=M7?(n.splice(0,a),o=0):o=a;else break}t()}_7.exports=function(n,t){t.name||(Object.defineProperty(t,"name",{writable:!0}),typeof n=="string"?t.name=n:console.warn("Unhandled bucket type (for naming):",typeof n,n));let o;PD.has(n)||(PD.set(n,[]),o=!0);let a=PD.get(n),e=new Promise((i,A)=>a.push({awaitable:t,resolve:i,reject:A}));return o&&Yxe(a,()=>PD.delete(n)),e}});var ML=ee((jSA,k7)=>{"use strict";var T7=SL(),jxe=wL(),N7=kD(),R7=Zl(),sI=nI(),GD=vD(),Jxe=OL(),bL=class{constructor(t,o){this.addr=o,this.storage=t}async initOutgoing(t){let o=this.addr.toString();return await Jxe(o,async()=>{if(!await this.storage.isTrustedIdentity(this.addr.id,t.identityKey))throw new GD.UntrustedIdentityKeyError(this.addr.id,t.identityKey);sI.verifySignature(t.identityKey,t.signedPreKey.publicKey,t.signedPreKey.signature,!0);let a=sI.generateKeyPair(),e=t.preKey&&t.preKey.publicKey,i=await this.initSession(!0,a,void 0,t.identityKey,e,t.signedPreKey.publicKey,t.registrationId);i.pendingPreKey={signedKeyId:t.signedPreKey.keyId,baseKey:a.pubKey},t.preKey&&(i.pendingPreKey.preKeyId=t.preKey.keyId);let A=await this.storage.loadSession(o);if(!A)A=new N7;else{let r=A.getOpenSession();r&&A.closeSession(r)}A.setSession(i),await this.storage.storeSession(o,A)})}async initIncoming(t,o){let a=this.addr.toString();if(!await this.storage.isTrustedIdentity(a,o.identityKey))throw new GD.UntrustedIdentityKeyError(this.addr.id,o.identityKey);if(t.getSession(o.baseKey))return;let e=await this.storage.loadPreKey(o.preKeyId);if(o.preKeyId&&!e)throw new GD.PreKeyError("Invalid PreKey ID");let i=await this.storage.loadSignedPreKey(o.signedPreKeyId);if(!i)throw new GD.PreKeyError("Missing SignedPreKey");let A=t.getOpenSession();return A&&(console.warn("Closing open session in favor of incoming prekey bundle"),t.closeSession(A)),t.setSession(await this.initSession(!1,e,i,o.identityKey,o.baseKey,void 0,o.registrationId)),o.preKeyId}async initSession(t,o,a,e,i,A,r){if(t){if(a)throw new Error("Invalid call to initSession");a=o}else{if(A)throw new Error("Invalid call to initSession");A=i}let s;!o||!i?s=new Uint8Array(128):s=new Uint8Array(160);for(var g=0;g<32;g++)s[g]=255;let c=await this.storage.getOurIdentity(),I=sI.calculateAgreement(A,c.privKey),d=sI.calculateAgreement(e,a.privKey),B=sI.calculateAgreement(A,a.privKey);if(t?(s.set(new Uint8Array(I),32),s.set(new Uint8Array(d),64)):(s.set(new Uint8Array(I),64),s.set(new Uint8Array(d),32)),s.set(new Uint8Array(B),96),o&&i){let y=sI.calculateAgreement(i,o.privKey);s.set(new Uint8Array(y),128)}let f=R7.deriveSecrets(Buffer.from(s),Buffer.alloc(32),Buffer.from("WhisperText")),Q=N7.createEntry();return Q.registrationId=r,Q.currentRatchet={rootKey:f[0],ephemeralKeyPair:t?sI.generateKeyPair():a,lastRemoteEphemeralKey:A,previousCounter:0},Q.indexInfo={created:Date.now(),used:Date.now(),remoteIdentityKey:e,baseKey:t?o.pubKey:i,baseKeyType:t?T7.OURS:T7.THEIRS,closed:-1},t&&this.calculateSendingRatchet(Q,A),Q}calculateSendingRatchet(t,o){let a=t.currentRatchet,e=sI.calculateAgreement(o,a.ephemeralKeyPair.privKey),i=R7.deriveSecrets(e,a.rootKey,Buffer.from("WhisperRatchet"));t.addChain(a.ephemeralKeyPair.pubKey,{messageKeys:{},chainKey:{counter:-1,key:i[1]},chainType:jxe.SENDING}),a.rootKey=i[0]}};k7.exports=bL});var P7=ee((JSA,v7)=>{"use strict";var gI=uS(),rn=gI.Reader,_L=gI.Writer,nA=gI.util,zn=gI.roots.default||(gI.roots.default={});zn.textsecure=(function(){var n={};return n.WhisperMessage=(function(){function t(o){if(o)for(var a=Object.keys(o),e=0;e>>3){case 1:A.ephemeralKey=a.bytes();break;case 2:A.counter=a.uint32();break;case 3:A.previousCounter=a.uint32();break;case 4:A.ciphertext=a.bytes();break;default:a.skipType(r&7);break}}return A},t.decodeDelimited=function(a){return a instanceof rn||(a=new rn(a)),this.decode(a,a.uint32())},t.verify=function(a){return typeof a!="object"||a===null?"object expected":a.ephemeralKey!=null&&a.hasOwnProperty("ephemeralKey")&&!(a.ephemeralKey&&typeof a.ephemeralKey.length=="number"||nA.isString(a.ephemeralKey))?"ephemeralKey: buffer expected":a.counter!=null&&a.hasOwnProperty("counter")&&!nA.isInteger(a.counter)?"counter: integer expected":a.previousCounter!=null&&a.hasOwnProperty("previousCounter")&&!nA.isInteger(a.previousCounter)?"previousCounter: integer expected":a.ciphertext!=null&&a.hasOwnProperty("ciphertext")&&!(a.ciphertext&&typeof a.ciphertext.length=="number"||nA.isString(a.ciphertext))?"ciphertext: buffer expected":null},t.fromObject=function(a){if(a instanceof zn.textsecure.WhisperMessage)return a;var e=new zn.textsecure.WhisperMessage;return a.ephemeralKey!=null&&(typeof a.ephemeralKey=="string"?nA.base64.decode(a.ephemeralKey,e.ephemeralKey=nA.newBuffer(nA.base64.length(a.ephemeralKey)),0):a.ephemeralKey.length&&(e.ephemeralKey=a.ephemeralKey)),a.counter!=null&&(e.counter=a.counter>>>0),a.previousCounter!=null&&(e.previousCounter=a.previousCounter>>>0),a.ciphertext!=null&&(typeof a.ciphertext=="string"?nA.base64.decode(a.ciphertext,e.ciphertext=nA.newBuffer(nA.base64.length(a.ciphertext)),0):a.ciphertext.length&&(e.ciphertext=a.ciphertext)),e},t.toObject=function(a,e){e||(e={});var i={};return e.defaults&&(e.bytes===String?i.ephemeralKey="":(i.ephemeralKey=[],e.bytes!==Array&&(i.ephemeralKey=nA.newBuffer(i.ephemeralKey))),i.counter=0,i.previousCounter=0,e.bytes===String?i.ciphertext="":(i.ciphertext=[],e.bytes!==Array&&(i.ciphertext=nA.newBuffer(i.ciphertext)))),a.ephemeralKey!=null&&a.hasOwnProperty("ephemeralKey")&&(i.ephemeralKey=e.bytes===String?nA.base64.encode(a.ephemeralKey,0,a.ephemeralKey.length):e.bytes===Array?Array.prototype.slice.call(a.ephemeralKey):a.ephemeralKey),a.counter!=null&&a.hasOwnProperty("counter")&&(i.counter=a.counter),a.previousCounter!=null&&a.hasOwnProperty("previousCounter")&&(i.previousCounter=a.previousCounter),a.ciphertext!=null&&a.hasOwnProperty("ciphertext")&&(i.ciphertext=e.bytes===String?nA.base64.encode(a.ciphertext,0,a.ciphertext.length):e.bytes===Array?Array.prototype.slice.call(a.ciphertext):a.ciphertext),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,gI.util.toJSONOptions)},t})(),n.PreKeyWhisperMessage=(function(){function t(o){if(o)for(var a=Object.keys(o),e=0;e>>3){case 5:A.registrationId=a.uint32();break;case 1:A.preKeyId=a.uint32();break;case 6:A.signedPreKeyId=a.uint32();break;case 2:A.baseKey=a.bytes();break;case 3:A.identityKey=a.bytes();break;case 4:A.message=a.bytes();break;default:a.skipType(r&7);break}}return A},t.decodeDelimited=function(a){return a instanceof rn||(a=new rn(a)),this.decode(a,a.uint32())},t.verify=function(a){return typeof a!="object"||a===null?"object expected":a.registrationId!=null&&a.hasOwnProperty("registrationId")&&!nA.isInteger(a.registrationId)?"registrationId: integer expected":a.preKeyId!=null&&a.hasOwnProperty("preKeyId")&&!nA.isInteger(a.preKeyId)?"preKeyId: integer expected":a.signedPreKeyId!=null&&a.hasOwnProperty("signedPreKeyId")&&!nA.isInteger(a.signedPreKeyId)?"signedPreKeyId: integer expected":a.baseKey!=null&&a.hasOwnProperty("baseKey")&&!(a.baseKey&&typeof a.baseKey.length=="number"||nA.isString(a.baseKey))?"baseKey: buffer expected":a.identityKey!=null&&a.hasOwnProperty("identityKey")&&!(a.identityKey&&typeof a.identityKey.length=="number"||nA.isString(a.identityKey))?"identityKey: buffer expected":a.message!=null&&a.hasOwnProperty("message")&&!(a.message&&typeof a.message.length=="number"||nA.isString(a.message))?"message: buffer expected":null},t.fromObject=function(a){if(a instanceof zn.textsecure.PreKeyWhisperMessage)return a;var e=new zn.textsecure.PreKeyWhisperMessage;return a.registrationId!=null&&(e.registrationId=a.registrationId>>>0),a.preKeyId!=null&&(e.preKeyId=a.preKeyId>>>0),a.signedPreKeyId!=null&&(e.signedPreKeyId=a.signedPreKeyId>>>0),a.baseKey!=null&&(typeof a.baseKey=="string"?nA.base64.decode(a.baseKey,e.baseKey=nA.newBuffer(nA.base64.length(a.baseKey)),0):a.baseKey.length&&(e.baseKey=a.baseKey)),a.identityKey!=null&&(typeof a.identityKey=="string"?nA.base64.decode(a.identityKey,e.identityKey=nA.newBuffer(nA.base64.length(a.identityKey)),0):a.identityKey.length&&(e.identityKey=a.identityKey)),a.message!=null&&(typeof a.message=="string"?nA.base64.decode(a.message,e.message=nA.newBuffer(nA.base64.length(a.message)),0):a.message.length&&(e.message=a.message)),e},t.toObject=function(a,e){e||(e={});var i={};return e.defaults&&(i.preKeyId=0,e.bytes===String?i.baseKey="":(i.baseKey=[],e.bytes!==Array&&(i.baseKey=nA.newBuffer(i.baseKey))),e.bytes===String?i.identityKey="":(i.identityKey=[],e.bytes!==Array&&(i.identityKey=nA.newBuffer(i.identityKey))),e.bytes===String?i.message="":(i.message=[],e.bytes!==Array&&(i.message=nA.newBuffer(i.message))),i.registrationId=0,i.signedPreKeyId=0),a.preKeyId!=null&&a.hasOwnProperty("preKeyId")&&(i.preKeyId=a.preKeyId),a.baseKey!=null&&a.hasOwnProperty("baseKey")&&(i.baseKey=e.bytes===String?nA.base64.encode(a.baseKey,0,a.baseKey.length):e.bytes===Array?Array.prototype.slice.call(a.baseKey):a.baseKey),a.identityKey!=null&&a.hasOwnProperty("identityKey")&&(i.identityKey=e.bytes===String?nA.base64.encode(a.identityKey,0,a.identityKey.length):e.bytes===Array?Array.prototype.slice.call(a.identityKey):a.identityKey),a.message!=null&&a.hasOwnProperty("message")&&(i.message=e.bytes===String?nA.base64.encode(a.message,0,a.message.length):e.bytes===Array?Array.prototype.slice.call(a.message):a.message),a.registrationId!=null&&a.hasOwnProperty("registrationId")&&(i.registrationId=a.registrationId),a.signedPreKeyId!=null&&a.hasOwnProperty("signedPreKeyId")&&(i.signedPreKeyId=a.signedPreKeyId),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,gI.util.toJSONOptions)},t})(),n.KeyExchangeMessage=(function(){function t(o){if(o)for(var a=Object.keys(o),e=0;e>>3){case 1:A.id=a.uint32();break;case 2:A.baseKey=a.bytes();break;case 3:A.ephemeralKey=a.bytes();break;case 4:A.identityKey=a.bytes();break;case 5:A.baseKeySignature=a.bytes();break;default:a.skipType(r&7);break}}return A},t.decodeDelimited=function(a){return a instanceof rn||(a=new rn(a)),this.decode(a,a.uint32())},t.verify=function(a){return typeof a!="object"||a===null?"object expected":a.id!=null&&a.hasOwnProperty("id")&&!nA.isInteger(a.id)?"id: integer expected":a.baseKey!=null&&a.hasOwnProperty("baseKey")&&!(a.baseKey&&typeof a.baseKey.length=="number"||nA.isString(a.baseKey))?"baseKey: buffer expected":a.ephemeralKey!=null&&a.hasOwnProperty("ephemeralKey")&&!(a.ephemeralKey&&typeof a.ephemeralKey.length=="number"||nA.isString(a.ephemeralKey))?"ephemeralKey: buffer expected":a.identityKey!=null&&a.hasOwnProperty("identityKey")&&!(a.identityKey&&typeof a.identityKey.length=="number"||nA.isString(a.identityKey))?"identityKey: buffer expected":a.baseKeySignature!=null&&a.hasOwnProperty("baseKeySignature")&&!(a.baseKeySignature&&typeof a.baseKeySignature.length=="number"||nA.isString(a.baseKeySignature))?"baseKeySignature: buffer expected":null},t.fromObject=function(a){if(a instanceof zn.textsecure.KeyExchangeMessage)return a;var e=new zn.textsecure.KeyExchangeMessage;return a.id!=null&&(e.id=a.id>>>0),a.baseKey!=null&&(typeof a.baseKey=="string"?nA.base64.decode(a.baseKey,e.baseKey=nA.newBuffer(nA.base64.length(a.baseKey)),0):a.baseKey.length&&(e.baseKey=a.baseKey)),a.ephemeralKey!=null&&(typeof a.ephemeralKey=="string"?nA.base64.decode(a.ephemeralKey,e.ephemeralKey=nA.newBuffer(nA.base64.length(a.ephemeralKey)),0):a.ephemeralKey.length&&(e.ephemeralKey=a.ephemeralKey)),a.identityKey!=null&&(typeof a.identityKey=="string"?nA.base64.decode(a.identityKey,e.identityKey=nA.newBuffer(nA.base64.length(a.identityKey)),0):a.identityKey.length&&(e.identityKey=a.identityKey)),a.baseKeySignature!=null&&(typeof a.baseKeySignature=="string"?nA.base64.decode(a.baseKeySignature,e.baseKeySignature=nA.newBuffer(nA.base64.length(a.baseKeySignature)),0):a.baseKeySignature.length&&(e.baseKeySignature=a.baseKeySignature)),e},t.toObject=function(a,e){e||(e={});var i={};return e.defaults&&(i.id=0,e.bytes===String?i.baseKey="":(i.baseKey=[],e.bytes!==Array&&(i.baseKey=nA.newBuffer(i.baseKey))),e.bytes===String?i.ephemeralKey="":(i.ephemeralKey=[],e.bytes!==Array&&(i.ephemeralKey=nA.newBuffer(i.ephemeralKey))),e.bytes===String?i.identityKey="":(i.identityKey=[],e.bytes!==Array&&(i.identityKey=nA.newBuffer(i.identityKey))),e.bytes===String?i.baseKeySignature="":(i.baseKeySignature=[],e.bytes!==Array&&(i.baseKeySignature=nA.newBuffer(i.baseKeySignature)))),a.id!=null&&a.hasOwnProperty("id")&&(i.id=a.id),a.baseKey!=null&&a.hasOwnProperty("baseKey")&&(i.baseKey=e.bytes===String?nA.base64.encode(a.baseKey,0,a.baseKey.length):e.bytes===Array?Array.prototype.slice.call(a.baseKey):a.baseKey),a.ephemeralKey!=null&&a.hasOwnProperty("ephemeralKey")&&(i.ephemeralKey=e.bytes===String?nA.base64.encode(a.ephemeralKey,0,a.ephemeralKey.length):e.bytes===Array?Array.prototype.slice.call(a.ephemeralKey):a.ephemeralKey),a.identityKey!=null&&a.hasOwnProperty("identityKey")&&(i.identityKey=e.bytes===String?nA.base64.encode(a.identityKey,0,a.identityKey.length):e.bytes===Array?Array.prototype.slice.call(a.identityKey):a.identityKey),a.baseKeySignature!=null&&a.hasOwnProperty("baseKeySignature")&&(i.baseKeySignature=e.bytes===String?nA.base64.encode(a.baseKeySignature,0,a.baseKeySignature.length):e.bytes===Array?Array.prototype.slice.call(a.baseKeySignature):a.baseKeySignature),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,gI.util.toJSONOptions)},t})(),n})();v7.exports=zn});var TL=ee((qSA,G7)=>{"use strict";var{textsecure:{WhisperMessage:qxe,PreKeyWhisperMessage:zxe}}=P7();G7.exports={WhisperMessage:qxe,PreKeyWhisperMessage:zxe}});var H7=ee((zSA,U7)=>{var FD=wL(),Vxe=mL(),Wxe=ML(),F7=kD(),Wg=Zl(),L7=nI(),Hs=vD(),Ph=TL(),Zxe=OL(),cI=3;function LD(n){if(!(n instanceof Buffer))throw TypeError(`Expected Buffer instead of: ${n.constructor.name}`);return n}var NL=class{constructor(t,o){if(!(o instanceof Vxe))throw new TypeError("protocolAddress must be a ProtocolAddress");this.addr=o,this.storage=t}_encodeTupleByte(t,o){if(t>15||o>15)throw TypeError("Numbers must be 4 bits or less");return t<<4|o}_decodeTupleByte(t){return[t>>4,t&15]}toString(){return``}async getRecord(){let t=await this.storage.loadSession(this.addr.toString());if(t&&!(t instanceof F7))throw new TypeError("SessionRecord type expected from loadSession");return t}async storeRecord(t){t.removeOldSessions(),await this.storage.storeSession(this.addr.toString(),t)}async queueJob(t){return await Zxe(this.addr.toString(),t)}async encrypt(t){LD(t);let o=await this.storage.getOurIdentity();return await this.queueJob(async()=>{let a=await this.getRecord();if(!a)throw new Hs.SessionError("No sessions");let e=a.getOpenSession();if(!e)throw new Hs.SessionError("No open session");let i=e.indexInfo.remoteIdentityKey;if(!await this.storage.isTrustedIdentity(this.addr.id,i))throw new Hs.UntrustedIdentityKeyError(this.addr.id,i);let A=e.getChain(e.currentRatchet.ephemeralKeyPair.pubKey);if(A.chainType===FD.RECEIVING)throw new Error("Tried to encrypt on a receiving chain");this.fillMessageKeys(A,A.chainKey.counter+1);let r=Wg.deriveSecrets(A.messageKeys[A.chainKey.counter],Buffer.alloc(32),Buffer.from("WhisperMessageKeys"));delete A.messageKeys[A.chainKey.counter];let s=Ph.WhisperMessage.create();s.ephemeralKey=e.currentRatchet.ephemeralKeyPair.pubKey,s.counter=A.chainKey.counter,s.previousCounter=e.currentRatchet.previousCounter,s.ciphertext=Wg.encrypt(r[0],t,r[2].slice(0,16));let g=Ph.WhisperMessage.encode(s).finish(),c=Buffer.alloc(g.byteLength+66+1);c.set(o.pubKey),c.set(e.indexInfo.remoteIdentityKey,33),c[66]=this._encodeTupleByte(cI,cI),c.set(g,67);let I=Wg.calculateMAC(r[1],c),d=Buffer.alloc(g.byteLength+9);d[0]=this._encodeTupleByte(cI,cI),d.set(g,1),d.set(I.slice(0,8),g.byteLength+1),await this.storeRecord(a);let B,f;if(e.pendingPreKey){B=3;let Q=Ph.PreKeyWhisperMessage.create({identityKey:o.pubKey,registrationId:await this.storage.getOurRegistrationId(),baseKey:e.pendingPreKey.baseKey,signedPreKeyId:e.pendingPreKey.signedKeyId,message:d});e.pendingPreKey.preKeyId&&(Q.preKeyId=e.pendingPreKey.preKeyId),f=Buffer.concat([Buffer.from([this._encodeTupleByte(cI,cI)]),Buffer.from(Ph.PreKeyWhisperMessage.encode(Q).finish())])}else B=1,f=d;return{type:B,body:f,registrationId:e.registrationId}})}async decryptWithSessions(t,o){if(!o.length)throw new Hs.SessionError("No sessions available");let a=[];for(let e of o){let i;try{return i=await this.doDecryptWhisperMessage(t,e),e.indexInfo.used=Date.now(),{session:e,plaintext:i}}catch(A){a.push(A)}}console.error("Failed to decrypt message with any known session...");for(let e of a)console.error("Session error:"+e,e.stack);throw new Hs.SessionError("No matching sessions found for message")}async decryptWhisperMessage(t){return LD(t),await this.queueJob(async()=>{let o=await this.getRecord();if(!o)throw new Hs.SessionError("No session record");let a=await this.decryptWithSessions(t,o.getSessions()),e=a.session.indexInfo.remoteIdentityKey;if(!await this.storage.isTrustedIdentity(this.addr.id,e))throw new Hs.UntrustedIdentityKeyError(this.addr.id,e);return o.isClosed(a.session)&&console.warn("Decrypted message with closed session."),await this.storeRecord(o),a.plaintext})}async decryptPreKeyWhisperMessage(t){LD(t);let o=this._decodeTupleByte(t[0]);if(o[1]>3||o[0]<3)throw new Error("Incompatible version number on PreKeyWhisperMessage");return await this.queueJob(async()=>{let a=await this.getRecord(),e=Ph.PreKeyWhisperMessage.decode(t.slice(1));if(!a){if(e.registrationId==null)throw new Error("No registrationId");a=new F7}let A=await new Wxe(this.storage,this.addr).initIncoming(a,e),r=a.getSession(e.baseKey),s=await this.doDecryptWhisperMessage(e.message,r);return await this.storeRecord(a),A&&await this.storage.removePreKey(A),s})}async doDecryptWhisperMessage(t,o){if(LD(t),!o)throw new TypeError("session required");let a=this._decodeTupleByte(t[0]);if(a[1]>3||a[0]<3)throw new Error("Incompatible version number on WhisperMessage");let e=t.slice(1,-8),i=Ph.WhisperMessage.decode(e);this.maybeStepRatchet(o,i.ephemeralKey,i.previousCounter);let A=o.getChain(i.ephemeralKey);if(A.chainType===FD.SENDING)throw new Error("Tried to decrypt on a sending chain");if(this.fillMessageKeys(A,i.counter),!A.messageKeys.hasOwnProperty(i.counter))throw new Hs.MessageCounterError("Key used already or never filled");let r=A.messageKeys[i.counter];delete A.messageKeys[i.counter];let s=Wg.deriveSecrets(r,Buffer.alloc(32),Buffer.from("WhisperMessageKeys")),g=await this.storage.getOurIdentity(),c=Buffer.alloc(e.byteLength+66+1);c.set(o.indexInfo.remoteIdentityKey),c.set(g.pubKey,33),c[66]=this._encodeTupleByte(cI,cI),c.set(e,67),Wg.verifyMAC(c,s[1],t.slice(-8),8);let I=Wg.decrypt(s[0],i.ciphertext,s[2].slice(0,16));return delete o.pendingPreKey,I}fillMessageKeys(t,o){if(t.chainKey.counter>=o)return;if(o-t.chainKey.counter>2e3)throw new Hs.SessionError("Over 2000 messages into the future!");if(t.chainKey.key===void 0)throw new Hs.SessionError("Chain closed");let a=t.chainKey.key;return t.messageKeys[t.chainKey.counter+1]=Wg.calculateMAC(a,Buffer.from([1])),t.chainKey.key=Wg.calculateMAC(a,Buffer.from([2])),t.chainKey.counter+=1,this.fillMessageKeys(t,o)}maybeStepRatchet(t,o,a){if(t.getChain(o))return;let e=t.currentRatchet,i=t.getChain(e.lastRemoteEphemeralKey);i&&(this.fillMessageKeys(i,a),delete i.chainKey.key),this.calculateRatchet(t,o,!1);let A=t.getChain(e.ephemeralKeyPair.pubKey);A&&(e.previousCounter=A.chainKey.counter,t.deleteChain(e.ephemeralKeyPair.pubKey)),e.ephemeralKeyPair=L7.generateKeyPair(),this.calculateRatchet(t,o,!0),e.lastRemoteEphemeralKey=o}calculateRatchet(t,o,a){let e=t.currentRatchet,i=L7.calculateAgreement(o,e.ephemeralKeyPair.privKey),A=Wg.deriveSecrets(i,e.rootKey,Buffer.from("WhisperRatchet"),2),r=a?e.ephemeralKeyPair.pubKey:o;t.addChain(r,{messageKeys:{},chainKey:{counter:-1,key:A[1]},chainType:a?FD.SENDING:FD.RECEIVING}),e.rootKey=A[0]}async hasOpenSession(){return await this.queueJob(async()=>{let t=await this.getRecord();return t?t.haveOpenSession():!1})}async closeOpenSession(){return await this.queueJob(async()=>{let t=await this.getRecord();if(t){let o=t.getOpenSession();o&&(t.closeSession(o),await this.storeRecord(t))}})}};U7.exports=NL});var K7=ee(Zg=>{"use strict";Zg.crypto=Zl();Zg.curve=nI();Zg.keyhelper=m7();Zg.ProtocolAddress=mL();Zg.SessionBuilder=ML();Zg.SessionCipher=H7();Zg.SessionRecord=kD();Object.assign(Zg,vD())});var kL=ee(($SA,q7)=>{"use strict";q7.exports=function(...n){try{return JSON.stringify(...n)}catch(t){return"[Cannot display object: "+t.message+"]"}}});var vL=ee((z7,V7)=>{"use strict";var iYe=kL();V7.exports=class extends Error{constructor(n){let t=n.filter(o=>o!=="").map(o=>typeof o=="string"?o:o instanceof Error?o.message:iYe(o));super(t.join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,z7.assert)}}});var Xl=ee((AwA,W7)=>{"use strict";var aYe=vL();W7.exports=function(n,...t){if(!n)throw t.length===1&&t[0]instanceof Error?t[0]:new aYe(t)}});var qB=ee((twA,X7)=>{"use strict";var PL=Xl(),Z7={};X7.exports=function(n,t,o){if(t===!1||t===null||t===void 0)return n;o=o||{},typeof o=="string"&&(o={separator:o});let a=Array.isArray(t);PL(!a||!o.separator,"Separator option is not valid for array-based chain");let e=a?t:t.split(o.separator||"."),i=n;for(let A=0;A{"use strict";var $7={};ya=e$.exports={array:Array.prototype,buffer:Buffer&&Buffer.prototype,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype};$7.typeMap=new Map([["[object Error]",ya.error],["[object Map]",ya.map],["[object Promise]",ya.promise],["[object Set]",ya.set],["[object WeakMap]",ya.weakMap],["[object WeakSet]",ya.weakSet]]);ya.getInternalProto=function(n){if(Array.isArray(n))return ya.array;if(Buffer&&n instanceof Buffer)return ya.buffer;if(n instanceof Date)return ya.date;if(n instanceof RegExp)return ya.regex;if(n instanceof Error)return ya.error;let t=Object.prototype.toString.call(n);return $7.typeMap.get(t)||ya.generic}});var HD=ee(A$=>{"use strict";A$.keys=function(n,t={}){return t.symbols!==!1?Reflect.ownKeys(n):Object.getOwnPropertyNames(n)}});var KD=ee((iwA,t$)=>{"use strict";var oYe=qB(),Qo=GL(),nYe=HD(),$g={needsProtoHack:new Set([Qo.set,Qo.map,Qo.weakSet,Qo.weakMap])};t$.exports=$g.clone=function(n,t={},o=null){if(typeof n!="object"||n===null)return n;let a=$g.clone,e=o;if(t.shallow){if(t.shallow!==!0)return $g.cloneWithShallow(n,t);a=s=>s}else if(e){let s=e.get(n);if(s)return s}else e=new Map;let i=Qo.getInternalProto(n);if(i===Qo.buffer)return Buffer&&Buffer.from(n);if(i===Qo.date)return new Date(n.getTime());if(i===Qo.regex)return new RegExp(n);let A=$g.base(n,i,t);if(A===n)return n;if(e&&e.set(n,A),i===Qo.set)for(let s of n)A.add(a(s,t,e));else if(i===Qo.map)for(let[s,g]of n)A.set(s,a(g,t,e));let r=nYe.keys(n,t);for(let s of r){if(s==="__proto__")continue;if(i===Qo.array&&s==="length"){A.length=n.length;continue}let g=Object.getOwnPropertyDescriptor(n,s);g?g.get||g.set?Object.defineProperty(A,s,g):g.enumerable?A[s]=a(n[s],t,e):Object.defineProperty(A,s,{enumerable:!1,writable:!0,configurable:!0,value:a(n[s],t,e)}):Object.defineProperty(A,s,{enumerable:!0,writable:!0,configurable:!0,value:a(n[s],t,e)})}return A};$g.cloneWithShallow=function(n,t){let o=t.shallow;t=Object.assign({},t),t.shallow=!1;let a=new Map;for(let e of o){let i=oYe(n,e);(typeof i=="object"||typeof i=="function")&&a.set(i,i)}return $g.clone(n,t,a)};$g.base=function(n,t,o){if(o.prototype===!1)return $g.needsProtoHack.has(t)?new t.constructor:t===Qo.array?[]:{};let a=Object.getPrototypeOf(n);if(a&&a.isImmutable)return n;if(t===Qo.array){let e=[];return a!==t&&Object.setPrototypeOf(e,a),e}if($g.needsProtoHack.has(t)){let e=new a.constructor;return a!==t&&Object.setPrototypeOf(e,a),e}return Object.create(a)}});var LL=ee((awA,a$)=>{"use strict";var FL=Xl(),r$=KD(),sYe=HD(),i$={};a$.exports=i$.merge=function(n,t,o){if(FL(n&&typeof n=="object","Invalid target value: must be an object"),FL(t==null||typeof t=="object","Invalid source value: must be null, undefined, or an object"),!t)return n;if(o=Object.assign({nullOverride:!0,mergeArrays:!0},o),Array.isArray(t)){FL(Array.isArray(n),"Cannot merge array onto an object"),o.mergeArrays||(n.length=0);for(let e=0;e{"use strict";var xD=Xl(),n$=KD(),s$=LL(),o$=qB(),YD={};g$.exports=function(n,t,o={}){if(xD(n&&typeof n=="object","Invalid defaults value: must be an object"),xD(!t||t===!0||typeof t=="object","Invalid source value: must be true, falsy or an object"),xD(typeof o=="object","Invalid options: must be an object"),!t)return null;if(o.shallow)return YD.applyToDefaultsWithShallow(n,t,o);let a=n$(n);if(t===!0)return a;let e=o.nullOverride!==void 0?o.nullOverride:!1;return s$(a,t,{nullOverride:e,mergeArrays:!1})};YD.applyToDefaultsWithShallow=function(n,t,o){let a=o.shallow;xD(Array.isArray(a),"Invalid keys");let e=new Map,i=t===!0?null:new Set;for(let s of a){s=Array.isArray(s)?s:s.split(".");let g=o$(n,s);g&&typeof g=="object"?e.set(g,i&&o$(t,s)||g):i&&i.add(s)}let A=n$(n,{},e);if(!i)return A;for(let s of i)YD.reachCopy(A,t,s);let r=o.nullOverride!==void 0?o.nullOverride:!1;return s$(A,t,{nullOverride:r,mergeArrays:!1})};YD.reachCopy=function(n,t,o){for(let i of o){if(!(i in t))return;let A=t[i];if(typeof A!="object"||A===null)return;t=A}let a=t,e=n;for(let i=0;i{"use strict";var UL={};I$.exports=UL.Bench=class{constructor(){this.ts=0,this.reset()}reset(){this.ts=UL.Bench.now()}elapsed(){return UL.Bench.now()-this.ts}static now(){let n=process.hrtime();return n[0]*1e3+n[1]/1e6}}});var HL=ee((gwA,d$)=>{"use strict";d$.exports=function(){}});var h$=ee((cwA,p$)=>{"use strict";var gYe=HL();p$.exports=function(){return new Promise(gYe)}});var KL=ee((IwA,E$)=>{"use strict";var Ks=GL(),ca={mismatched:null};E$.exports=function(n,t,o){return o=Object.assign({prototype:!0},o),!!ca.isDeepEqual(n,t,o,[])};ca.isDeepEqual=function(n,t,o,a){if(n===t)return n!==0||1/n===1/t;let e=typeof n;if(e!==typeof t||n===null||t===null)return!1;if(e==="function"){if(!o.deepFunction||n.toString()!==t.toString())return!1}else if(e!=="object")return n!==n&&t!==t;let i=ca.getSharedType(n,t,!!o.prototype);switch(i){case Ks.buffer:return Buffer&&Buffer.prototype.equals.call(n,t);case Ks.promise:return n===t;case Ks.regex:return n.toString()===t.toString();case ca.mismatched:return!1}for(let A=a.length-1;A>=0;--A)if(a[A].isSame(n,t))return!0;a.push(new ca.SeenEntry(n,t));try{return!!ca.isDeepEqualObj(i,n,t,o,a)}finally{a.pop()}};ca.getSharedType=function(n,t,o){if(o)return Object.getPrototypeOf(n)!==Object.getPrototypeOf(t)?ca.mismatched:Ks.getInternalProto(n);let a=Ks.getInternalProto(n);return a!==Ks.getInternalProto(t)?ca.mismatched:a};ca.valueOf=function(n){let t=n.valueOf;if(t===void 0)return n;try{return t.call(n)}catch(o){return o}};ca.hasOwnEnumerableProperty=function(n,t){return Object.prototype.propertyIsEnumerable.call(n,t)};ca.isSetSimpleEqual=function(n,t){for(let o of Set.prototype.values.call(n))if(!Set.prototype.has.call(t,o))return!1;return!0};ca.isDeepEqualObj=function(n,t,o,a,e){let{isDeepEqual:i,valueOf:A,hasOwnEnumerableProperty:r}=ca,{keys:s,getOwnPropertySymbols:g}=Object;if(n===Ks.array)if(a.part){for(let f of t)for(let Q of o)if(i(f,Q,a,e))return!0}else{if(t.length!==o.length)return!1;for(let f=0;f{"use strict";u$.exports=function(n){return n.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}});var B$=ee((pwA,C$)=>{"use strict";var jD=Xl(),cYe=KL(),IYe=xL(),lYe=HD(),yo={};C$.exports=function(n,t,o={}){return typeof t!="object"&&(t=[t]),jD(!Array.isArray(t)||t.length,"Values array cannot be empty"),typeof n=="string"?yo.string(n,t,o):Array.isArray(n)?yo.array(n,t,o):(jD(typeof n=="object","Reference must be string or an object"),yo.object(n,t,o))};yo.array=function(n,t,o){if(Array.isArray(t)||(t=[t]),!n.length||o.only&&o.once&&n.length!==t.length)return!1;let a,e=new Map;for(let A of t)if(!o.deep||!A||typeof A!="object"){let r=e.get(A);r?++r.allowed:e.set(A,{allowed:1,hits:0})}else{a=a||yo.compare(o);let r=!1;for(let[s,g]of e.entries())if(a(s,A)){++g.allowed,r=!0;break}r||e.set(A,{allowed:1,hits:0})}let i=0;for(let A of n){let r;if(!o.deep||!A||typeof A!="object")r=e.get(A);else{a=a||yo.compare(o);for(let[s,g]of e.entries())if(a(s,A)){r=g;break}}if(r&&(++r.hits,++i,o.once&&r.hits>r.allowed))return!1}if(o.only&&i!==n.length)return!1;for(let A of e.values())if(A.hits!==A.allowed&&A.hitst.propertyIsEnumerable(s)),i=[...Object.keys(t),...e],A=yo.compare(o),r=new Set(i);for(let s of a){if(!r.has(s)){if(o.only)return!1;continue}if(!A(t[s],n[s]))return!1;r.delete(s)}return r.size?o.part?r.sizes!=="");let a=new Map,e=[];for(let s of t)if(jD(typeof s=="string","Cannot compare string reference to non-string value"),s){let g=a.get(s);g?++g.allowed:(a.set(s,{allowed:1,hits:0}),e.push(IYe(s)))}else if(o.once||o.only)return!1;if(!e.length)return!0;let i=new RegExp(`(${e.join("|")})`,"g"),A=n.replace(i,(s,g)=>(++a.get(g).hits,""));if(o.only&&A)return!1;let r=!1;for(let s of a.values())if(s.hits&&(r=!0),s.hits!==s.allowed&&(s.hitscYe(e,i,a)};yo.shallow=function(n,t){return n===t}});var Q$=ee((hwA,f$)=>{"use strict";var dYe=Xl();f$.exports=function(n){return dYe(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(n),"Bad attribute value ("+n+")"),n.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')}});var m$=ee((EwA,y$)=>{"use strict";var lI={};y$.exports=function(n){if(!n)return"";let t="";for(let o=0;o=256?"&#"+n+";":`&#x${n.toString(16).padStart(2,"0")};`)};lI.isSafe=function(n){return lI.safeCharCodes.has(n)};lI.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]);lI.safeCharCodes=(function(){let n=new Set;for(let t=32;t<123;++t)(t>=97||t>=65&&t<=90||t>=48&&t<=57||t===32||t===46||t===44||t===45||t===58||t===95)&&n.add(t);return n})()});var w$=ee((uwA,S$)=>{"use strict";var JD={};S$.exports=function(n){return n?n.replace(/[<>&\u2028\u2029]/g,JD.escape):""};JD.escape=function(n){return JD.replacements.get(n)};JD.replacements=new Map([["<","\\u003c"],[">","\\u003e"],["&","\\u0026"],["\u2028","\\u2028"],["\u2029","\\u2029"]])});var b$=ee((CwA,O$)=>{"use strict";var D$={};O$.exports=D$.flatten=function(n,t){let o=t||[];for(let a of n)Array.isArray(a)?D$.flatten(a,o):o.push(a);return o}});var T$=ee((BwA,_$)=>{"use strict";var M$={};_$.exports=function(n,t,o={}){if(!n||!t)return o.first?null:[];let a=[],e=Array.isArray(n)?new Set(n):n,i=new Set;for(let A of t)if(M$.has(e,A)&&!i.has(A)){if(o.first)return A;a.push(A),i.add(A)}return o.first?null:a};M$.has=function(n,t){return typeof n.has=="function"?n.has(t):n[t]!==void 0}});var R$=ee((fwA,N$)=>{"use strict";N$.exports=function(n){return!!n&&typeof n.then=="function"}});var P$=ee((QwA,v$)=>{"use strict";var k$={wrapped:Symbol("wrapped")};v$.exports=function(n){if(n[k$.wrapped])return n;let t=!1,o=function(...a){t||(t=!0,n(...a))};return o[k$.wrapped]=!0,o}});var F$=ee((ywA,G$)=>{"use strict";var pYe=qB();G$.exports=function(n,t,o){return t.replace(/{([^{}]+)}/g,(a,e)=>{let i=pYe(n,e,o);return i??""})}});var U$=ee((mwA,L$)=>{"use strict";var hYe={maxTimer:2147483647};L$.exports=function(n,t,o){if(typeof n=="bigint"&&(n=Number(n)),n>=Number.MAX_SAFE_INTEGER&&(n=1/0),typeof n!="number"&&n!==void 0)throw new TypeError("Timeout must be a number or bigint");return new Promise(a=>{let e=o?o.setTimeout:setTimeout,i=()=>{let A=Math.min(n,hYe.maxTimer);n-=A,e(()=>n>0?i():a(t),A)};n!==1/0&&i()})}});var H$=ee(ur=>{"use strict";ur.applyToDefaults=c$();ur.assert=Xl();ur.Bench=l$();ur.block=h$();ur.clone=KD();ur.contain=B$();ur.deepEqual=KL();ur.Error=vL();ur.escapeHeaderAttribute=Q$();ur.escapeHtml=m$();ur.escapeJson=w$();ur.escapeRegex=xL();ur.flatten=b$();ur.ignore=HL();ur.intersect=T$();ur.isPromise=R$();ur.merge=LL();ur.once=P$();ur.reach=qB();ur.reachTemplate=F$();ur.stringify=kL();ur.wait=U$()});var zr=ee(Pe=>{"use strict";var $l=H$(),$a={codes:new Map([[100,"Continue"],[101,"Switching Protocols"],[102,"Processing"],[200,"OK"],[201,"Created"],[202,"Accepted"],[203,"Non-Authoritative Information"],[204,"No Content"],[205,"Reset Content"],[206,"Partial Content"],[207,"Multi-Status"],[300,"Multiple Choices"],[301,"Moved Permanently"],[302,"Moved Temporarily"],[303,"See Other"],[304,"Not Modified"],[305,"Use Proxy"],[307,"Temporary Redirect"],[400,"Bad Request"],[401,"Unauthorized"],[402,"Payment Required"],[403,"Forbidden"],[404,"Not Found"],[405,"Method Not Allowed"],[406,"Not Acceptable"],[407,"Proxy Authentication Required"],[408,"Request Time-out"],[409,"Conflict"],[410,"Gone"],[411,"Length Required"],[412,"Precondition Failed"],[413,"Request Entity Too Large"],[414,"Request-URI Too Large"],[415,"Unsupported Media Type"],[416,"Requested Range Not Satisfiable"],[417,"Expectation Failed"],[418,"I'm a teapot"],[422,"Unprocessable Entity"],[423,"Locked"],[424,"Failed Dependency"],[425,"Too Early"],[426,"Upgrade Required"],[428,"Precondition Required"],[429,"Too Many Requests"],[431,"Request Header Fields Too Large"],[451,"Unavailable For Legal Reasons"],[500,"Internal Server Error"],[501,"Not Implemented"],[502,"Bad Gateway"],[503,"Service Unavailable"],[504,"Gateway Time-out"],[505,"HTTP Version Not Supported"],[506,"Variant Also Negotiates"],[507,"Insufficient Storage"],[509,"Bandwidth Limit Exceeded"],[510,"Not Extended"],[511,"Network Authentication Required"]])};Pe.Boom=class extends Error{constructor(n,t={}){if(n instanceof Error)return Pe.boomify($l.clone(n),t);let{statusCode:o=500,data:a=null,ctor:e=Pe.Boom}=t,i=new Error(n||void 0);Error.captureStackTrace(i,e),i.data=a;let A=$a.initialize(i,o);return Object.defineProperty(A,"typeof",{value:e}),t.decorate&&Object.assign(A,t.decorate),A}static[Symbol.hasInstance](n){return this===Pe.Boom?Pe.isBoom(n):this.prototype.isPrototypeOf(n)}};Pe.isBoom=function(n,t){return n instanceof Error&&!!n.isBoom&&(!t||n.output.statusCode===t)};Pe.boomify=function(n,t){return $l.assert(n instanceof Error,"Cannot wrap non-Error object"),t=t||{},t.data!==void 0&&(n.data=t.data),t.decorate&&Object.assign(n,t.decorate),n.isBoom?t.override===!1||!t.statusCode&&!t.message?n:$a.initialize(n,t.statusCode||n.output.statusCode,t.message):$a.initialize(n,t.statusCode||500,t.message)};Pe.badRequest=function(n,t){return new Pe.Boom(n,{statusCode:400,data:t,ctor:Pe.badRequest})};Pe.unauthorized=function(n,t,o){let a=new Pe.Boom(n,{statusCode:401,ctor:Pe.unauthorized});if(!t)return a;if(typeof t!="string")return a.output.headers["WWW-Authenticate"]=t.join(", "),a;let e=`${t}`;return(o||n)&&(a.output.payload.attributes={}),o&&(typeof o=="string"?(e+=" "+$l.escapeHeaderAttribute(o),a.output.payload.attributes=o):e+=" "+Object.keys(o).map(i=>{let A=o[i];return A==null&&(A=""),a.output.payload.attributes[i]=A,`${i}="${$l.escapeHeaderAttribute(A.toString())}"`}).join(", ")),n?(o&&(e+=","),e+=` error="${$l.escapeHeaderAttribute(n)}"`,a.output.payload.attributes.error=n):a.isMissing=!0,a.output.headers["WWW-Authenticate"]=e,a};Pe.paymentRequired=function(n,t){return new Pe.Boom(n,{statusCode:402,data:t,ctor:Pe.paymentRequired})};Pe.forbidden=function(n,t){return new Pe.Boom(n,{statusCode:403,data:t,ctor:Pe.forbidden})};Pe.notFound=function(n,t){return new Pe.Boom(n,{statusCode:404,data:t,ctor:Pe.notFound})};Pe.methodNotAllowed=function(n,t,o){let a=new Pe.Boom(n,{statusCode:405,data:t,ctor:Pe.methodNotAllowed});return typeof o=="string"&&(o=[o]),Array.isArray(o)&&(a.output.headers.Allow=o.join(", ")),a};Pe.notAcceptable=function(n,t){return new Pe.Boom(n,{statusCode:406,data:t,ctor:Pe.notAcceptable})};Pe.proxyAuthRequired=function(n,t){return new Pe.Boom(n,{statusCode:407,data:t,ctor:Pe.proxyAuthRequired})};Pe.clientTimeout=function(n,t){return new Pe.Boom(n,{statusCode:408,data:t,ctor:Pe.clientTimeout})};Pe.conflict=function(n,t){return new Pe.Boom(n,{statusCode:409,data:t,ctor:Pe.conflict})};Pe.resourceGone=function(n,t){return new Pe.Boom(n,{statusCode:410,data:t,ctor:Pe.resourceGone})};Pe.lengthRequired=function(n,t){return new Pe.Boom(n,{statusCode:411,data:t,ctor:Pe.lengthRequired})};Pe.preconditionFailed=function(n,t){return new Pe.Boom(n,{statusCode:412,data:t,ctor:Pe.preconditionFailed})};Pe.entityTooLarge=function(n,t){return new Pe.Boom(n,{statusCode:413,data:t,ctor:Pe.entityTooLarge})};Pe.uriTooLong=function(n,t){return new Pe.Boom(n,{statusCode:414,data:t,ctor:Pe.uriTooLong})};Pe.unsupportedMediaType=function(n,t){return new Pe.Boom(n,{statusCode:415,data:t,ctor:Pe.unsupportedMediaType})};Pe.rangeNotSatisfiable=function(n,t){return new Pe.Boom(n,{statusCode:416,data:t,ctor:Pe.rangeNotSatisfiable})};Pe.expectationFailed=function(n,t){return new Pe.Boom(n,{statusCode:417,data:t,ctor:Pe.expectationFailed})};Pe.teapot=function(n,t){return new Pe.Boom(n,{statusCode:418,data:t,ctor:Pe.teapot})};Pe.badData=function(n,t){return new Pe.Boom(n,{statusCode:422,data:t,ctor:Pe.badData})};Pe.locked=function(n,t){return new Pe.Boom(n,{statusCode:423,data:t,ctor:Pe.locked})};Pe.failedDependency=function(n,t){return new Pe.Boom(n,{statusCode:424,data:t,ctor:Pe.failedDependency})};Pe.tooEarly=function(n,t){return new Pe.Boom(n,{statusCode:425,data:t,ctor:Pe.tooEarly})};Pe.preconditionRequired=function(n,t){return new Pe.Boom(n,{statusCode:428,data:t,ctor:Pe.preconditionRequired})};Pe.tooManyRequests=function(n,t){return new Pe.Boom(n,{statusCode:429,data:t,ctor:Pe.tooManyRequests})};Pe.illegal=function(n,t){return new Pe.Boom(n,{statusCode:451,data:t,ctor:Pe.illegal})};Pe.internal=function(n,t,o=500){return $a.serverError(n,t,o,Pe.internal)};Pe.notImplemented=function(n,t){return $a.serverError(n,t,501,Pe.notImplemented)};Pe.badGateway=function(n,t){return $a.serverError(n,t,502,Pe.badGateway)};Pe.serverUnavailable=function(n,t){return $a.serverError(n,t,503,Pe.serverUnavailable)};Pe.gatewayTimeout=function(n,t){return $a.serverError(n,t,504,Pe.gatewayTimeout)};Pe.badImplementation=function(n,t){let o=$a.serverError(n,t,500,Pe.badImplementation);return o.isDeveloperError=!0,o};$a.initialize=function(n,t,o){let a=parseInt(t,10);if($l.assert(!isNaN(a)&&a>=400,"First argument must be a number (400+):",t),n.isBoom=!0,n.isServer=a>=500,n.hasOwnProperty("data")||(n.data=null),n.output={statusCode:a,payload:{},headers:{}},Object.defineProperty(n,"reformat",{value:$a.reformat,configurable:!0}),!o&&!n.message&&(n.reformat(),o=n.output.payload.error),o){let e=Object.getOwnPropertyDescriptor(n,"message")||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(n),"message");$l.assert(!e||e.configurable&&!e.get,"The error is not compatible with boom"),n.message=o+(n.message?": "+n.message:""),n.output.payload.message=n.message}return n.reformat(),n};$a.reformat=function(n=!1){this.output.payload.statusCode=this.output.statusCode,this.output.payload.error=$a.codes.get(this.output.statusCode)||"Unknown",this.output.statusCode===500&&n!==!0?this.output.payload.message="An internal server error occurred":this.message&&(this.output.payload.message=this.message)};$a.serverError=function(n,t,o,a){return t instanceof Error&&!t.isBoom?Pe.boomify(t,{statusCode:o,message:n}):new Pe.Boom(n,{statusCode:o,data:t,ctor:a})}});var Yee,VYe,WYe,ZYe,XYe,$Ye,e1e,A1e,t1e,r1e,i1e,a1e,o1e,n1e,s1e,O,Ys=ue(()=>{Yee=n=>typeof n<"u"&&n!==null,VYe=n=>typeof n=="object",WYe=n=>Object.prototype.toString.call(n)==="[object Object]",ZYe=n=>typeof n=="function",XYe=n=>typeof n=="boolean",$Ye=n=>n instanceof Buffer,e1e=n=>{if(Yee(n))switch(n.constructor){case Uint8Array:case Uint8ClampedArray:case Int8Array:case Uint16Array:case Int16Array:case Uint32Array:case Int32Array:case Float32Array:case Float64Array:return!0}return!1},A1e=n=>n instanceof ArrayBuffer,t1e=n=>typeof n=="string"&&n.length>0,r1e=n=>typeof n=="number"&&Number.isFinite(n),i1e=n=>Number.isInteger(n),a1e=(n,t,o)=>n>=t&&n<=o,o1e=(n,t)=>t.includes(n),n1e=(n,t,o)=>new Error(`Expected ${t} for ${n} but received ${o} of type ${typeof o}`),s1e=(n,t)=>(t.message=n.message,t),O={defined:Yee,object:VYe,plainObject:WYe,fn:ZYe,bool:XYe,buffer:$Ye,typedArray:e1e,arrayBuffer:A1e,string:t1e,number:r1e,integer:i1e,inRange:a1e,inArray:o1e,invalidParameterError:n1e,nativeError:s1e}});var qee=ee((kDA,Jee)=>{"use strict";var jee=()=>process.platform==="linux",sO=null,g1e=()=>{if(!sO)if(jee()&&process.report){let n=process.report.excludeNetwork;process.report.excludeNetwork=!0,sO=process.report.getReport(),process.report.excludeNetwork=n}else sO={};return sO};Jee.exports={isLinux:jee,getReport:g1e}});var Vee=ee((vDA,zee)=>{"use strict";var qh=$e("fs"),c1e="/usr/bin/ldd",I1e="/proc/self/exe",gO=2048,l1e=n=>{let t=qh.openSync(n,"r"),o=Buffer.alloc(gO),a=qh.readSync(t,o,0,gO,0);return qh.close(t,()=>{}),o.subarray(0,a)},d1e=n=>new Promise((t,o)=>{qh.open(n,"r",(a,e)=>{if(a)o(a);else{let i=Buffer.alloc(gO);qh.read(e,i,0,gO,0,(A,r)=>{t(i.subarray(0,r)),qh.close(e,()=>{})})}})});zee.exports={LDD_PATH:c1e,SELF_PATH:I1e,readFileSync:l1e,readFile:d1e}});var Zee=ee((PDA,Wee)=>{"use strict";var p1e=n=>{if(n.length<64||n.readUInt32BE(0)!==2135247942||n.readUInt8(4)!==2||n.readUInt8(5)!==1)return null;let t=n.readUInt32LE(32),o=n.readUInt16LE(54),a=n.readUInt16LE(56);for(let e=0;e{"use strict";var $ee=$e("child_process"),{isLinux:zh,getReport:eAe}=qee(),{LDD_PATH:cO,SELF_PATH:AAe,readFile:r2,readFileSync:i2}=Vee(),{interpreterPath:tAe}=Zee(),js,Js,qs,rAe="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",BI="",iAe=()=>BI||new Promise(n=>{$ee.exec(rAe,(t,o)=>{BI=t?" ":o,n(BI)})}),aAe=()=>{if(!BI)try{BI=$ee.execSync(rAe,{encoding:"utf8"})}catch{BI=" "}return BI},ic="glibc",oAe=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,ad="musl",h1e=n=>n.includes("libc.musl-")||n.includes("ld-musl-"),nAe=()=>{let n=eAe();return n.header&&n.header.glibcVersionRuntime?ic:Array.isArray(n.sharedObjects)&&n.sharedObjects.some(h1e)?ad:null},sAe=n=>{let[t,o]=n.split(/[\r\n]+/);return t&&t.includes(ic)?ic:o&&o.includes(ad)?ad:null},gAe=n=>{if(n){if(n.includes("/ld-musl-"))return ad;if(n.includes("/ld-linux-"))return ic}return null},cAe=n=>(n=n.toString(),n.includes("musl")?ad:n.includes("GNU C Library")?ic:null),E1e=async()=>{if(Js!==void 0)return Js;Js=null;try{let n=await r2(cO);Js=cAe(n)}catch{}return Js},u1e=()=>{if(Js!==void 0)return Js;Js=null;try{let n=i2(cO);Js=cAe(n)}catch{}return Js},C1e=async()=>{if(js!==void 0)return js;js=null;try{let n=await r2(AAe),t=tAe(n);js=gAe(t)}catch{}return js},B1e=()=>{if(js!==void 0)return js;js=null;try{let n=i2(AAe),t=tAe(n);js=gAe(t)}catch{}return js},IAe=async()=>{let n=null;if(zh()&&(n=await C1e(),!n&&(n=await E1e(),n||(n=nAe()),!n))){let t=await iAe();n=sAe(t)}return n},lAe=()=>{let n=null;if(zh()&&(n=B1e(),!n&&(n=u1e(),n||(n=nAe()),!n))){let t=aAe();n=sAe(t)}return n},f1e=async()=>zh()&&await IAe()!==ic,Q1e=()=>zh()&&lAe()!==ic,y1e=async()=>{if(qs!==void 0)return qs;qs=null;try{let t=(await r2(cO)).match(oAe);t&&(qs=t[1])}catch{}return qs},m1e=()=>{if(qs!==void 0)return qs;qs=null;try{let t=i2(cO).match(oAe);t&&(qs=t[1])}catch{}return qs},dAe=()=>{let n=eAe();return n.header&&n.header.glibcVersionRuntime?n.header.glibcVersionRuntime:null},Xee=n=>n.trim().split(/\s+/)[1],pAe=n=>{let[t,o,a]=n.split(/[\r\n]+/);return t&&t.includes(ic)?Xee(t):o&&a&&o.includes(ad)?Xee(a):null},S1e=async()=>{let n=null;if(zh()&&(n=await y1e(),n||(n=dAe()),!n)){let t=await iAe();n=pAe(t)}return n},w1e=()=>{let n=null;if(zh()&&(n=m1e(),n||(n=dAe()),!n)){let t=aAe();n=pAe(t)}return n};hAe.exports={GLIBC:ic,MUSL:ad,family:IAe,familySync:lAe,isNonGlibcLinux:f1e,isNonGlibcLinuxSync:Q1e,version:S1e,versionSync:w1e}});var Vh=ee((FDA,EAe)=>{"use strict";var D1e="2.0.0",O1e=Number.MAX_SAFE_INTEGER||9007199254740991,b1e=16,M1e=250,_1e=["major","premajor","minor","preminor","patch","prepatch","prerelease"];EAe.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:b1e,MAX_SAFE_BUILD_LENGTH:M1e,MAX_SAFE_INTEGER:O1e,RELEASE_TYPES:_1e,SEMVER_SPEC_VERSION:D1e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var sf=ee((LDA,uAe)=>{"use strict";var T1e=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{};uAe.exports=T1e});var Wh=ee((zs,CAe)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:a2,MAX_SAFE_BUILD_LENGTH:N1e,MAX_LENGTH:R1e}=Vh(),k1e=sf();zs=CAe.exports={};var v1e=zs.re=[],P1e=zs.safeRe=[],gA=zs.src=[],G1e=zs.safeSrc=[],cA=zs.t={},F1e=0,o2="[a-zA-Z0-9-]",L1e=[["\\s",1],["\\d",R1e],[o2,N1e]],U1e=n=>{for(let[t,o]of L1e)n=n.split(`${t}*`).join(`${t}{0,${o}}`).split(`${t}+`).join(`${t}{1,${o}}`);return n},JA=(n,t,o)=>{let a=U1e(t),e=F1e++;k1e(n,e,t),cA[n]=e,gA[e]=t,G1e[e]=a,v1e[e]=new RegExp(t,o?"g":void 0),P1e[e]=new RegExp(a,o?"g":void 0)};JA("NUMERICIDENTIFIER","0|[1-9]\\d*");JA("NUMERICIDENTIFIERLOOSE","\\d+");JA("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${o2}*`);JA("MAINVERSION",`(${gA[cA.NUMERICIDENTIFIER]})\\.(${gA[cA.NUMERICIDENTIFIER]})\\.(${gA[cA.NUMERICIDENTIFIER]})`);JA("MAINVERSIONLOOSE",`(${gA[cA.NUMERICIDENTIFIERLOOSE]})\\.(${gA[cA.NUMERICIDENTIFIERLOOSE]})\\.(${gA[cA.NUMERICIDENTIFIERLOOSE]})`);JA("PRERELEASEIDENTIFIER",`(?:${gA[cA.NONNUMERICIDENTIFIER]}|${gA[cA.NUMERICIDENTIFIER]})`);JA("PRERELEASEIDENTIFIERLOOSE",`(?:${gA[cA.NONNUMERICIDENTIFIER]}|${gA[cA.NUMERICIDENTIFIERLOOSE]})`);JA("PRERELEASE",`(?:-(${gA[cA.PRERELEASEIDENTIFIER]}(?:\\.${gA[cA.PRERELEASEIDENTIFIER]})*))`);JA("PRERELEASELOOSE",`(?:-?(${gA[cA.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${gA[cA.PRERELEASEIDENTIFIERLOOSE]})*))`);JA("BUILDIDENTIFIER",`${o2}+`);JA("BUILD",`(?:\\+(${gA[cA.BUILDIDENTIFIER]}(?:\\.${gA[cA.BUILDIDENTIFIER]})*))`);JA("FULLPLAIN",`v?${gA[cA.MAINVERSION]}${gA[cA.PRERELEASE]}?${gA[cA.BUILD]}?`);JA("FULL",`^${gA[cA.FULLPLAIN]}$`);JA("LOOSEPLAIN",`[v=\\s]*${gA[cA.MAINVERSIONLOOSE]}${gA[cA.PRERELEASELOOSE]}?${gA[cA.BUILD]}?`);JA("LOOSE",`^${gA[cA.LOOSEPLAIN]}$`);JA("GTLT","((?:<|>)?=?)");JA("XRANGEIDENTIFIERLOOSE",`${gA[cA.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);JA("XRANGEIDENTIFIER",`${gA[cA.NUMERICIDENTIFIER]}|x|X|\\*`);JA("XRANGEPLAIN",`[v=\\s]*(${gA[cA.XRANGEIDENTIFIER]})(?:\\.(${gA[cA.XRANGEIDENTIFIER]})(?:\\.(${gA[cA.XRANGEIDENTIFIER]})(?:${gA[cA.PRERELEASE]})?${gA[cA.BUILD]}?)?)?`);JA("XRANGEPLAINLOOSE",`[v=\\s]*(${gA[cA.XRANGEIDENTIFIERLOOSE]})(?:\\.(${gA[cA.XRANGEIDENTIFIERLOOSE]})(?:\\.(${gA[cA.XRANGEIDENTIFIERLOOSE]})(?:${gA[cA.PRERELEASELOOSE]})?${gA[cA.BUILD]}?)?)?`);JA("XRANGE",`^${gA[cA.GTLT]}\\s*${gA[cA.XRANGEPLAIN]}$`);JA("XRANGELOOSE",`^${gA[cA.GTLT]}\\s*${gA[cA.XRANGEPLAINLOOSE]}$`);JA("COERCEPLAIN",`(^|[^\\d])(\\d{1,${a2}})(?:\\.(\\d{1,${a2}}))?(?:\\.(\\d{1,${a2}}))?`);JA("COERCE",`${gA[cA.COERCEPLAIN]}(?:$|[^\\d])`);JA("COERCEFULL",gA[cA.COERCEPLAIN]+`(?:${gA[cA.PRERELEASE]})?(?:${gA[cA.BUILD]})?(?:$|[^\\d])`);JA("COERCERTL",gA[cA.COERCE],!0);JA("COERCERTLFULL",gA[cA.COERCEFULL],!0);JA("LONETILDE","(?:~>?)");JA("TILDETRIM",`(\\s*)${gA[cA.LONETILDE]}\\s+`,!0);zs.tildeTrimReplace="$1~";JA("TILDE",`^${gA[cA.LONETILDE]}${gA[cA.XRANGEPLAIN]}$`);JA("TILDELOOSE",`^${gA[cA.LONETILDE]}${gA[cA.XRANGEPLAINLOOSE]}$`);JA("LONECARET","(?:\\^)");JA("CARETTRIM",`(\\s*)${gA[cA.LONECARET]}\\s+`,!0);zs.caretTrimReplace="$1^";JA("CARET",`^${gA[cA.LONECARET]}${gA[cA.XRANGEPLAIN]}$`);JA("CARETLOOSE",`^${gA[cA.LONECARET]}${gA[cA.XRANGEPLAINLOOSE]}$`);JA("COMPARATORLOOSE",`^${gA[cA.GTLT]}\\s*(${gA[cA.LOOSEPLAIN]})$|^$`);JA("COMPARATOR",`^${gA[cA.GTLT]}\\s*(${gA[cA.FULLPLAIN]})$|^$`);JA("COMPARATORTRIM",`(\\s*)${gA[cA.GTLT]}\\s*(${gA[cA.LOOSEPLAIN]}|${gA[cA.XRANGEPLAIN]})`,!0);zs.comparatorTrimReplace="$1$2$3";JA("HYPHENRANGE",`^\\s*(${gA[cA.XRANGEPLAIN]})\\s+-\\s+(${gA[cA.XRANGEPLAIN]})\\s*$`);JA("HYPHENRANGELOOSE",`^\\s*(${gA[cA.XRANGEPLAINLOOSE]})\\s+-\\s+(${gA[cA.XRANGEPLAINLOOSE]})\\s*$`);JA("STAR","(<|>)?=?\\s*\\*");JA("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");JA("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var lO=ee((UDA,BAe)=>{"use strict";var H1e=Object.freeze({loose:!0}),K1e=Object.freeze({}),x1e=n=>n?typeof n!="object"?H1e:n:K1e;BAe.exports=x1e});var n2=ee((HDA,yAe)=>{"use strict";var fAe=/^[0-9]+$/,QAe=(n,t)=>{if(typeof n=="number"&&typeof t=="number")return n===t?0:nQAe(t,n);yAe.exports={compareIdentifiers:QAe,rcompareIdentifiers:Y1e}});var Fi=ee((KDA,SAe)=>{"use strict";var dO=sf(),{MAX_LENGTH:mAe,MAX_SAFE_INTEGER:pO}=Vh(),{safeRe:hO,t:EO}=Wh(),j1e=lO(),{compareIdentifiers:s2}=n2(),J1e=(n,t)=>{let o=t.split(".");if(o.length>n.length)return!1;for(let a=0;amAe)throw new TypeError(`version is longer than ${mAe} characters`);dO("SemVer",t,o),this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease;let a=t.trim().match(o.loose?hO[EO.LOOSE]:hO[EO.FULL]);if(!a)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+a[1],this.minor=+a[2],this.patch=+a[3],this.major>pO||this.major<0)throw new TypeError("Invalid major version");if(this.minor>pO||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>pO||this.patch<0)throw new TypeError("Invalid patch version");a[4]?this.prerelease=a[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let i=+e;if(i>=0&&it.major?1:this.minort.minor?1:this.patcht.patch?1:0}comparePre(t){if(t instanceof n||(t=new n(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let o=0;do{let a=this.prerelease[o],e=t.prerelease[o];if(dO("prerelease compare",o,a,e),a===void 0&&e===void 0)return 0;if(e===void 0)return 1;if(a===void 0)return-1;if(a===e)continue;return s2(a,e)}while(++o)}compareBuild(t){t instanceof n||(t=new n(t,this.options));let o=0;do{let a=this.build[o],e=t.build[o];if(dO("build compare",o,a,e),a===void 0&&e===void 0)return 0;if(e===void 0)return 1;if(a===void 0)return-1;if(a===e)continue;return s2(a,e)}while(++o)}inc(t,o,a){if(t.startsWith("pre")){if(!o&&a===!1)throw new Error("invalid increment argument: identifier is empty");if(o){let e=`-${o}`.match(this.options.loose?hO[EO.PRERELEASELOOSE]:hO[EO.PRERELEASE]);if(!e||e[1]!==o)throw new Error(`invalid identifier: ${o}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",o,a);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",o,a);break;case"prepatch":this.prerelease.length=0,this.inc("patch",o,a),this.inc("pre",o,a);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",o,a),this.inc("pre",o,a);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let e=Number(a)?1:0;if(this.prerelease.length===0)this.prerelease=[e];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(o===this.prerelease.join(".")&&a===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(o){let i=[o,e];if(a===!1&&(i=[o]),J1e(this.prerelease,o)){let A=this.prerelease[o.split(".").length];isNaN(A)&&(this.prerelease=i)}else this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};SAe.exports=g2});var fI=ee((xDA,DAe)=>{"use strict";var wAe=Fi(),q1e=(n,t,o=!1)=>{if(n instanceof wAe)return n;try{return new wAe(n,t)}catch(a){if(!o)return null;throw a}};DAe.exports=q1e});var bAe=ee((YDA,OAe)=>{"use strict";var z1e=fI(),V1e=(n,t)=>{let o=z1e(n,t);return o?o.version:null};OAe.exports=V1e});var _Ae=ee((jDA,MAe)=>{"use strict";var W1e=fI(),Z1e=(n,t)=>{let o=W1e(n.trim().replace(/^[=v]+/,""),t);return o?o.version:null};MAe.exports=Z1e});var RAe=ee((JDA,NAe)=>{"use strict";var TAe=Fi(),X1e=(n,t,o,a,e)=>{typeof o=="string"&&(e=a,a=o,o=void 0);try{return new TAe(n instanceof TAe?n.version:n,o).inc(t,a,e).version}catch{return null}};NAe.exports=X1e});var PAe=ee((qDA,vAe)=>{"use strict";var kAe=fI(),$1e=(n,t)=>{let o=kAe(n,null,!0),a=kAe(t,null,!0),e=o.compare(a);if(e===0)return null;let i=e>0,A=i?o:a,r=i?a:o,s=!!A.prerelease.length;if(!!r.prerelease.length&&!s){if(!r.patch&&!r.minor)return"major";if(r.compareMain(A)===0)return r.minor&&!r.patch?"minor":"patch"}let c=s?"pre":"";return o.major!==a.major?c+"major":o.minor!==a.minor?c+"minor":o.patch!==a.patch?c+"patch":"prerelease"};vAe.exports=$1e});var FAe=ee((zDA,GAe)=>{"use strict";var e3e=Fi(),A3e=(n,t)=>new e3e(n,t).major;GAe.exports=A3e});var UAe=ee((VDA,LAe)=>{"use strict";var t3e=Fi(),r3e=(n,t)=>new t3e(n,t).minor;LAe.exports=r3e});var KAe=ee((WDA,HAe)=>{"use strict";var i3e=Fi(),a3e=(n,t)=>new i3e(n,t).patch;HAe.exports=a3e});var YAe=ee((ZDA,xAe)=>{"use strict";var o3e=fI(),n3e=(n,t)=>{let o=o3e(n,t);return o&&o.prerelease.length?o.prerelease:null};xAe.exports=n3e});var on=ee((XDA,JAe)=>{"use strict";var jAe=Fi(),s3e=(n,t,o)=>new jAe(n,o).compare(new jAe(t,o));JAe.exports=s3e});var zAe=ee(($DA,qAe)=>{"use strict";var g3e=on(),c3e=(n,t,o)=>g3e(t,n,o);qAe.exports=c3e});var WAe=ee((eOA,VAe)=>{"use strict";var I3e=on(),l3e=(n,t)=>I3e(n,t,!0);VAe.exports=l3e});var uO=ee((AOA,XAe)=>{"use strict";var ZAe=Fi(),d3e=(n,t,o)=>{let a=new ZAe(n,o),e=new ZAe(t,o);return a.compare(e)||a.compareBuild(e)};XAe.exports=d3e});var ete=ee((tOA,$Ae)=>{"use strict";var p3e=uO(),h3e=(n,t)=>n.sort((o,a)=>p3e(o,a,t));$Ae.exports=h3e});var tte=ee((rOA,Ate)=>{"use strict";var E3e=uO(),u3e=(n,t)=>n.sort((o,a)=>E3e(a,o,t));Ate.exports=u3e});var gf=ee((iOA,rte)=>{"use strict";var C3e=on(),B3e=(n,t,o)=>C3e(n,t,o)>0;rte.exports=B3e});var CO=ee((aOA,ite)=>{"use strict";var f3e=on(),Q3e=(n,t,o)=>f3e(n,t,o)<0;ite.exports=Q3e});var c2=ee((oOA,ate)=>{"use strict";var y3e=on(),m3e=(n,t,o)=>y3e(n,t,o)===0;ate.exports=m3e});var I2=ee((nOA,ote)=>{"use strict";var S3e=on(),w3e=(n,t,o)=>S3e(n,t,o)!==0;ote.exports=w3e});var BO=ee((sOA,nte)=>{"use strict";var D3e=on(),O3e=(n,t,o)=>D3e(n,t,o)>=0;nte.exports=O3e});var fO=ee((gOA,ste)=>{"use strict";var b3e=on(),M3e=(n,t,o)=>b3e(n,t,o)<=0;ste.exports=M3e});var l2=ee((cOA,gte)=>{"use strict";var _3e=c2(),T3e=I2(),N3e=gf(),R3e=BO(),k3e=CO(),v3e=fO(),P3e=(n,t,o,a)=>{switch(t){case"===":return typeof n=="object"&&(n=n.version),typeof o=="object"&&(o=o.version),n===o;case"!==":return typeof n=="object"&&(n=n.version),typeof o=="object"&&(o=o.version),n!==o;case"":case"=":case"==":return _3e(n,o,a);case"!=":return T3e(n,o,a);case">":return N3e(n,o,a);case">=":return R3e(n,o,a);case"<":return k3e(n,o,a);case"<=":return v3e(n,o,a);default:throw new TypeError(`Invalid operator: ${t}`)}};gte.exports=P3e});var Ite=ee((IOA,cte)=>{"use strict";var G3e=Fi(),F3e=fI(),{safeRe:QO,t:yO}=Wh(),L3e=(n,t)=>{if(n instanceof G3e)return n;if(typeof n=="number"&&(n=String(n)),typeof n!="string")return null;t=t||{};let o=null;if(!t.rtl)o=n.match(t.includePrerelease?QO[yO.COERCEFULL]:QO[yO.COERCE]);else{let s=t.includePrerelease?QO[yO.COERCERTLFULL]:QO[yO.COERCERTL],g;for(;(g=s.exec(n))&&(!o||o.index+o[0].length!==n.length);)(!o||g.index+g[0].length!==o.index+o[0].length)&&(o=g),s.lastIndex=g.index+g[1].length+g[2].length;s.lastIndex=-1}if(o===null)return null;let a=o[2],e=o[3]||"0",i=o[4]||"0",A=t.includePrerelease&&o[5]?`-${o[5]}`:"",r=t.includePrerelease&&o[6]?`+${o[6]}`:"";return F3e(`${a}.${e}.${i}${A}${r}`,t)};cte.exports=L3e});var dte=ee((lOA,lte)=>{"use strict";var U3e=fI(),H3e=Vh(),K3e=Fi(),x3e=(n,t,o)=>{if(!H3e.RELEASE_TYPES.includes(t))return null;let a=Y3e(n,o);return a&&j3e(a,t)},Y3e=(n,t)=>{let o=n instanceof K3e?n.version:n;return U3e(o,t)},j3e=(n,t)=>{if(J3e(t))return n.version;switch(n.prerelease=[],t){case"major":n.minor=0,n.patch=0;break;case"minor":n.patch=0;break}return n.format()},J3e=n=>n.startsWith("pre");lte.exports=x3e});var hte=ee((dOA,pte)=>{"use strict";var d2=class{constructor(){this.max=1e3,this.map=new Map}get(t){let o=this.map.get(t);if(o!==void 0)return this.map.delete(t),this.map.set(t,o),o}delete(t){return this.map.delete(t)}set(t,o){if(!this.delete(t)&&o!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(t,o)}return this}};pte.exports=d2});var nn=ee((pOA,Bte)=>{"use strict";var q3e=/\s+/g,p2=class n{constructor(t,o){if(o=V3e(o),t instanceof n)return t.loose===!!o.loose&&t.includePrerelease===!!o.includePrerelease?t:new n(t.raw,o);if(t instanceof h2)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease,this.raw=t.trim().replace(q3e," "),this.set=this.raw.split("||").map(a=>this.parseRange(a.trim())).filter(a=>a.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let a=this.set[0];if(this.set=this.set.filter(e=>!ute(e[0])),this.set.length===0)this.set=[a];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&ije(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t0&&(this.formatted+="||");let o=this.set[t];for(let a=0;a0&&(this.formatted+=" "),this.formatted+=o[a].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){t=t.replace(rje,"");let a=((this.options.includePrerelease&&Aje)|(this.options.loose&&tje))+":"+t,e=Ete.get(a);if(e)return e;let i=this.options.loose,A=i?ma[Li.HYPHENRANGELOOSE]:ma[Li.HYPHENRANGE];t=t.replace(A,hje(this.options.includePrerelease)),$t("hyphen replace",t),t=t.replace(ma[Li.COMPARATORTRIM],X3e),$t("comparator trim",t),t=t.replace(ma[Li.TILDETRIM],$3e),$t("tilde trim",t),t=t.replace(ma[Li.CARETTRIM],eje),$t("caret trim",t);let r=t.split(" ").map(I=>aje(I,this.options)).join(" ").split(/\s+/).map(I=>pje(I,this.options));i&&(r=r.filter(I=>($t("loose invalid filter",I,this.options),!!I.match(ma[Li.COMPARATORLOOSE])))),$t("range list",r);let s=new Map,g=r.map(I=>new h2(I,this.options));for(let I of g){if(ute(I))return[I];s.set(I.value,I)}s.size>1&&s.has("")&&s.delete("");let c=[...s.values()];return Ete.set(a,c),c}intersects(t,o){if(!(t instanceof n))throw new TypeError("a Range is required");return this.set.some(a=>Cte(a,o)&&t.set.some(e=>Cte(e,o)&&a.every(i=>e.every(A=>i.intersects(A,o)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new W3e(t,this.options)}catch{return!1}for(let o=0;on.value==="<0.0.0-0",ije=n=>n.value==="",Cte=(n,t)=>{let o=!0,a=n.slice(),e=a.pop();for(;o&&a.length;)o=a.every(i=>e.intersects(i,t)),e=a.pop();return o},aje=(n,t)=>(n=n.replace(ma[Li.BUILD],""),$t("comp",n,t),n=gje(n,t),$t("caret",n),n=nje(n,t),$t("tildes",n),n=Ije(n,t),$t("xrange",n),n=dje(n,t),$t("stars",n),n),Xr=n=>!n||n.toLowerCase()==="x"||n==="*",oje=(n,t,o)=>Xr(n)&&!Xr(t)||Xr(t)&&o&&!Xr(o),nje=(n,t)=>n.trim().split(/\s+/).map(o=>sje(o,t)).join(" "),sje=(n,t)=>{let o=t.loose?ma[Li.TILDELOOSE]:ma[Li.TILDE],a=t.includePrerelease?"-0":"";return n.replace(o,(e,i,A,r,s)=>{$t("tilde",n,e,i,A,r,s);let g;return Xr(i)?g="":Xr(A)?g=`>=${i}.0.0${a} <${+i+1}.0.0-0`:Xr(r)?g=`>=${i}.${A}.0${a} <${i}.${+A+1}.0-0`:s?($t("replaceTilde pr",s),g=`>=${i}.${A}.${r}-${s} <${i}.${+A+1}.0-0`):g=`>=${i}.${A}.${r} <${i}.${+A+1}.0-0`,$t("tilde return",g),g})},gje=(n,t)=>n.trim().split(/\s+/).map(o=>cje(o,t)).join(" "),cje=(n,t)=>{$t("caret",n,t);let o=t.loose?ma[Li.CARETLOOSE]:ma[Li.CARET],a=t.includePrerelease?"-0":"";return n.replace(o,(e,i,A,r,s)=>{$t("caret",n,e,i,A,r,s);let g;return Xr(i)?g="":Xr(A)?g=`>=${i}.0.0${a} <${+i+1}.0.0-0`:Xr(r)?i==="0"?g=`>=${i}.${A}.0${a} <${i}.${+A+1}.0-0`:g=`>=${i}.${A}.0${a} <${+i+1}.0.0-0`:s?($t("replaceCaret pr",s),i==="0"?A==="0"?g=`>=${i}.${A}.${r}-${s} <${i}.${A}.${+r+1}-0`:g=`>=${i}.${A}.${r}-${s} <${i}.${+A+1}.0-0`:g=`>=${i}.${A}.${r}-${s} <${+i+1}.0.0-0`):($t("no pr"),i==="0"?A==="0"?g=`>=${i}.${A}.${r} <${i}.${A}.${+r+1}-0`:g=`>=${i}.${A}.${r} <${i}.${+A+1}.0-0`:g=`>=${i}.${A}.${r} <${+i+1}.0.0-0`),$t("caret return",g),g})},Ije=(n,t)=>($t("replaceXRanges",n,t),n.split(/\s+/).map(o=>lje(o,t)).join(" ")),lje=(n,t)=>{n=n.trim();let o=t.loose?ma[Li.XRANGELOOSE]:ma[Li.XRANGE];return n.replace(o,(a,e,i,A,r,s)=>{if($t("xRange",n,a,e,i,A,r,s),oje(i,A,r))return n;let g=Xr(i),c=g||Xr(A),I=c||Xr(r),d=I;return e==="="&&d&&(e=""),s=t.includePrerelease?"-0":"",g?e===">"||e==="<"?a="<0.0.0-0":a="*":e&&d?(c&&(A=0),r=0,e===">"?(e=">=",c?(i=+i+1,A=0,r=0):(A=+A+1,r=0)):e==="<="&&(e="<",c?i=+i+1:A=+A+1),e==="<"&&(s="-0"),a=`${e+i}.${A}.${r}${s}`):c?a=`>=${i}.0.0${s} <${+i+1}.0.0-0`:I&&(a=`>=${i}.${A}.0${s} <${i}.${+A+1}.0-0`),$t("xRange return",a),a})},dje=(n,t)=>($t("replaceStars",n,t),n.trim().replace(ma[Li.STAR],"")),pje=(n,t)=>($t("replaceGTE0",n,t),n.trim().replace(ma[t.includePrerelease?Li.GTE0PRE:Li.GTE0],"")),hje=n=>(t,o,a,e,i,A,r,s,g,c,I,d)=>(Xr(a)?o="":Xr(e)?o=`>=${a}.0.0${n?"-0":""}`:Xr(i)?o=`>=${a}.${e}.0${n?"-0":""}`:A?o=`>=${o}`:o=`>=${o}${n?"-0":""}`,Xr(g)?s="":Xr(c)?s=`<${+g+1}.0.0-0`:Xr(I)?s=`<${g}.${+c+1}.0-0`:d?s=`<=${g}.${c}.${I}-${d}`:n?s=`<${g}.${c}.${+I+1}-0`:s=`<=${s}`,`${o} ${s}`.trim()),Eje=(n,t,o)=>{for(let a=0;a0){let e=n[a].semver;if(e.major===t.major&&e.minor===t.minor&&e.patch===t.patch)return!0}return!1}return!0}});var cf=ee((hOA,wte)=>{"use strict";var If=Symbol("SemVer ANY"),C2=class n{static get ANY(){return If}constructor(t,o){if(o=fte(o),t instanceof n){if(t.loose===!!o.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),u2("comparator",t,o),this.options=o,this.loose=!!o.loose,this.parse(t),this.semver===If?this.value="":this.value=this.operator+this.semver.version,u2("comp",this)}parse(t){let o=this.options.loose?Qte[yte.COMPARATORLOOSE]:Qte[yte.COMPARATOR],a=t.match(o);if(!a)throw new TypeError(`Invalid comparator: ${t}`);this.operator=a[1]!==void 0?a[1]:"",this.operator==="="&&(this.operator=""),a[2]?this.semver=new mte(a[2],this.options.loose):this.semver=If}toString(){return this.value}test(t){if(u2("Comparator.test",t,this.options.loose),this.semver===If||t===If)return!0;if(typeof t=="string")try{t=new mte(t,this.options)}catch{return!1}return E2(t,this.operator,this.semver,this.options)}intersects(t,o){if(!(t instanceof n))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Ste(t.value,o).test(this.value):t.operator===""?t.value===""?!0:new Ste(this.value,o).test(t.semver):(o=fte(o),o.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!o.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||E2(this.semver,"<",t.semver,o)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||E2(this.semver,">",t.semver,o)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};wte.exports=C2;var fte=lO(),{safeRe:Qte,t:yte}=Wh(),E2=l2(),u2=sf(),mte=Fi(),Ste=nn()});var lf=ee((EOA,Dte)=>{"use strict";var uje=nn(),Cje=(n,t,o)=>{try{t=new uje(t,o)}catch{return!1}return t.test(n)};Dte.exports=Cje});var bte=ee((uOA,Ote)=>{"use strict";var Bje=nn(),fje=(n,t)=>new Bje(n,t).set.map(o=>o.map(a=>a.value).join(" ").trim().split(" "));Ote.exports=fje});var _te=ee((COA,Mte)=>{"use strict";var Qje=Fi(),yje=nn(),mje=(n,t,o)=>{let a=null,e=null,i=null;try{i=new yje(t,o)}catch{return null}return n.forEach(A=>{i.test(A)&&(!a||e.compare(A)===-1)&&(a=A,e=new Qje(a,o))}),a};Mte.exports=mje});var Nte=ee((BOA,Tte)=>{"use strict";var Sje=Fi(),wje=nn(),Dje=(n,t,o)=>{let a=null,e=null,i=null;try{i=new wje(t,o)}catch{return null}return n.forEach(A=>{i.test(A)&&(!a||e.compare(A)===1)&&(a=A,e=new Sje(a,o))}),a};Tte.exports=Dje});var vte=ee((fOA,kte)=>{"use strict";var B2=Fi(),Oje=nn(),Rte=gf(),bje=(n,t)=>{n=new Oje(n,t);let o=new B2("0.0.0");if(n.test(o)||(o=new B2("0.0.0-0"),n.test(o)))return o;o=null;for(let a=0;a{let r=new B2(A.semver.version);switch(A.operator){case">":r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!i||Rte(r,i))&&(i=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${A.operator}`)}}),i&&(!o||Rte(o,i))&&(o=i)}return o&&n.test(o)?o:null};kte.exports=bje});var Gte=ee((QOA,Pte)=>{"use strict";var Mje=nn(),_je=(n,t)=>{try{return new Mje(n,t).range||"*"}catch{return null}};Pte.exports=_je});var mO=ee((yOA,Hte)=>{"use strict";var Tje=Fi(),Ute=cf(),{ANY:Nje}=Ute,Rje=nn(),kje=lf(),Fte=gf(),Lte=CO(),vje=fO(),Pje=BO(),Gje=(n,t,o,a)=>{n=new Tje(n,a),t=new Rje(t,a);let e,i,A,r,s;switch(o){case">":e=Fte,i=vje,A=Lte,r=">",s=">=";break;case"<":e=Lte,i=Pje,A=Fte,r="<",s="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(kje(n,t,a))return!1;for(let g=0;g{B.semver===Nje&&(B=new Ute(">=0.0.0")),I=I||B,d=d||B,e(B.semver,I.semver,a)?I=B:A(B.semver,d.semver,a)&&(d=B)}),I.operator===r||I.operator===s||(!d.operator||d.operator===r)&&i(n,d.semver))return!1;if(d.operator===s&&A(n,d.semver))return!1}return!0};Hte.exports=Gje});var xte=ee((mOA,Kte)=>{"use strict";var Fje=mO(),Lje=(n,t,o)=>Fje(n,t,">",o);Kte.exports=Lje});var jte=ee((SOA,Yte)=>{"use strict";var Uje=mO(),Hje=(n,t,o)=>Uje(n,t,"<",o);Yte.exports=Hje});var zte=ee((wOA,qte)=>{"use strict";var Jte=nn(),Kje=(n,t,o)=>(n=new Jte(n,o),t=new Jte(t,o),n.intersects(t,o));qte.exports=Kje});var Wte=ee((DOA,Vte)=>{"use strict";var xje=lf(),Yje=on();Vte.exports=(n,t,o)=>{let a=[],e=null,i=null,A=n.sort((c,I)=>Yje(c,I,o));for(let c of A)xje(c,t,o)?(i=c,e||(e=c)):(i&&a.push([e,i]),i=null,e=null);e&&a.push([e,null]);let r=[];for(let[c,I]of a)c===I?r.push(c):!I&&c===A[0]?r.push("*"):I?c===A[0]?r.push(`<=${I}`):r.push(`${c} - ${I}`):r.push(`>=${c}`);let s=r.join(" || "),g=typeof t.raw=="string"?t.raw:String(t);return s.length{"use strict";var Zte=nn(),y2=cf(),{ANY:f2}=y2,Q2=lf(),m2=on(),jje=(n,t,o={})=>{if(n===t)return!0;n=new Zte(n,o),t=new Zte(t,o);let a=!1;e:for(let e of n.set){for(let i of t.set){let A=qje(e,i,o);if(a=a||A!==null,A)continue e}if(a)return!1}return!0},Jje=[new y2(">=0.0.0-0")],Xte=[new y2(">=0.0.0")],qje=(n,t,o)=>{if(n===t)return!0;if(n.length===1&&n[0].semver===f2){if(t.length===1&&t[0].semver===f2)return!0;o.includePrerelease?n=Jje:n=Xte}if(t.length===1&&t[0].semver===f2){if(o.includePrerelease)return!0;t=Xte}let a=new Set,e,i;for(let B of n)B.operator===">"||B.operator===">="?e=$te(e,B,o):B.operator==="<"||B.operator==="<="?i=ere(i,B,o):a.add(B.semver);if(a.size>1)return null;let A;if(e&&i){if(A=m2(e.semver,i.semver,o),A>0)return null;if(A===0&&(e.operator!==">="||i.operator!=="<="))return null}for(let B of a){if(e&&!Q2(B,String(e),o)||i&&!Q2(B,String(i),o))return null;for(let f of t)if(!Q2(B,String(f),o))return!1;return!0}let r,s,g,c,I=i&&!o.includePrerelease&&i.semver.prerelease.length?i.semver:!1,d=e&&!o.includePrerelease&&e.semver.prerelease.length?e.semver:!1;I&&I.prerelease.length===1&&i.operator==="<"&&I.prerelease[0]===0&&(I=!1);for(let B of t){if(c=c||B.operator===">"||B.operator===">=",g=g||B.operator==="<"||B.operator==="<=",e){if(d&&B.semver.prerelease&&B.semver.prerelease.length&&B.semver.major===d.major&&B.semver.minor===d.minor&&B.semver.patch===d.patch&&(d=!1),B.operator===">"||B.operator===">="){if(r=$te(e,B,o),r===B&&r!==e)return!1}else if(e.operator===">="&&!B.test(e.semver))return!1}if(i){if(I&&B.semver.prerelease&&B.semver.prerelease.length&&B.semver.major===I.major&&B.semver.minor===I.minor&&B.semver.patch===I.patch&&(I=!1),B.operator==="<"||B.operator==="<="){if(s=ere(i,B,o),s===B&&s!==i)return!1}else if(i.operator==="<="&&!B.test(i.semver))return!1}if(!B.operator&&(i||e)&&A!==0)return!1}return!(e&&g&&!i&&A!==0||i&&c&&!e&&A!==0||d||I)},$te=(n,t,o)=>{if(!n)return t;let a=m2(n.semver,t.semver,o);return a>0?n:a<0||t.operator===">"&&n.operator===">="?t:n},ere=(n,t,o)=>{if(!n)return t;let a=m2(n.semver,t.semver,o);return a<0?n:a>0||t.operator==="<"&&n.operator==="<="?t:n};Are.exports=jje});var SO=ee((bOA,are)=>{"use strict";var S2=Wh(),rre=Vh(),zje=Fi(),ire=n2(),Vje=fI(),Wje=bAe(),Zje=_Ae(),Xje=RAe(),$je=PAe(),eJe=FAe(),AJe=UAe(),tJe=KAe(),rJe=YAe(),iJe=on(),aJe=zAe(),oJe=WAe(),nJe=uO(),sJe=ete(),gJe=tte(),cJe=gf(),IJe=CO(),lJe=c2(),dJe=I2(),pJe=BO(),hJe=fO(),EJe=l2(),uJe=Ite(),CJe=dte(),BJe=cf(),fJe=nn(),QJe=lf(),yJe=bte(),mJe=_te(),SJe=Nte(),wJe=vte(),DJe=Gte(),OJe=mO(),bJe=xte(),MJe=jte(),_Je=zte(),TJe=Wte(),NJe=tre();are.exports={parse:Vje,valid:Wje,clean:Zje,inc:Xje,diff:$je,major:eJe,minor:AJe,patch:tJe,prerelease:rJe,compare:iJe,rcompare:aJe,compareLoose:oJe,compareBuild:nJe,sort:sJe,rsort:gJe,gt:cJe,lt:IJe,eq:lJe,neq:dJe,gte:pJe,lte:hJe,cmp:EJe,coerce:uJe,truncate:CJe,Comparator:BJe,Range:fJe,satisfies:QJe,toComparators:yJe,maxSatisfying:mJe,minSatisfying:SJe,minVersion:wJe,validRange:DJe,outside:OJe,gtr:bJe,ltr:MJe,intersects:_Je,simplifyRange:TJe,subset:NJe,SemVer:zje,re:S2.re,src:S2.src,tokens:S2.t,SEMVER_SPEC_VERSION:rre.SEMVER_SPEC_VERSION,RELEASE_TYPES:rre.RELEASE_TYPES,compareIdentifiers:ire.compareIdentifiers,rcompareIdentifiers:ire.rcompareIdentifiers}});var ac,wO=ue(()=>{ac={name:"sharp",description:"High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",version:"0.35.3",author:"Lovell Fuller ",homepage:"https://sharp.pixelplumbing.com",contributors:["Pierre Inglebert ","Jonathan Ong ","Chanon Sajjamanochai ","Juliano Julio ","Daniel Gasienica ","Julian Walker ","Amit Pitaru ","Brandon Aaron ","Andreas Lind ","Maurus Cuelenaere ","Linus Unneb\xE4ck ","Victor Mateevitsi ","Alaric Holloway ","Bernhard K. Weisshuhn ","Chris Riley ","David Carley ","John Tobin ","Kenton Gray ","Felix B\xFCnemann ","Samy Al Zahrani ","Chintan Thakkar ","F. Orlando Galashan ","Kleis Auke Wolthuizen ","Matt Hirsch ","Matthias Thoemmes ","Patrick Paskaris ","J\xE9r\xE9my Lal ","Rahul Nanwani ","Alice Monday ","Kristo Jorgenson ","YvesBos ","Guy Maliar ","Nicolas Coden ","Matt Parrish ","Marcel Bretschneider ","Matthew McEachen ","Jarda Kot\u011B\u0161ovec ","Kenric D'Souza ","Oleh Aleinyk ","Marcel Bretschneider ","Andrea Bianco ","Rik Heywood ","Thomas Parisot ","Nathan Graves ","Tom Lokhorst ","Espen Hovlandsdal ","Sylvain Dumont ","Alun Davies ","Aidan Hoolachan ","Axel Eirola ","Freezy ","Daiz ","Julian Aubourg ","Keith Belovay ","Michael B. Klein ","Jordan Prudhomme ","Ilya Ovdin ","Andargor ","Paul Neave ","Brendan Kennedy ","Brychan Bennett-Odlum ","Edward Silverton ","Roman Malieiev ","Tomas Szabo ","Robert O'Rourke ","Guillermo Alfonso Varela Chouci\xF1o ","Christian Flintrup ","Manan Jadhav ","Leon Radley ","alza54 ","Jacob Smith ","Michael Nutt ","Brad Parham ","Taneli Vatanen ","Joris Dugu\xE9 ","Chris Banks ","Ompal Singh ","Brodan ","Ankur Parihar ","Brahim Ait elhaj ","Mart Jansink ","Lachlan Newman ","Dennis Beatty ","Ingvar Stepanyan ","Don Denton ","Dmytro Tiapukhin ","Florian Lefebvre "],scripts:{build:"node install/build.js","build:dist":"node scripts/build.mjs",clean:"rm -rf src/build/ test/fixtures/output.*",test:"npm run lint && npm run test-unit",lint:"npm run lint-cpp && npm run lint-js && npm run lint-types && npm run lint-publish","lint-cpp":"cpplint --quiet src/*.h src/*.cc","lint-js":"biome lint","lint-publish":"publint --strict","lint-types":"tsd --files ./test/types/sharp.test-d.{cts,mts}","test-leak":"./test/leak/leak.sh","test-unit":"node --experimental-test-coverage test/unit.mjs","package-from-local-build":"node npm/from-local-build.js","package-wasm-wrappers":"node npm/wasm-wrappers.js","package-release-notes":"node npm/release-notes.js","docs-build":"node docs/build.mjs","docs-serve":"cd docs && npm start","docs-publish":"cd docs && npm run build && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp"},type:"commonjs",files:["dist","install","lib/index.d.ts","src/*.{cc,h,gyp}"],main:"./dist/index.cjs",module:"./dist/index.mjs",types:"./dist/index.d.mts",exports:{".":{import:{types:"./dist/index.d.mts",default:"./dist/index.mjs"},require:{types:"./dist/index.d.cts",default:"./dist/index.cjs"}}},sideEffects:!0,repository:{type:"git",url:"git+https://github.com/lovell/sharp.git"},keywords:["jpeg","png","webp","avif","tiff","gif","svg","jp2","dzi","image","resize","thumbnail","crop","embed","libvips","vips"],dependencies:{"@img/colour":"^1.1.0","detect-libc":"^2.1.2",semver:"^7.8.5"},optionalDependencies:{"@img/sharp-darwin-arm64":"0.35.3","@img/sharp-darwin-x64":"0.35.3","@img/sharp-freebsd-wasm32":"0.35.3","@img/sharp-libvips-darwin-arm64":"1.3.2","@img/sharp-libvips-darwin-x64":"1.3.2","@img/sharp-libvips-linux-arm":"1.3.2","@img/sharp-libvips-linux-arm64":"1.3.2","@img/sharp-libvips-linux-ppc64":"1.3.2","@img/sharp-libvips-linux-riscv64":"1.3.2","@img/sharp-libvips-linux-s390x":"1.3.2","@img/sharp-libvips-linux-x64":"1.3.2","@img/sharp-libvips-linuxmusl-arm64":"1.3.2","@img/sharp-libvips-linuxmusl-x64":"1.3.2","@img/sharp-linux-arm":"0.35.3","@img/sharp-linux-arm64":"0.35.3","@img/sharp-linux-ppc64":"0.35.3","@img/sharp-linux-riscv64":"0.35.3","@img/sharp-linux-s390x":"0.35.3","@img/sharp-linux-x64":"0.35.3","@img/sharp-linuxmusl-arm64":"0.35.3","@img/sharp-linuxmusl-x64":"0.35.3","@img/sharp-webcontainers-wasm32":"0.35.3","@img/sharp-win32-arm64":"0.35.3","@img/sharp-win32-ia32":"0.35.3","@img/sharp-win32-x64":"0.35.3"},peerDependenciesMeta:{"@types/node":{optional:!0}},devDependencies:{"@biomejs/biome":"^2.5.1","@cpplint/cli":"^0.1.0","@emnapi/runtime":"^1.11.1","@img/sharp-libvips-dev":"1.3.2","@img/sharp-libvips-dev-wasm32":"1.3.2","@img/sharp-libvips-win32-arm64":"1.3.2","@img/sharp-libvips-win32-ia32":"1.3.2","@img/sharp-libvips-win32-x64":"1.3.2","@types/node":"*",emnapi:"^1.11.1","exif-reader":"^2.0.3","extract-zip":"^2.0.1",icc:"^4.0.0","node-addon-api":"^8.9.0","node-gyp":"^12.4.0",publint:"^0.3.21","tar-fs":"^3.1.3",tsd:"^0.33.0"},license:"Apache-2.0",engines:{node:">=20.9.0"},config:{libvips:">=8.18.3"},funding:{url:"https://opencollective.com/libvips"}}});import{spawnSync as df}from"node:child_process";import{createHash as kJe}from"node:crypto";var pf,D2,vJe,nre,PJe,O2,GJe,sre,FJe,Zh,LJe,UJe,HJe,KJe,gre,xJe,ore,YJe,jJe,cre,JJe,qJe,Ire,w2,zJe,DO,b2=ue(()=>{pf=ze(SO(),1),D2=ze(IO(),1);wO();vJe=process.env.npm_package_config_libvips||ac.config.libvips,nre=pf.default.coerce(vJe).version,PJe=["darwin-arm64","darwin-x64","freebsd-arm64","freebsd-x64","linux-arm","linux-arm64","linux-ppc64","linux-riscv64","linux-s390x","linux-wasm32","linux-x64","linuxmusl-arm64","linuxmusl-x64","win32-arm64","win32-ia32","win32-x64"],O2={encoding:"utf8",shell:!0},GJe=n=>{n instanceof Error?console.error(`sharp: Installation error: ${n.message}`):console.log(`sharp: ${n}`)},sre=()=>D2.default.isNonGlibcLinuxSync()?D2.default.familySync():"",FJe=()=>`${process.platform}${sre()}-${process.arch}`,Zh=()=>{if(gre())return"wasm32";let{npm_config_arch:n,npm_config_platform:t,npm_config_libc:o}=process.env,a=typeof o=="string"?o:sre();return`${t||process.platform}${a}-${n||process.arch}`},LJe=()=>{try{return $e(`@img/sharp-libvips-dev-${Zh()}/include`)}catch{try{return $e("@img/sharp-libvips-dev/include")}catch{}}return""},UJe=()=>{try{return $e("@img/sharp-libvips-dev/cplusplus")}catch{}return""},HJe=()=>{try{return $e(`@img/sharp-libvips-dev-${Zh()}/lib`)}catch{try{return $e(`@img/sharp-libvips-${Zh()}/lib`)}catch{}}return""},KJe=()=>{if(process.release?.name==="node"&&process.versions&&!pf.default.satisfies(process.versions.node,ac.engines.node))return{found:process.versions.node,expected:ac.engines.node}},gre=()=>{let{CC:n}=process.env;return!!n?.endsWith("/emcc")},xJe=()=>process.platform==="darwin"&&process.arch==="x64"?(df("sysctl sysctl.proc_translated",O2).stdout||"").trim()==="sysctl.proc_translated: 1":!1,ore=n=>kJe("sha512").update(n).digest("hex"),YJe=()=>{try{let n=ore(`imgsharp-libvips-${Zh()}`),t=pf.default.coerce(ac.optionalDependencies[`@img/sharp-libvips-${Zh()}`],{includePrerelease:!0}).version;return ore(`${n}npm:${t}`).slice(0,10)}catch{}return""},jJe=()=>df(`node-gyp rebuild --directory=src ${gre()?"--nodedir=emscripten":""}`,{...O2,stdio:"inherit"}).status,cre=()=>process.platform!=="win32"?(df("pkg-config --modversion vips-cpp",{...O2,env:{...process.env,PKG_CONFIG_PATH:Ire()}}).stdout||"").trim():"",JJe=()=>{try{let n=(df("brew",["--prefix"],{encoding:"utf8"}).stdout||"").trim();if(n)return`${n}/lib/pkgconfig`}catch{}},qJe=()=>{try{let n=(df("pkg-config",["--variable","pc_path","pkg-config"],{encoding:"utf8"}).stdout||"").trim();if(n)return n}catch{}},Ire=()=>process.platform!=="win32"?[JJe(),qJe(),process.env.PKG_CONFIG_PATH].filter(Boolean).join(":"):"",w2=(n,t,o)=>(o&&o(`Detected ${t}, skipping search for globally-installed libvips`),n),zJe=n=>{if(process.env.SHARP_IGNORE_GLOBAL_LIBVIPS)return w2(!1,"SHARP_IGNORE_GLOBAL_LIBVIPS",n);if(process.env.SHARP_FORCE_GLOBAL_LIBVIPS)return w2(!0,"SHARP_FORCE_GLOBAL_LIBVIPS",n);if(xJe())return w2(!1,"Rosetta",n);let t=cre();return!!t&&pf.default.gte(t,nre)},DO={minimumLibvipsVersion:nre,prebuiltPlatforms:PJe,buildPlatformArch:Zh,buildSharpLibvipsIncludeDir:LJe,buildSharpLibvipsCPlusPlusDir:UJe,buildSharpLibvipsLibDir:HJe,isUnsupportedNodeRuntime:KJe,runtimePlatformArch:FJe,log:GJe,yarnLocator:YJe,spawnRebuild:jJe,globalLibvipsVersion:cre,pkgConfigPath:Ire,useGlobalLibvips:zJe}});import{createRequire as VJe}from"node:module";var OO,$r,dre,WJe,lre,ZJe,XJe,oc,xt,QI,Ot,hf=ue(()=>{OO=ze(IO(),1);b2();wO();$r=VJe(import.meta.url),{version:dre}=ac,{runtimePlatformArch:WJe,isUnsupportedNodeRuntime:lre,prebuiltPlatforms:ZJe,minimumLibvipsVersion:XJe}=DO,oc=WJe(),QI=[];try{xt=$r(`../src/build/Release/sharp-${oc}-${dre}.node`)}catch(n){QI.push(n)}if(!xt)try{xt=$r(`../src/build/Release/sharp-wasm32-${dre}.node`)}catch(n){QI.push(n)}if(!xt)try{switch(oc){case"darwin-arm64":xt=$r("@img/sharp-darwin-arm64/sharp.node");break;case"darwin-x64":xt=$r("@img/sharp-darwin-x64/sharp.node");break;case"linux-arm":xt=$r("@img/sharp-linux-arm/sharp.node");break;case"linux-arm64":xt=$r("@img/sharp-linux-arm64/sharp.node");break;case"linux-ppc64":xt=$r("@img/sharp-linux-ppc64/sharp.node");break;case"linux-riscv64":xt=$r("@img/sharp-linux-riscv64/sharp.node");break;case"linux-s390x":xt=$r("@img/sharp-linux-s390x/sharp.node");break;case"linux-x64":xt=$r("@img/sharp-linux-x64/sharp.node");break;case"linuxmusl-arm64":xt=$r("@img/sharp-linuxmusl-arm64/sharp.node");break;case"linuxmusl-x64":xt=$r("@img/sharp-linuxmusl-x64/sharp.node");break;case"win32-arm64":xt=$r("@img/sharp-win32-arm64/sharp.node");break;case"win32-ia32":xt=$r("@img/sharp-win32-ia32/sharp.node");break;case"win32-x64":xt=$r("@img/sharp-win32-x64/sharp.node");break;case"freebsd-arm64":case"freebsd-x64":xt=$r("@img/sharp-freebsd-wasm32/sharp.node");break;case"linux-wasm32":xt=$r("@img/sharp-webcontainers-wasm32/sharp.node");break}if(xt&&["linux-x64","linuxmusl-x64"].includes(oc)&&!xt._isUsingX64V2()){let n=new Error("Prebuilt binaries for Linux x64 require v2 microarchitecture");n.code="Unsupported CPU",QI.push(n),xt=null}xt&&process.versions.electron&&oc.startsWith("linux")&&process.emitWarning("Binaries provided by Electron for use on Linux may be incompatible with sharp - see https://sharp.pixelplumbing.com/install#electron-and-linux",{code:"SharpElectronLinux"})}catch(n){QI.push(n)}if(!xt)try{xt=$r("@img/sharp-wasm32/sharp.node")}catch(n){QI.push(n)}if(!xt){let[n,t,o]=["linux","darwin","win32"].map(i=>oc.startsWith(i)),a=[`Could not load the "sharp" module using the ${oc} runtime`];QI.forEach(i=>{i.code.endsWith("MODULE_NOT_FOUND")||a.push(`${i.code}: ${i.message}`)});let e=QI.map(i=>i.message).join(" ");if(a.push("Possible solutions:"),lre()){let{found:i,expected:A}=lre();a.push("- Please upgrade Node.js:",` Found ${i}`,` Requires ${A}`)}else if(ZJe.includes(oc)){let[i,A]=oc.split("-"),r=i.endsWith("musl")?" --libc=musl":"";a.push("- Ensure optional dependencies can be installed:"," npm install --include=optional sharp","- Ensure your package manager supports multi-platform installation:"," See https://sharp.pixelplumbing.com/install#cross-platform","- Add platform-specific dependencies:",` npm install --os=${i.replace("musl","")}${r} --cpu=${A} sharp`)}else a.push(`- Manually install libvips >= ${XJe}`," See https://sharp.pixelplumbing.com/install#building-from-source","- Add WebAssembly-based dependencies:"," npm install sharp @img/sharp-wasm32");if(n&&/(symbol not found|CXXABI_)/i.test(e))try{let{config:i}=$r(`@img/sharp-libvips-${oc}/package`),A=`${(0,OO.familySync)()} ${(0,OO.versionSync)()}`,r=`${i.musl?"musl":"glibc"} ${i.musl||i.glibc}`;a.push("- Update your OS:",` Found ${A}`,` Requires ${r}`)}catch{}throw n&&/\/snap\/core[0-9]{2}/.test(e)&&a.push("- Remove the Node.js Snap, which does not support native modules"," snap remove node"),t&&/Incompatible library version/.test(e)&&a.push("- Update Homebrew:"," brew update && brew upgrade vips"),QI.some(i=>i.code==="ERR_DLOPEN_DISABLED")&&a.push("- Run Node.js without using the --no-addons flag"),o&&/The specified procedure could not be found/.test(e)&&a.push("- Using the canvas package on Windows?"," See https://sharp.pixelplumbing.com/install#canvas-and-windows","- Check for outdated versions of sharp in the dependency tree:"," npm ls sharp"),a.push("- Consult the installation documentation:"," See https://sharp.pixelplumbing.com/install"),new Error(a.join(` -`))}Ot=xt});import $Je from"node:util";import M2 from"node:stream";function tqe(){let n=this.constructor.call(),{debuglog:t,queueListener:o,...a}=this.options;return n.options=structuredClone(a),n.options.debuglog=t,n.options.queueListener=o,this._isStreamInput()&&this.on("finish",()=>{this._flattenBufferIn(),n.options.input.buffer=this.options.input.buffer,n.emit("finish")}),n}var eqe,Aqe,od,Vs,pre=ue(()=>{Ys();hf();eqe=$Je.debuglog("sharp"),Aqe=n=>{od.queue.emit("change",n)},od=function(n,t){if(arguments.length===1&&!O.defined(n))throw new Error("Invalid input");return this instanceof od?(M2.Duplex.call(this),this.options={topOffsetPre:-1,leftOffsetPre:-1,widthPre:-1,heightPre:-1,topOffsetPost:-1,leftOffsetPost:-1,widthPost:-1,heightPost:-1,width:-1,height:-1,canvas:"crop",position:0,resizeBackground:[0,0,0,255],angle:0,rotationAngle:0,rotationBackground:[0,0,0,255],rotateBefore:!1,orientBefore:!1,flip:!1,flop:!1,extendTop:0,extendBottom:0,extendLeft:0,extendRight:0,extendBackground:[0,0,0,255],extendWith:"background",withoutEnlargement:!1,withoutReduction:!1,affineMatrix:[],affineBackground:[0,0,0,255],affineIdx:0,affineIdy:0,affineOdx:0,affineOdy:0,affineInterpolator:this.constructor.interpolators.bilinear,kernel:"lanczos3",fastShrinkOnLoad:!0,tint:[-1,0,0,0],flatten:!1,flattenBackground:[0,0,0],unflatten:!1,negate:!1,negateAlpha:!0,medianSize:0,blurSigma:0,precision:"integer",minAmpl:.2,sharpenSigma:0,sharpenM1:1,sharpenM2:2,sharpenX1:2,sharpenY2:10,sharpenY3:20,threshold:0,thresholdGrayscale:!0,trimBackground:[],trimThreshold:-1,trimLineArt:!1,trimMargin:0,dilateWidth:0,erodeWidth:0,gamma:0,gammaOut:0,greyscale:!1,normalise:!1,normaliseLower:1,normaliseUpper:99,claheWidth:0,claheHeight:0,claheMaxSlope:3,brightness:1,saturation:1,hue:0,lightness:0,booleanBufferIn:null,booleanFileIn:"",joinChannelIn:[],extractChannel:-1,removeAlpha:!1,ensureAlpha:-1,colourspace:"srgb",colourspacePipeline:"last",composite:[],fileOut:"",formatOut:"input",streamOut:!1,typedArrayOut:!1,keepMetadata:0,withMetadataOrientation:-1,withMetadataDensity:0,withIccProfile:"",withExif:{},withExifMerge:!0,withXmp:"",keepGainMap:!1,withGainMap:!1,resolveWithObject:!1,loop:-1,delay:[],jpegQuality:80,jpegProgressive:!1,jpegChromaSubsampling:"4:2:0",jpegTrellisQuantisation:!1,jpegOvershootDeringing:!1,jpegOptimiseScans:!1,jpegOptimiseCoding:!0,jpegQuantisationTable:0,pngProgressive:!1,pngCompressionLevel:6,pngAdaptiveFiltering:!1,pngPalette:!1,pngQuality:100,pngEffort:7,pngBitdepth:8,pngDither:1,jp2Quality:80,jp2TileHeight:512,jp2TileWidth:512,jp2Lossless:!1,jp2ChromaSubsampling:"4:4:4",webpQuality:80,webpAlphaQuality:100,webpLossless:!1,webpNearLossless:!1,webpSmartSubsample:!1,webpSmartDeblock:!1,webpPreset:"default",webpEffort:4,webpMinSize:!1,webpMixed:!1,webpExact:!1,gifBitdepth:8,gifEffort:7,gifDither:1,gifInterFrameMaxError:0,gifInterPaletteMaxError:3,gifKeepDuplicateFrames:!1,gifReuse:!0,gifProgressive:!1,tiffQuality:80,tiffCompression:"jpeg",tiffBigtiff:!1,tiffPredictor:"horizontal",tiffPyramid:!1,tiffMiniswhite:!1,tiffBitdepth:0,tiffTile:!1,tiffTileHeight:256,tiffTileWidth:256,tiffXres:1,tiffYres:1,tiffResolutionUnit:"inch",heifQuality:50,heifLossless:!1,heifCompression:"av1",heifEffort:4,heifChromaSubsampling:"4:4:4",heifBitdepth:8,heifTune:"auto",jxlDistance:1,jxlDecodingTier:0,jxlEffort:7,jxlLossless:!1,rawDepth:"uchar",tileSize:256,tileOverlap:0,tileContainer:"fs",tileLayout:"dz",tileFormat:"last",tileDepth:"last",tileAngle:0,tileSkipBlanks:-1,tileBackground:[255,255,255,255],tileCentre:!1,tileId:"https://example.com/iiif",tileBasename:"",timeoutSeconds:0,linearA:[],linearB:[],pdfBackground:[255,255,255,255],debuglog:o=>{this.emit("warning",o),eqe(o)},queueListener:Aqe},this.options.input=this._createInputDescriptor(n,t,{allowStream:!0}),this):new od(n,t)};Object.setPrototypeOf(od.prototype,M2.Duplex.prototype);Object.setPrototypeOf(od,M2.Duplex);Object.assign(od.prototype,{clone:tqe});Vs=od});function hre(n){let t=iqe.filter(o=>O.defined(n[o])).map(o=>[o,n[o]]);return t.length?Object.fromEntries(t):void 0}function aqe(n,t,o){let a={autoOrient:!1,failOn:"warning",limitInputPixels:268402689,limitInputChannels:5,ignoreIcc:!1,unlimited:!1,sequentialRead:!0};if(O.string(n))a.file=n;else if(O.buffer(n)){if(n.length===0)throw Error("Input Buffer is empty");a.buffer=n}else if(O.arrayBuffer(n)){if(n.byteLength===0)throw Error("Input bit Array is empty");a.buffer=Buffer.from(n,0,n.byteLength)}else if(O.typedArray(n)){if(n.length===0)throw Error("Input Bit Array is empty");a.buffer=Buffer.from(n.buffer,n.byteOffset,n.byteLength)}else if(O.plainObject(n)&&!O.defined(t))t=n,hre(t)&&(a.buffer=[]);else if(!O.defined(n)&&!O.defined(t)&&O.object(o)&&o.allowStream)a.buffer=[];else if(Array.isArray(n))if(n.length>1)if(!this.options.joining)this.options.joining=!0,this.options.join=n.map(e=>this._createInputDescriptor(e));else throw new Error("Recursive join is unsupported");else throw new Error("Expected at least two images to join");else throw new Error(`Unsupported input '${n}' of type ${typeof n}${O.defined(t)?` when also providing options of type ${typeof t}`:""}`);if(O.object(t)){if(O.defined(t.failOn))if(O.string(t.failOn)&&O.inArray(t.failOn,["none","truncated","error","warning"]))a.failOn=t.failOn;else throw O.invalidParameterError("failOn","one of: none, truncated, error, warning",t.failOn);if(O.defined(t.autoOrient))if(O.bool(t.autoOrient))a.autoOrient=t.autoOrient;else throw O.invalidParameterError("autoOrient","boolean",t.autoOrient);if(O.defined(t.density))if(O.number(t.density)&&O.inRange(t.density,1,1e5))a.density=t.density;else throw O.invalidParameterError("density","number between 1 and 100000",t.density);if(O.defined(t.ignoreIcc))if(O.bool(t.ignoreIcc))a.ignoreIcc=t.ignoreIcc;else throw O.invalidParameterError("ignoreIcc","boolean",t.ignoreIcc);if(O.defined(t.limitInputPixels))if(O.bool(t.limitInputPixels))a.limitInputPixels=t.limitInputPixels?16383**2:0;else if(O.integer(t.limitInputPixels)&&O.inRange(t.limitInputPixels,0,Number.MAX_SAFE_INTEGER))a.limitInputPixels=t.limitInputPixels;else throw O.invalidParameterError("limitInputPixels","positive integer",t.limitInputPixels);if(O.defined(t.limitInputChannels))if(O.bool(t.limitInputChannels))a.limitInputChannels=t.limitInputChannels?5:0;else if(O.integer(t.limitInputChannels)&&O.inRange(t.limitInputChannels,0,Number.MAX_SAFE_INTEGER))a.limitInputChannels=t.limitInputChannels;else throw O.invalidParameterError("limitInputChannels","positive integer",t.limitInputChannels);if(O.defined(t.unlimited))if(O.bool(t.unlimited))a.unlimited=t.unlimited;else throw O.invalidParameterError("unlimited","boolean",t.unlimited);if(O.defined(t.sequentialRead))if(O.bool(t.sequentialRead))a.sequentialRead=t.sequentialRead;else throw O.invalidParameterError("sequentialRead","boolean",t.sequentialRead);if(O.defined(t.raw)){if(O.object(t.raw)&&O.integer(t.raw.width)&&O.inRange(t.raw.width,1,1e8)&&O.integer(t.raw.height)&&O.inRange(t.raw.height,1,1e8)&&O.integer(t.raw.channels)&&O.inRange(t.raw.channels,1,4))switch(a.rawWidth=t.raw.width,a.rawHeight=t.raw.height,a.rawChannels=t.raw.channels,n.constructor){case Uint8Array:case Uint8ClampedArray:a.rawDepth="uchar";break;case Int8Array:a.rawDepth="char";break;case Uint16Array:a.rawDepth="ushort";break;case Int16Array:a.rawDepth="short";break;case Uint32Array:a.rawDepth="uint";break;case Int32Array:a.rawDepth="int";break;case Float32Array:a.rawDepth="float";break;case Float64Array:a.rawDepth="double";break;default:a.rawDepth="uchar";break}else throw new Error("Expected width, height and channels for raw pixel input");if(a.rawPremultiplied=!1,O.defined(t.raw.premultiplied))if(O.bool(t.raw.premultiplied))a.rawPremultiplied=t.raw.premultiplied;else throw O.invalidParameterError("raw.premultiplied","boolean",t.raw.premultiplied);if(a.rawPageHeight=0,O.defined(t.raw.pageHeight))if(O.integer(t.raw.pageHeight)&&t.raw.pageHeight>0&&t.raw.pageHeight<=t.raw.height){if(t.raw.height%t.raw.pageHeight!==0)throw new Error(`Expected raw.height ${t.raw.height} to be a multiple of raw.pageHeight ${t.raw.pageHeight}`);a.rawPageHeight=t.raw.pageHeight}else throw O.invalidParameterError("raw.pageHeight","positive integer",t.raw.pageHeight)}if(O.defined(t.animated))if(O.bool(t.animated))a.pages=t.animated?-1:1;else throw O.invalidParameterError("animated","boolean",t.animated);if(O.defined(t.pages))if(O.integer(t.pages)&&O.inRange(t.pages,-1,1e5))a.pages=t.pages;else throw O.invalidParameterError("pages","integer between -1 and 100000",t.pages);if(O.defined(t.page))if(O.integer(t.page)&&O.inRange(t.page,0,1e5))a.page=t.page;else throw O.invalidParameterError("page","integer between 0 and 100000",t.page);if(O.object(t.openSlide)&&O.defined(t.openSlide.level))if(O.integer(t.openSlide.level)&&O.inRange(t.openSlide.level,0,256))a.openSlideLevel=t.openSlide.level;else throw O.invalidParameterError("openSlide.level","integer between 0 and 256",t.openSlide.level);else if(O.defined(t.level))if(O.integer(t.level)&&O.inRange(t.level,0,256))a.openSlideLevel=t.level;else throw O.invalidParameterError("level","integer between 0 and 256",t.level);if(O.object(t.tiff)&&O.defined(t.tiff.subifd))if(O.integer(t.tiff.subifd)&&O.inRange(t.tiff.subifd,-1,1e5))a.tiffSubifd=t.tiff.subifd;else throw O.invalidParameterError("tiff.subifd","integer between -1 and 100000",t.tiff.subifd);else if(O.defined(t.subifd))if(O.integer(t.subifd)&&O.inRange(t.subifd,-1,1e5))a.tiffSubifd=t.subifd;else throw O.invalidParameterError("subifd","integer between -1 and 100000",t.subifd);if(O.object(t.svg)){if(O.defined(t.svg.stylesheet))if(O.string(t.svg.stylesheet))a.svgStylesheet=t.svg.stylesheet;else throw O.invalidParameterError("svg.stylesheet","string",t.svg.stylesheet);if(O.defined(t.svg.highBitdepth))if(O.bool(t.svg.highBitdepth))a.svgHighBitdepth=t.svg.highBitdepth;else throw O.invalidParameterError("svg.highBitdepth","boolean",t.svg.highBitdepth)}if(O.object(t.pdf)&&O.defined(t.pdf.background)?a.pdfBackground=this._getBackgroundColourOption(t.pdf.background):O.defined(t.pdfBackground)&&(a.pdfBackground=this._getBackgroundColourOption(t.pdfBackground)),O.object(t.jp2)&&O.defined(t.jp2.oneshot))if(O.bool(t.jp2.oneshot))a.jp2Oneshot=t.jp2.oneshot;else throw O.invalidParameterError("jp2.oneshot","boolean",t.jp2.oneshot);if(O.defined(t.create))if(O.object(t.create)&&O.integer(t.create.width)&&O.inRange(t.create.width,1,1e8)&&O.integer(t.create.height)&&O.inRange(t.create.height,1,1e8)&&O.integer(t.create.channels)){if(a.createWidth=t.create.width,a.createHeight=t.create.height,a.createChannels=t.create.channels,a.createPageHeight=0,O.defined(t.create.pageHeight))if(O.integer(t.create.pageHeight)&&t.create.pageHeight>0&&t.create.pageHeight<=t.create.height){if(t.create.height%t.create.pageHeight!==0)throw new Error(`Expected create.height ${t.create.height} to be a multiple of create.pageHeight ${t.create.pageHeight}`);a.createPageHeight=t.create.pageHeight}else throw O.invalidParameterError("create.pageHeight","positive integer",t.create.pageHeight);if(O.defined(t.create.noise)){if(!O.object(t.create.noise))throw new Error("Expected noise to be an object");if(t.create.noise.type!=="gaussian")throw new Error("Only gaussian noise is supported at the moment");if(a.createNoiseType=t.create.noise.type,!O.inRange(t.create.channels,1,4))throw O.invalidParameterError("create.channels","number between 1 and 4",t.create.channels);if(a.createNoiseMean=128,O.defined(t.create.noise.mean))if(O.number(t.create.noise.mean)&&O.inRange(t.create.noise.mean,0,1e4))a.createNoiseMean=t.create.noise.mean;else throw O.invalidParameterError("create.noise.mean","number between 0 and 10000",t.create.noise.mean);if(a.createNoiseSigma=30,O.defined(t.create.noise.sigma))if(O.number(t.create.noise.sigma)&&O.inRange(t.create.noise.sigma,0,1e4))a.createNoiseSigma=t.create.noise.sigma;else throw O.invalidParameterError("create.noise.sigma","number between 0 and 10000",t.create.noise.sigma)}else if(O.defined(t.create.background)){if(!O.inRange(t.create.channels,3,4))throw O.invalidParameterError("create.channels","number between 3 and 4",t.create.channels);a.createBackground=this._getBackgroundColourOption(t.create.background)}else throw new Error("Expected valid noise or background to create a new input image");delete a.buffer}else throw new Error("Expected valid width, height and channels to create a new input image");if(O.defined(t.text))if(O.object(t.text)&&O.string(t.text.text)){if(a.textValue=t.text.text,O.defined(t.text.height)&&O.defined(t.text.dpi))throw new Error("Expected only one of dpi or height");if(O.defined(t.text.font))if(O.string(t.text.font))a.textFont=t.text.font;else throw O.invalidParameterError("text.font","string",t.text.font);if(O.defined(t.text.fontfile))if(O.string(t.text.fontfile))a.textFontfile=t.text.fontfile;else throw O.invalidParameterError("text.fontfile","string",t.text.fontfile);if(O.defined(t.text.width))if(O.integer(t.text.width)&&O.inRange(t.text.width,1,1e6))a.textWidth=t.text.width;else throw O.invalidParameterError("text.width","integer between 1 and 1000000",t.text.width);if(O.defined(t.text.height))if(O.integer(t.text.height)&&O.inRange(t.text.height,1,1e6))a.textHeight=t.text.height;else throw O.invalidParameterError("text.height","integer between 1 and 1000000",t.text.height);if(O.defined(t.text.align))if(O.string(t.text.align)&&O.string(this.constructor.align[t.text.align]))a.textAlign=this.constructor.align[t.text.align];else throw O.invalidParameterError("text.align","valid alignment",t.text.align);if(O.defined(t.text.justify))if(O.bool(t.text.justify))a.textJustify=t.text.justify;else throw O.invalidParameterError("text.justify","boolean",t.text.justify);if(O.defined(t.text.dpi))if(O.integer(t.text.dpi)&&O.inRange(t.text.dpi,1,1e6))a.textDpi=t.text.dpi;else throw O.invalidParameterError("text.dpi","integer between 1 and 1000000",t.text.dpi);if(O.defined(t.text.rgba))if(O.bool(t.text.rgba))a.textRgba=t.text.rgba;else throw O.invalidParameterError("text.rgba","bool",t.text.rgba);if(O.defined(t.text.spacing))if(O.integer(t.text.spacing)&&O.inRange(t.text.spacing,-1e6,1e6))a.textSpacing=t.text.spacing;else throw O.invalidParameterError("text.spacing","integer between -1000000 and 1000000",t.text.spacing);if(O.defined(t.text.wrap))if(O.string(t.text.wrap)&&O.inArray(t.text.wrap,["word","char","word-char","none"]))a.textWrap=t.text.wrap;else throw O.invalidParameterError("text.wrap","one of: word, char, word-char, none",t.text.wrap);delete a.buffer}else throw new Error("Expected a valid string to create an image with text.");if(O.defined(t.join))if(O.defined(this.options.join)){if(O.defined(t.join.animated))if(O.bool(t.join.animated))a.joinAnimated=t.join.animated;else throw O.invalidParameterError("join.animated","boolean",t.join.animated);if(O.defined(t.join.across))if(O.integer(t.join.across)&&O.inRange(t.join.across,1,1e6))a.joinAcross=t.join.across;else throw O.invalidParameterError("join.across","integer between 1 and 100000",t.join.across);if(O.defined(t.join.shim))if(O.integer(t.join.shim)&&O.inRange(t.join.shim,0,1e6))a.joinShim=t.join.shim;else throw O.invalidParameterError("join.shim","integer between 0 and 100000",t.join.shim);if(O.defined(t.join.background)&&(a.joinBackground=this._getBackgroundColourOption(t.join.background)),O.defined(t.join.halign))if(O.string(t.join.halign)&&O.string(this.constructor.align[t.join.halign]))a.joinHalign=this.constructor.align[t.join.halign];else throw O.invalidParameterError("join.halign","valid alignment",t.join.halign);if(O.defined(t.join.valign))if(O.string(t.join.valign)&&O.string(this.constructor.align[t.join.valign]))a.joinValign=this.constructor.align[t.join.valign];else throw O.invalidParameterError("join.valign","valid alignment",t.join.valign)}else throw new Error("Expected input to be an array of images to join")}else if(O.defined(t))throw new Error(`Invalid input options ${t}`);return a}function oqe(n,t,o){Array.isArray(this.options.input.buffer)?O.buffer(n)?(this.options.input.buffer.length===0&&this.on("finish",()=>{this.streamInFinished=!0}),this.options.input.buffer.push(n),o()):o(new Error("Non-Buffer data on Writable Stream")):o(new Error("Unexpected data on Writable Stream"))}function nqe(){this._isStreamInput()&&(this.options.input.buffer=Buffer.concat(this.options.input.buffer))}function sqe(){return Array.isArray(this.options.input.buffer)}function gqe(n){let t=Error();return O.fn(n)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),Ot.metadata(this.options,(o,a)=>{o?n(O.nativeError(o,t)):n(null,a)})}):Ot.metadata(this.options,(o,a)=>{o?n(O.nativeError(o,t)):n(null,a)}),this):this._isStreamInput()?new Promise((o,a)=>{let e=()=>{this._flattenBufferIn(),Ot.metadata(this.options,(i,A)=>{i?a(O.nativeError(i,t)):o(A)})};this.writableFinished?e():this.once("finish",e)}):new Promise((o,a)=>{Ot.metadata(this.options,(e,i)=>{e?a(O.nativeError(e,t)):o(i)})})}function cqe(n){let t=Error();return O.fn(n)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),Ot.stats(this.options,(o,a)=>{o?n(O.nativeError(o,t)):n(null,a)})}):Ot.stats(this.options,(o,a)=>{o?n(O.nativeError(o,t)):n(null,a)}),this):this._isStreamInput()?new Promise((o,a)=>{this.on("finish",function(){this._flattenBufferIn(),Ot.stats(this.options,(e,i)=>{e?a(O.nativeError(e,t)):o(i)})})}):new Promise((o,a)=>{Ot.stats(this.options,(e,i)=>{e?a(O.nativeError(e,t)):o(i)})})}var rqe,iqe,Ere,ure=ue(()=>{Ys();hf();rqe={left:"low",top:"low",low:"low",center:"centre",centre:"centre",right:"high",bottom:"high",high:"high"},iqe=["failOn","limitInputPixels","limitInputChannels","unlimited","animated","autoOrient","density","ignoreIcc","page","pages","sequentialRead","jp2","openSlide","pdf","raw","svg","tiff","openSlideLevel","pdfBackground","tiffSubifd"];Ere=n=>{Object.assign(n.prototype,{_inputOptionsFromObject:hre,_createInputDescriptor:aqe,_write:oqe,_flattenBufferIn:nqe,_isStreamInput:sqe,metadata:gqe,stats:cqe}),n.align=rqe}});function T2(n){return n.angle%360!==0||n.rotationAngle!==0}function bO(n){return n.width!==-1||n.height!==-1}function dqe(n,t,o){if(bO(this.options)&&this.options.debuglog("ignoring previous resize options"),this.options.widthPost!==-1&&this.options.debuglog("operation order will be: extract, resize, extract"),O.defined(n))if(O.object(n)&&!O.defined(o))o=n;else if(O.integer(n)&&n>0)this.options.width=n;else throw O.invalidParameterError("width","positive integer",n);else this.options.width=-1;if(O.defined(t))if(O.integer(t)&&t>0)this.options.height=t;else throw O.invalidParameterError("height","positive integer",t);else this.options.height=-1;if(O.object(o)){if(O.defined(o.width))if(O.integer(o.width)&&o.width>0)this.options.width=o.width;else throw O.invalidParameterError("width","positive integer",o.width);if(O.defined(o.height))if(O.integer(o.height)&&o.height>0)this.options.height=o.height;else throw O.invalidParameterError("height","positive integer",o.height);if(O.defined(o.fit)){let a=lqe[o.fit];if(O.string(a))this.options.canvas=a;else throw O.invalidParameterError("fit","valid fit",o.fit)}if(O.defined(o.position)){let a=O.integer(o.position)?o.position:Qre[o.position]||fre[o.position]||Bre[o.position];if(O.integer(a)&&(O.inRange(a,0,8)||O.inRange(a,16,17)))this.options.position=a;else throw O.invalidParameterError("position","valid position/gravity/strategy",o.position)}if(this._setBackgroundColourOption("resizeBackground",o.background),O.defined(o.kernel))if(O.string(_2[o.kernel]))this.options.kernel=_2[o.kernel];else throw O.invalidParameterError("kernel","valid kernel name",o.kernel);O.defined(o.withoutEnlargement)&&this._setBooleanOption("withoutEnlargement",o.withoutEnlargement),O.defined(o.withoutReduction)&&this._setBooleanOption("withoutReduction",o.withoutReduction),O.defined(o.fastShrinkOnLoad)&&this._setBooleanOption("fastShrinkOnLoad",o.fastShrinkOnLoad)}return T2(this.options)&&bO(this.options)&&(this.options.rotateBefore=!0),this}function pqe(n){if(O.integer(n))if(O.inRange(n,1,1e4))this.options.extendTop=n,this.options.extendBottom=n,this.options.extendLeft=n,this.options.extendRight=n;else throw O.invalidParameterError("extend","integer between 1 and 10000",n);else if(O.object(n)){if(O.defined(n.top))if(O.integer(n.top)&&O.inRange(n.top,0,1e4))this.options.extendTop=n.top;else throw O.invalidParameterError("top","integer between 0 and 10000",n.top);if(O.defined(n.bottom))if(O.integer(n.bottom)&&O.inRange(n.bottom,0,1e4))this.options.extendBottom=n.bottom;else throw O.invalidParameterError("bottom","integer between 0 and 10000",n.bottom);if(O.defined(n.left))if(O.integer(n.left)&&O.inRange(n.left,0,1e4))this.options.extendLeft=n.left;else throw O.invalidParameterError("left","integer between 0 and 10000",n.left);if(O.defined(n.right))if(O.integer(n.right)&&O.inRange(n.right,0,1e4))this.options.extendRight=n.right;else throw O.invalidParameterError("right","integer between 0 and 10000",n.right);if(this._setBackgroundColourOption("extendBackground",n.background),O.defined(n.extendWith))if(O.string(Cre[n.extendWith]))this.options.extendWith=Cre[n.extendWith];else throw O.invalidParameterError("extendWith","one of: background, copy, repeat, mirror",n.extendWith)}else throw O.invalidParameterError("extend","integer or object",n);return this}function hqe(n){let t=bO(this.options)||this.options.widthPre!==-1?"Post":"Pre";return this.options[`width${t}`]!==-1&&this.options.debuglog("ignoring previous extract options"),["left","top","width","height"].forEach(function(o){let a=n[o];if(O.integer(a)&&O.inRange(a,0,1e8))this.options[o+(o==="left"||o==="top"?"Offset":"")+t]=a;else throw O.invalidParameterError(o,"integer between 0 and 100000000",a)},this),T2(this.options)&&!bO(this.options)&&(this.options.widthPre===-1||this.options.widthPost===-1)&&(this.options.rotateBefore=!0),this.options.input.autoOrient&&(this.options.orientBefore=!0),this}function Eqe(n){if(this.options.trimThreshold=10,O.defined(n))if(O.object(n)){if(O.defined(n.background)&&this._setBackgroundColourOption("trimBackground",n.background),O.defined(n.threshold))if(O.number(n.threshold)&&n.threshold>=0)this.options.trimThreshold=n.threshold;else throw O.invalidParameterError("threshold","positive number",n.threshold);if(O.defined(n.lineArt)&&this._setBooleanOption("trimLineArt",n.lineArt),O.defined(n.margin))if(O.integer(n.margin)&&O.inRange(n.margin,0,1e7))this.options.trimMargin=n.margin;else throw O.invalidParameterError("margin","integer between 0 and 10000000",n.margin)}else throw O.invalidParameterError("trim","object",n);return T2(this.options)&&(this.options.rotateBefore=!0),this}var Bre,fre,Cre,Qre,_2,Iqe,lqe,yre,mre=ue(()=>{Ys();Bre={center:0,centre:0,north:1,east:2,south:3,west:4,northeast:5,southeast:6,southwest:7,northwest:8},fre={top:1,right:2,bottom:3,left:4,"right top":5,"right bottom":6,"left bottom":7,"left top":8},Cre={background:"background",copy:"copy",repeat:"repeat",mirror:"mirror"},Qre={entropy:16,attention:17},_2={nearest:"nearest",linear:"linear",cubic:"cubic",mitchell:"mitchell",lanczos2:"lanczos2",lanczos3:"lanczos3",mks2013:"mks2013",mks2021:"mks2021"},Iqe={contain:"contain",cover:"cover",fill:"fill",inside:"inside",outside:"outside"},lqe={contain:"embed",cover:"crop",fill:"ignore_aspect",inside:"max",outside:"min"};yre=n=>{Object.assign(n.prototype,{resize:dqe,extend:pqe,extract:hqe,trim:Eqe}),n.gravity=Bre,n.strategy=Qre,n.kernel=_2,n.fit=Iqe,n.position=fre}});function uqe(n){if(!Array.isArray(n))throw O.invalidParameterError("images to composite","array",n);return this.options.composite=n.map(t=>{if(!O.object(t))throw O.invalidParameterError("image to composite","object",t);let o=this._inputOptionsFromObject(t),a={input:this._createInputDescriptor(t.input,o,{allowStream:!1}),blend:"over",tile:!1,left:0,top:0,hasOffset:!1,gravity:0,premultiplied:!1};if(O.defined(t.blend))if(O.string(N2[t.blend]))a.blend=N2[t.blend];else throw O.invalidParameterError("blend","valid blend name",t.blend);if(O.defined(t.tile))if(O.bool(t.tile))a.tile=t.tile;else throw O.invalidParameterError("tile","boolean",t.tile);if(O.defined(t.left))if(O.integer(t.left))a.left=t.left;else throw O.invalidParameterError("left","integer",t.left);if(O.defined(t.top))if(O.integer(t.top))a.top=t.top;else throw O.invalidParameterError("top","integer",t.top);if(O.defined(t.top)!==O.defined(t.left))throw new Error("Expected both left and top to be set");if(a.hasOffset=O.integer(t.top)&&O.integer(t.left),O.defined(t.gravity))if(O.integer(t.gravity)&&O.inRange(t.gravity,0,8))a.gravity=t.gravity;else if(O.string(t.gravity)&&O.integer(this.constructor.gravity[t.gravity]))a.gravity=this.constructor.gravity[t.gravity];else throw O.invalidParameterError("gravity","valid gravity",t.gravity);if(O.defined(t.premultiplied))if(O.bool(t.premultiplied))a.premultiplied=t.premultiplied;else throw O.invalidParameterError("premultiplied","boolean",t.premultiplied);return a}),this}var N2,Sre,wre=ue(()=>{Ys();N2={clear:"clear",source:"source",over:"over",in:"in",out:"out",atop:"atop",dest:"dest","dest-over":"dest-over","dest-in":"dest-in","dest-out":"dest-out","dest-atop":"dest-atop",xor:"xor",add:"add",saturate:"saturate",multiply:"multiply",screen:"screen",overlay:"overlay",darken:"darken",lighten:"lighten","colour-dodge":"colour-dodge","color-dodge":"colour-dodge","colour-burn":"colour-burn","color-burn":"colour-burn","hard-light":"hard-light","soft-light":"soft-light",difference:"difference",exclusion:"exclusion"};Sre=n=>{n.prototype.composite=uqe,n.blend=N2}});function Cqe(n,t){if(!O.defined(n))return this.autoOrient();if((this.options.angle||this.options.rotationAngle)&&(this.options.debuglog("ignoring previous rotate options"),this.options.angle=0,this.options.rotationAngle=0),O.integer(n)&&!(n%90))this.options.angle=n;else if(O.number(n))this.options.rotationAngle=n,O.object(t)&&t.background&&this._setBackgroundColourOption("rotationBackground",t.background);else throw O.invalidParameterError("angle","numeric",n);return this}function Bqe(){return this.options.input.autoOrient=!0,this}function fqe(n){return this.options.flip=O.bool(n)?n:!0,this}function Qqe(n){return this.options.flop=O.bool(n)?n:!0,this}function yqe(n,t){let a=Array.isArray(n)&&(n.length===4&&n.every(O.number)||n.length===2&&n.every(e=>Array.isArray(e)&&e.length===2))?n.flat():[];if(a.length===4&&a.every(O.number))this.options.affineMatrix=a;else throw O.invalidParameterError("matrix","1x4 or 2x2 array",n);if(O.defined(t))if(O.object(t)){if(this._setBackgroundColourOption("affineBackground",t.background),O.defined(t.idx))if(O.number(t.idx))this.options.affineIdx=t.idx;else throw O.invalidParameterError("options.idx","number",t.idx);if(O.defined(t.idy))if(O.number(t.idy))this.options.affineIdy=t.idy;else throw O.invalidParameterError("options.idy","number",t.idy);if(O.defined(t.odx))if(O.number(t.odx))this.options.affineOdx=t.odx;else throw O.invalidParameterError("options.odx","number",t.odx);if(O.defined(t.ody))if(O.number(t.ody))this.options.affineOdy=t.ody;else throw O.invalidParameterError("options.ody","number",t.ody);if(O.defined(t.interpolator))if(O.inArray(t.interpolator,Object.values(this.constructor.interpolators)))this.options.affineInterpolator=t.interpolator;else throw O.invalidParameterError("options.interpolator","valid interpolator name",t.interpolator)}else throw O.invalidParameterError("options","object",t);return this}function mqe(n){if(O.plainObject(n)){if(O.number(n.sigma)&&O.inRange(n.sigma,1e-6,10))this.options.sharpenSigma=n.sigma;else throw O.invalidParameterError("options.sigma","number between 0.000001 and 10",n.sigma);if(O.defined(n.m1))if(O.number(n.m1)&&O.inRange(n.m1,0,1e6))this.options.sharpenM1=n.m1;else throw O.invalidParameterError("options.m1","number between 0 and 1000000",n.m1);if(O.defined(n.m2))if(O.number(n.m2)&&O.inRange(n.m2,0,1e6))this.options.sharpenM2=n.m2;else throw O.invalidParameterError("options.m2","number between 0 and 1000000",n.m2);if(O.defined(n.x1))if(O.number(n.x1)&&O.inRange(n.x1,0,1e6))this.options.sharpenX1=n.x1;else throw O.invalidParameterError("options.x1","number between 0 and 1000000",n.x1);if(O.defined(n.y2))if(O.number(n.y2)&&O.inRange(n.y2,0,1e6))this.options.sharpenY2=n.y2;else throw O.invalidParameterError("options.y2","number between 0 and 1000000",n.y2);if(O.defined(n.y3))if(O.number(n.y3)&&O.inRange(n.y3,0,1e6))this.options.sharpenY3=n.y3;else throw O.invalidParameterError("options.y3","number between 0 and 1000000",n.y3)}else this.options.sharpenSigma=-1;return this}function Sqe(n){if(!O.defined(n))this.options.medianSize=3;else if(O.integer(n)&&O.inRange(n,1,1e3))this.options.medianSize=n;else throw O.invalidParameterError("size","integer between 1 and 1000",n);return this}function wqe(n){let t;if(O.number(n))t=n;else if(O.plainObject(n)){if(!O.number(n.sigma))throw O.invalidParameterError("options.sigma","number between 0.3 and 1000",t);if(t=n.sigma,"precision"in n)if(O.string(Dre[n.precision]))this.options.precision=Dre[n.precision];else throw O.invalidParameterError("precision","one of: integer, float, approximate",n.precision);if("minAmplitude"in n)if(O.number(n.minAmplitude)&&O.inRange(n.minAmplitude,.001,1))this.options.minAmpl=n.minAmplitude;else throw O.invalidParameterError("minAmplitude","number between 0.001 and 1",n.minAmplitude)}if(!O.defined(n))this.options.blurSigma=-1;else if(O.bool(n))this.options.blurSigma=n?-1:0;else if(O.number(t)&&O.inRange(t,.3,1e3))this.options.blurSigma=t;else throw O.invalidParameterError("sigma","number between 0.3 and 1000",t);return this}function Dqe(n){if(!O.defined(n))this.options.dilateWidth=1;else if(O.integer(n)&&O.inRange(n,1,65536))this.options.dilateWidth=n;else throw O.invalidParameterError("width","integer between 1 and 65536",n);return this}function Oqe(n){if(!O.defined(n))this.options.erodeWidth=1;else if(O.integer(n)&&O.inRange(n,1,65536))this.options.erodeWidth=n;else throw O.invalidParameterError("width","integer between 1 and 65536",n);return this}function bqe(n){return this.options.flatten=O.bool(n)?n:!0,O.object(n)&&this._setBackgroundColourOption("flattenBackground",n.background),this}function Mqe(){return this.options.unflatten=!0,this}function _qe(n,t){if(!O.defined(n))this.options.gamma=2.2;else if(O.number(n)&&O.inRange(n,1,3))this.options.gamma=n;else throw O.invalidParameterError("gamma","number between 1.0 and 3.0",n);if(!O.defined(t))this.options.gammaOut=this.options.gamma;else if(O.number(t)&&O.inRange(t,1,3))this.options.gammaOut=t;else throw O.invalidParameterError("gammaOut","number between 1.0 and 3.0",t);return this}function Tqe(n){if(this.options.negate=O.bool(n)?n:!0,O.plainObject(n)&&"alpha"in n)if(O.bool(n.alpha))this.options.negateAlpha=n.alpha;else throw O.invalidParameterError("alpha","should be boolean value",n.alpha);return this}function Nqe(n){if(O.plainObject(n)){if(O.defined(n.lower))if(O.number(n.lower)&&O.inRange(n.lower,0,99))this.options.normaliseLower=n.lower;else throw O.invalidParameterError("lower","number between 0 and 99",n.lower);if(O.defined(n.upper))if(O.number(n.upper)&&O.inRange(n.upper,1,100))this.options.normaliseUpper=n.upper;else throw O.invalidParameterError("upper","number between 1 and 100",n.upper)}if(this.options.normaliseLower>=this.options.normaliseUpper)throw O.invalidParameterError("range","lower to be less than upper",`${this.options.normaliseLower} >= ${this.options.normaliseUpper}`);return this.options.normalise=!0,this}function Rqe(n){return this.normalise(n)}function kqe(n){if(O.plainObject(n)){if(O.integer(n.width)&&O.inRange(n.width,1,65536))this.options.claheWidth=n.width;else throw O.invalidParameterError("width","integer between 1 and 65536",n.width);if(O.integer(n.height)&&O.inRange(n.height,1,65536))this.options.claheHeight=n.height;else throw O.invalidParameterError("height","integer between 1 and 65536",n.height);if(O.defined(n.maxSlope))if(O.integer(n.maxSlope)&&O.inRange(n.maxSlope,0,100))this.options.claheMaxSlope=n.maxSlope;else throw O.invalidParameterError("maxSlope","integer between 0 and 100",n.maxSlope)}else throw O.invalidParameterError("options","plain object",n);return this}function vqe(n){if(!O.object(n)||!Array.isArray(n.kernel)||!O.integer(n.width)||!O.integer(n.height)||!O.inRange(n.width,3,1001)||!O.inRange(n.height,3,1001)||n.height*n.width!==n.kernel.length||!n.kernel.every(O.number))throw new Error("Invalid convolution kernel");return O.integer(n.scale)||(n.scale=n.kernel.reduce((t,o)=>t+o,0)),n.scale<1&&(n.scale=1),O.integer(n.offset)||(n.offset=0),this.options.convKernel=n,this}function Pqe(n,t){if(!O.defined(n))this.options.threshold=128;else if(O.bool(n))this.options.threshold=n?128:0;else if(O.integer(n)&&O.inRange(n,0,255))this.options.threshold=n;else throw O.invalidParameterError("threshold","integer between 0 and 255",n);return!O.object(t)||t.greyscale===!0||t.grayscale===!0?this.options.thresholdGrayscale=!0:this.options.thresholdGrayscale=!1,this}function Gqe(n,t,o){if(this.options.boolean=this._createInputDescriptor(n,o),O.string(t)&&O.inArray(t,["and","or","eor"]))this.options.booleanOp=t;else throw O.invalidParameterError("operator","one of: and, or, eor",t);return this}function Fqe(n,t){if(!O.defined(n)&&O.number(t)?n=1:O.number(n)&&!O.defined(t)&&(t=0),!O.defined(n))this.options.linearA=[];else if(O.number(n))this.options.linearA=[n];else if(Array.isArray(n)&&n.length&&n.every(O.number))this.options.linearA=n;else throw O.invalidParameterError("a","number or array of numbers",n);if(!O.defined(t))this.options.linearB=[];else if(O.number(t))this.options.linearB=[t];else if(Array.isArray(t)&&t.length&&t.every(O.number))this.options.linearB=t;else throw O.invalidParameterError("b","number or array of numbers",t);if(this.options.linearA.length!==this.options.linearB.length)throw new Error("Expected a and b to be arrays of the same length");return this}function Lqe(n){if(!Array.isArray(n))throw O.invalidParameterError("inputMatrix","array",n);let t=n.length;if(t!==3&&t!==4)throw O.invalidParameterError("inputMatrix","3x3 or 4x4 array",t);if(!n.every(a=>Array.isArray(a)&&a.length===t))throw O.invalidParameterError("inputMatrix",`array of ${t} arrays of length ${t}`,n);let o=n.flat();if(!o.every(O.number))throw O.invalidParameterError("inputMatrix","array of numbers",o);return this.options.recombMatrix=o,this}function Uqe(n){if(!O.plainObject(n))throw O.invalidParameterError("options","plain object",n);if("brightness"in n)if(O.number(n.brightness)&&n.brightness>=0)this.options.brightness=n.brightness;else throw O.invalidParameterError("brightness","number above zero",n.brightness);if("saturation"in n)if(O.number(n.saturation)&&n.saturation>=0)this.options.saturation=n.saturation;else throw O.invalidParameterError("saturation","number above zero",n.saturation);if("hue"in n)if(O.integer(n.hue))this.options.hue=n.hue%360;else throw O.invalidParameterError("hue","number",n.hue);if("lightness"in n)if(O.number(n.lightness))this.options.lightness=n.lightness;else throw O.invalidParameterError("lightness","number",n.lightness);return this}var Dre,Ore,bre=ue(()=>{Ys();Dre={integer:"integer",float:"float",approximate:"approximate"};Ore=n=>{Object.assign(n.prototype,{autoOrient:Bqe,rotate:Cqe,flip:fqe,flop:Qqe,affine:yqe,sharpen:mqe,erode:Oqe,dilate:Dqe,median:Sqe,blur:wqe,flatten:bqe,unflatten:Mqe,gamma:_qe,negate:Tqe,normalise:Nqe,normalize:Rqe,clahe:kqe,convolve:vqe,threshold:Pqe,boolean:Gqe,linear:Fqe,recomb:Lqe,modulate:Uqe})}});var kre=ee(($OA,Rre)=>{var G2=Object.defineProperty,Hqe=Object.getOwnPropertyDescriptor,Kqe=Object.getOwnPropertyNames,xqe=Object.prototype.hasOwnProperty,Yqe=(n,t)=>{for(var o in t)G2(n,o,{get:t[o],enumerable:!0})},jqe=(n,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of Kqe(t))!xqe.call(n,e)&&e!==o&&G2(n,e,{get:()=>t[e],enumerable:!(a=Hqe(t,e))||a.enumerable});return n},Jqe=n=>jqe(G2({},"__esModule",{value:!0}),n),Mre={};Yqe(Mre,{default:()=>o4e});Rre.exports=Jqe(Mre);var R2={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(let n in R2)Object.freeze(R2[n]);var Ws=Object.freeze(R2),_re=Object.create(null);for(let n in Ws)Object.hasOwn(Ws,n)&&(_re[Ws[n]]=n);var Ao={to:{},get:{}};Ao.get=function(n){let t=n.slice(0,3).toLowerCase(),o,a;switch(t){case"hsl":{o=Ao.get.hsl(n),a="hsl";break}case"hwb":{o=Ao.get.hwb(n),a="hwb";break}default:{o=Ao.get.rgb(n),a="rgb";break}}return o?{model:a,value:o}:null};Ao.get.rgb=function(n){if(!n)return null;let t=/^#([a-f\d]{3,4})$/i,o=/^#([a-f\d]{6})([a-f\d]{2})?$/i,a=/^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i,e=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i,i=/^(\w+)$/,A=[0,0,0,1],r,s,g;if(r=n.match(o)){for(g=r[2],r=r[1],s=0;s<3;s++){let c=s*2;A[s]=Number.parseInt(r.slice(c,c+2),16)}g&&(A[3]=Number.parseInt(g,16)/255)}else if(r=n.match(t)){for(r=r[1],g=r[3],s=0;s<3;s++)A[s]=Number.parseInt(r[s]+r[s],16);g&&(A[3]=Number.parseInt(g+g,16)/255)}else if(r=n.match(a)){for(s=0;s<3;s++)A[s]=Number.parseFloat(r[s+1]);r[4]&&(A[3]=r[5]?Number.parseFloat(r[4])*.01:Number.parseFloat(r[4]))}else if(r=n.match(e)){for(s=0;s<3;s++)A[s]=Math.round(Number.parseFloat(r[s+1])*2.55);r[4]&&(A[3]=r[5]?Number.parseFloat(r[4])*.01:Number.parseFloat(r[4]))}else return(r=n.toLowerCase().match(i))?r[1]==="transparent"?[0,0,0,0]:Object.hasOwn(Ws,r[1])?(A=Ws[r[1]].slice(),A[3]=1,A):null:null;for(s=0;s<3;s++)A[s]=yI(A[s],0,255);return A[3]=yI(A[3],0,1),A};Ao.get.hsl=function(n){if(!n)return null;let t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,o=n.match(t);if(o){let a=Number.parseFloat(o[4]),e=(Number.parseFloat(o[1])%360+360)%360,i=yI(Number.parseFloat(o[2]),0,100),A=yI(Number.parseFloat(o[3]),0,100),r=yI(Number.isNaN(a)?1:a,0,1);return[e,i,A,r]}return null};Ao.get.hwb=function(n){if(!n)return null;let t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,o=n.match(t);if(o){let a=Number.parseFloat(o[4]),e=(Number.parseFloat(o[1])%360+360)%360,i=yI(Number.parseFloat(o[2]),0,100),A=yI(Number.parseFloat(o[3]),0,100),r=yI(Number.isNaN(a)?1:a,0,1);return[e,i,A,r]}return null};Ao.to.hex=function(...n){return"#"+MO(n[0])+MO(n[1])+MO(n[2])+(n[3]<1?MO(Math.round(n[3]*255)):"")};Ao.to.rgb=function(...n){return n.length<4||n[3]===1?"rgb("+Math.round(n[0])+", "+Math.round(n[1])+", "+Math.round(n[2])+")":"rgba("+Math.round(n[0])+", "+Math.round(n[1])+", "+Math.round(n[2])+", "+n[3]+")"};Ao.to.rgb.percent=function(...n){let t=Math.round(n[0]/255*100),o=Math.round(n[1]/255*100),a=Math.round(n[2]/255*100);return n.length<4||n[3]===1?"rgb("+t+"%, "+o+"%, "+a+"%)":"rgba("+t+"%, "+o+"%, "+a+"%, "+n[3]+")"};Ao.to.hsl=function(...n){return n.length<4||n[3]===1?"hsl("+n[0]+", "+n[1]+"%, "+n[2]+"%)":"hsla("+n[0]+", "+n[1]+"%, "+n[2]+"%, "+n[3]+")"};Ao.to.hwb=function(...n){let t="";return n.length>=4&&n[3]!==1&&(t=", "+n[3]),"hwb("+n[0]+", "+n[1]+"%, "+n[2]+"%"+t+")"};Ao.to.keyword=function(...n){return _re[n.slice(0,3)]};function yI(n,t,o){return Math.min(Math.max(t,n),o)}function MO(n){let t=Math.round(n).toString(16).toUpperCase();return t.length<2?"0"+t:t}var Xh=Ao,Tre={};for(let n of Object.keys(Ws))Tre[Ws[n]]=n;var sA={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},nd=sA,nc=(6/29)**3;function eE(n){let t=n>.0031308?1.055*n**.4166666666666667-.055:n*12.92;return Math.min(Math.max(0,t),1)}function AE(n){return n>.04045?((n+.055)/1.055)**2.4:n/12.92}for(let n of Object.keys(sA)){if(!("channels"in sA[n]))throw new Error("missing channels property: "+n);if(!("labels"in sA[n]))throw new Error("missing channel labels property: "+n);if(sA[n].labels.length!==sA[n].channels)throw new Error("channel and label counts mismatch: "+n);let{channels:t,labels:o}=sA[n];delete sA[n].channels,delete sA[n].labels,Object.defineProperty(sA[n],"channels",{value:t}),Object.defineProperty(sA[n],"labels",{value:o})}sA.rgb.hsl=function(n){let t=n[0]/255,o=n[1]/255,a=n[2]/255,e=Math.min(t,o,a),i=Math.max(t,o,a),A=i-e,r,s;switch(i){case e:{r=0;break}case t:{r=(o-a)/A;break}case o:{r=2+(a-t)/A;break}case a:{r=4+(t-o)/A;break}}r=Math.min(r*60,360),r<0&&(r+=360);let g=(e+i)/2;return i===e?s=0:g<=.5?s=A/(i+e):s=A/(2-i-e),[r,s*100,g*100]};sA.rgb.hsv=function(n){let t,o,a,e,i,A=n[0]/255,r=n[1]/255,s=n[2]/255,g=Math.max(A,r,s),c=g-Math.min(A,r,s),I=function(d){return(g-d)/6/c+1/2};if(c===0)e=0,i=0;else{switch(i=c/g,t=I(A),o=I(r),a=I(s),g){case A:{e=a-o;break}case r:{e=1/3+t-a;break}case s:{e=2/3+o-t;break}}e<0?e+=1:e>1&&(e-=1)}return[e*360,i*100,g*100]};sA.rgb.hwb=function(n){let t=n[0],o=n[1],a=n[2],e=sA.rgb.hsl(n)[0],i=1/255*Math.min(t,Math.min(o,a));return a=1-1/255*Math.max(t,Math.max(o,a)),[e,i*100,a*100]};sA.rgb.oklab=function(n){let t=AE(n[0]/255),o=AE(n[1]/255),a=AE(n[2]/255),e=Math.cbrt(.4122214708*t+.5363325363*o+.0514459929*a),i=Math.cbrt(.2119034982*t+.6806995451*o+.1073969566*a),A=Math.cbrt(.0883024619*t+.2817188376*o+.6299787005*a),r=.2104542553*e+.793617785*i-.0040720468*A,s=1.9779984951*e-2.428592205*i+.4505937099*A,g=.0259040371*e+.7827717662*i-.808675766*A;return[r*100,s*100,g*100]};sA.rgb.cmyk=function(n){let t=n[0]/255,o=n[1]/255,a=n[2]/255,e=Math.min(1-t,1-o,1-a),i=(1-t-e)/(1-e)||0,A=(1-o-e)/(1-e)||0,r=(1-a-e)/(1-e)||0;return[i*100,A*100,r*100,e*100]};function qqe(n,t){return(n[0]-t[0])**2+(n[1]-t[1])**2+(n[2]-t[2])**2}sA.rgb.keyword=function(n){let t=Tre[n];if(t)return t;let o=Number.POSITIVE_INFINITY,a;for(let e of Object.keys(Ws)){let i=Ws[e],A=qqe(n,i);Anc?o**(1/3):7.787*o+16/116,a=a>nc?a**(1/3):7.787*a+16/116,e=e>nc?e**(1/3):7.787*e+16/116;let i=116*a-16,A=500*(o-a),r=200*(a-e);return[i,A,r]};sA.hsl.rgb=function(n){let t=n[0]/360,o=n[1]/100,a=n[2]/100,e,i;if(o===0)return i=a*255,[i,i,i];let A=a<.5?a*(1+o):a+o-a*o,r=2*a-A,s=[0,0,0];for(let g=0;g<3;g++)e=t+1/3*-(g-1),e<0&&e++,e>1&&e--,6*e<1?i=r+(A-r)*6*e:2*e<1?i=A:3*e<2?i=r+(A-r)*(2/3-e)*6:i=r,s[g]=i*255;return s};sA.hsl.hsv=function(n){let t=n[0],o=n[1]/100,a=n[2]/100,e=o,i=Math.max(a,.01);a*=2,o*=a<=1?a:2-a,e*=i<=1?i:2-i;let A=(a+o)/2,r=a===0?2*e/(i+e):2*o/(a+o);return[t,r*100,A*100]};sA.hsv.rgb=function(n){let t=n[0]/60,o=n[1]/100,a=n[2]/100,e=Math.floor(t)%6,i=t-Math.floor(t),A=255*a*(1-o),r=255*a*(1-o*i),s=255*a*(1-o*(1-i));switch(a*=255,e){case 0:return[a,s,A];case 1:return[r,a,A];case 2:return[A,a,s];case 3:return[A,r,a];case 4:return[s,A,a];case 5:return[a,A,r]}};sA.hsv.hsl=function(n){let t=n[0],o=n[1]/100,a=n[2]/100,e=Math.max(a,.01),i,A;A=(2-o)*a;let r=(2-o)*e;return i=o*e,i/=r<=1?r:2-r,i=i||0,A/=2,[t,i*100,A*100]};sA.hwb.rgb=function(n){let t=n[0]/360,o=n[1]/100,a=n[2]/100,e=o+a,i;e>1&&(o/=e,a/=e);let A=Math.floor(6*t),r=1-a;i=6*t-A,(A&1)!==0&&(i=1-i);let s=o+i*(r-o),g,c,I;switch(A){default:case 6:case 0:{g=r,c=s,I=o;break}case 1:{g=s,c=r,I=o;break}case 2:{g=o,c=r,I=s;break}case 3:{g=o,c=s,I=r;break}case 4:{g=s,c=o,I=r;break}case 5:{g=r,c=o,I=s;break}}return[g*255,c*255,I*255]};sA.cmyk.rgb=function(n){let t=n[0]/100,o=n[1]/100,a=n[2]/100,e=n[3]/100,i=1-Math.min(1,t*(1-e)+e),A=1-Math.min(1,o*(1-e)+e),r=1-Math.min(1,a*(1-e)+e);return[i*255,A*255,r*255]};sA.xyz.rgb=function(n){let t=n[0]/100,o=n[1]/100,a=n[2]/100,e,i,A;return e=t*3.2404542+o*-1.5371385+a*-.4985314,i=t*-.969266+o*1.8760108+a*.041556,A=t*.0556434+o*-.2040259+a*1.0572252,e=eE(e),i=eE(i),A=eE(A),[e*255,i*255,A*255]};sA.xyz.lab=function(n){let t=n[0],o=n[1],a=n[2];t/=95.047,o/=100,a/=108.883,t=t>nc?t**(1/3):7.787*t+16/116,o=o>nc?o**(1/3):7.787*o+16/116,a=a>nc?a**(1/3):7.787*a+16/116;let e=116*o-16,i=500*(t-o),A=200*(o-a);return[e,i,A]};sA.xyz.oklab=function(n){let t=n[0]/100,o=n[1]/100,a=n[2]/100,e=Math.cbrt(.8189330101*t+.3618667424*o-.1288597137*a),i=Math.cbrt(.0329845436*t+.9293118715*o+.0361456387*a),A=Math.cbrt(.0482003018*t+.2643662691*o+.633851707*a),r=.2104542553*e+.793617785*i-.0040720468*A,s=1.9779984951*e-2.428592205*i+.4505937099*A,g=.0259040371*e+.7827717662*i-.808675766*A;return[r*100,s*100,g*100]};sA.oklab.oklch=function(n){return sA.lab.lch(n)};sA.oklab.xyz=function(n){let t=n[0]/100,o=n[1]/100,a=n[2]/100,e=(.999999998*t+.396337792*o+.215803758*a)**3,i=(1.000000008*t-.105561342*o-.063854175*a)**3,A=(1.000000055*t-.089484182*o-1.291485538*a)**3,r=1.227013851*e-.55779998*i+.281256149*A,s=-.040580178*e+1.11225687*i-.071676679*A,g=-.076381285*e-.421481978*i+1.58616322*A;return[r*100,s*100,g*100]};sA.oklab.rgb=function(n){let t=n[0]/100,o=n[1]/100,a=n[2]/100,e=(t+.3963377774*o+.2158037573*a)**3,i=(t-.1055613458*o-.0638541728*a)**3,A=(t-.0894841775*o-1.291485548*a)**3,r=eE(4.0767416621*e-3.3077115913*i+.2309699292*A),s=eE(-1.2684380046*e+2.6097574011*i-.3413193965*A),g=eE(-.0041960863*e-.7034186147*i+1.707614701*A);return[r*255,s*255,g*255]};sA.oklch.oklab=function(n){return sA.lch.lab(n)};sA.lab.xyz=function(n){let t=n[0],o=n[1],a=n[2],e,i,A;i=(t+16)/116,e=o/500+i,A=i-a/200;let r=i**3,s=e**3,g=A**3;return i=r>nc?r:(i-16/116)/7.787,e=s>nc?s:(e-16/116)/7.787,A=g>nc?g:(A-16/116)/7.787,e*=95.047,i*=100,A*=108.883,[e,i,A]};sA.lab.lch=function(n){let t=n[0],o=n[1],a=n[2],e;e=Math.atan2(a,o)*360/2/Math.PI,e<0&&(e+=360);let A=Math.sqrt(o*o+a*a);return[t,A,e]};sA.lch.lab=function(n){let t=n[0],o=n[1],e=n[2]/360*2*Math.PI,i=o*Math.cos(e),A=o*Math.sin(e);return[t,i,A]};sA.rgb.ansi16=function(n,t=null){let[o,a,e]=n,i=t===null?sA.rgb.hsv(n)[2]:t;if(i=Math.round(i/50),i===0)return 30;let A=30+(Math.round(e/255)<<2|Math.round(a/255)<<1|Math.round(o/255));return i===2&&(A+=60),A};sA.hsv.ansi16=function(n){return sA.rgb.ansi16(sA.hsv.rgb(n),n[2])};sA.rgb.ansi256=function(n){let t=n[0],o=n[1],a=n[2];return t>>4===o>>4&&o>>4===a>>4?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(o/255*5)+Math.round(a/255*5)};sA.ansi16.rgb=function(n){n=n[0];let t=n%10;if(t===0||t===7)return n>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let o=(Math.trunc(n>50)+1)*.5,a=(t&1)*o*255,e=(t>>1&1)*o*255,i=(t>>2&1)*o*255;return[a,e,i]};sA.ansi256.rgb=function(n){if(n=n[0],n>=232){let i=(n-232)*10+8;return[i,i,i]}n-=16;let t,o=Math.floor(n/36)/5*255,a=Math.floor((t=n%36)/6)/5*255,e=t%6/5*255;return[o,a,e]};sA.rgb.hex=function(n){let o=(((Math.round(n[0])&255)<<16)+((Math.round(n[1])&255)<<8)+(Math.round(n[2])&255)).toString(16).toUpperCase();return"000000".slice(o.length)+o};sA.hex.rgb=function(n){let t=n.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!t)return[0,0,0];let o=t[0];t[0].length===3&&(o=[...o].map(r=>r+r).join(""));let a=Number.parseInt(o,16),e=a>>16&255,i=a>>8&255,A=a&255;return[e,i,A]};sA.rgb.hcg=function(n){let t=n[0]/255,o=n[1]/255,a=n[2]/255,e=Math.max(Math.max(t,o),a),i=Math.min(Math.min(t,o),a),A=e-i,r,s=A<1?i/(1-A):0;return A<=0?r=0:e===t?r=(o-a)/A%6:e===o?r=2+(a-t)/A:r=4+(t-o)/A,r/=6,r%=1,[r*360,A*100,s*100]};sA.hsl.hcg=function(n){let t=n[1]/100,o=n[2]/100,a=o<.5?2*t*o:2*t*(1-o),e=0;return a<1&&(e=(o-.5*a)/(1-a)),[n[0],a*100,e*100]};sA.hsv.hcg=function(n){let t=n[1]/100,o=n[2]/100,a=t*o,e=0;return a<1&&(e=(o-a)/(1-a)),[n[0],a*100,e*100]};sA.hcg.rgb=function(n){let t=n[0]/360,o=n[1]/100,a=n[2]/100;if(o===0)return[a*255,a*255,a*255];let e=[0,0,0],i=t%1*6,A=i%1,r=1-A,s=0;switch(Math.floor(i)){case 0:{e[0]=1,e[1]=A,e[2]=0;break}case 1:{e[0]=r,e[1]=1,e[2]=0;break}case 2:{e[0]=0,e[1]=1,e[2]=A;break}case 3:{e[0]=0,e[1]=r,e[2]=1;break}case 4:{e[0]=A,e[1]=0,e[2]=1;break}default:e[0]=1,e[1]=0,e[2]=r}return s=(1-o)*a,[(o*e[0]+s)*255,(o*e[1]+s)*255,(o*e[2]+s)*255]};sA.hcg.hsv=function(n){let t=n[1]/100,o=n[2]/100,a=t+o*(1-t),e=0;return a>0&&(e=t/a),[n[0],e*100,a*100]};sA.hcg.hsl=function(n){let t=n[1]/100,a=n[2]/100*(1-t)+.5*t,e=0;return a>0&&a<.5?e=t/(2*a):a>=.5&&a<1&&(e=t/(2*(1-a))),[n[0],e*100,a*100]};sA.hcg.hwb=function(n){let t=n[1]/100,o=n[2]/100,a=t+o*(1-t);return[n[0],(a-t)*100,(1-a)*100]};sA.hwb.hcg=function(n){let t=n[1]/100,a=1-n[2]/100,e=a-t,i=0;return e<1&&(i=(a-e)/(1-e)),[n[0],e*100,i*100]};sA.apple.rgb=function(n){return[n[0]/65535*255,n[1]/65535*255,n[2]/65535*255]};sA.rgb.apple=function(n){return[n[0]/255*65535,n[1]/255*65535,n[2]/255*65535]};sA.gray.rgb=function(n){return[n[0]/100*255,n[0]/100*255,n[0]/100*255]};sA.gray.hsl=function(n){return[0,0,n[0]]};sA.gray.hsv=sA.gray.hsl;sA.gray.hwb=function(n){return[0,100,n[0]]};sA.gray.cmyk=function(n){return[0,0,0,n[0]]};sA.gray.lab=function(n){return[n[0],0,0]};sA.gray.hex=function(n){let t=Math.round(n[0]/100*255)&255,a=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".slice(a.length)+a};sA.rgb.gray=function(n){return[(n[0]+n[1]+n[2])/3/255*100]};function zqe(){let n={},t=Object.keys(nd);for(let{length:o}=t,a=0;a0;){let a=o.pop(),e=Object.keys(nd[a]);for(let{length:i}=e,A=0;A1&&(o=a),n(o))};return"conversion"in n&&(t.conversion=n.conversion),t}function t4e(n){let t=function(...o){let a=o[0];if(a==null)return a;a.length>1&&(o=a);let e=n(o);if(typeof e=="object")for(let{length:i}=e,A=0;A0){this.model=t||"rgb",a=mo[this.model].channels;let e=Array.prototype.slice.call(n,0,a);this.color=P2(e,a),this.valpha=typeof n[a]=="number"?n[a]:1}else if(typeof n=="number")this.model="rgb",this.color=[n>>16&255,n>>8&255,n&255],this.valpha=1;else{this.valpha=1;let e=Object.keys(n);"alpha"in n&&(e.splice(e.indexOf("alpha"),1),this.valpha=typeof n.alpha=="number"?n.alpha:0);let i=e.sort().join("");if(!(i in k2))throw new Error("Unable to parse color from object: "+JSON.stringify(n));this.model=k2[i];let{labels:A}=mo[this.model],r=[];for(o=0;o(n%360+360)%360),saturationl:Mr("hsl",1,ei(100)),lightness:Mr("hsl",2,ei(100)),saturationv:Mr("hsv",1,ei(100)),value:Mr("hsv",2,ei(100)),chroma:Mr("hcg",1,ei(100)),gray:Mr("hcg",2,ei(100)),white:Mr("hwb",1,ei(100)),wblack:Mr("hwb",2,ei(100)),cyan:Mr("cmyk",0,ei(100)),magenta:Mr("cmyk",1,ei(100)),yellow:Mr("cmyk",2,ei(100)),black:Mr("cmyk",3,ei(100)),x:Mr("xyz",0,ei(95.047)),y:Mr("xyz",1,ei(100)),z:Mr("xyz",2,ei(108.833)),l:Mr("lab",0,ei(100)),a:Mr("lab",1),b:Mr("lab",2),keyword(n){return n!==void 0?new Qi(n):mo[this.model].keyword(this.color)},hex(n){return n!==void 0?new Qi(n):Xh.to.hex(...this.rgb().round().color)},hexa(n){if(n!==void 0)return new Qi(n);let t=this.rgb().round().color,o=Math.round(this.valpha*255).toString(16).toUpperCase();return o.length===1&&(o="0"+o),Xh.to.hex(...t)+o},rgbNumber(){let n=this.rgb().color;return(n[0]&255)<<16|(n[1]&255)<<8|n[2]&255},luminosity(){let n=this.rgb().color,t=[];for(let[o,a]of n.entries()){let e=a/255;t[o]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(n){let t=this.luminosity(),o=n.luminosity();return t>o?(t+.05)/(o+.05):(o+.05)/(t+.05)},level(n){let t=this.contrast(n);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){let n=this.rgb().color;return(n[0]*2126+n[1]*7152+n[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let n=this.rgb();for(let t=0;t<3;t++)n.color[t]=255-n.color[t];return n},lighten(n){let t=this.hsl();return t.color[2]+=t.color[2]*n,t},darken(n){let t=this.hsl();return t.color[2]-=t.color[2]*n,t},saturate(n){let t=this.hsl();return t.color[1]+=t.color[1]*n,t},desaturate(n){let t=this.hsl();return t.color[1]-=t.color[1]*n,t},whiten(n){let t=this.hwb();return t.color[1]+=t.color[1]*n,t},blacken(n){let t=this.hwb();return t.color[2]+=t.color[2]*n,t},grayscale(){let n=this.rgb().color,t=n[0]*.3+n[1]*.59+n[2]*.11;return Qi.rgb(t,t,t)},fade(n){return this.alpha(this.valpha-this.valpha*n)},opaquer(n){return this.alpha(this.valpha+this.valpha*n)},rotate(n){let t=this.hsl(),o=t.color[0];return o=(o+n)%360,o=o<0?360+o:o,t.color[0]=o,t},mix(n,t){if(!n||!n.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof n);let o=n.rgb(),a=this.rgb(),e=t===void 0?.5:t,i=2*e-1,A=o.alpha()-a.alpha(),r=((i*A===-1?i:(i+A)/(1+i*A))+1)/2,s=1-r;return Qi.rgb(r*o.red()+s*a.red(),r*o.green()+s*a.green(),r*o.blue()+s*a.blue(),o.alpha()*e+a.alpha()*(1-e))}};for(let n of Object.keys(mo)){if(Nre.includes(n))continue;let{channels:t}=mo[n];Qi.prototype[n]=function(...o){return this.model===n?new Qi(this):o.length>0?new Qi(o,n):new Qi([...a4e(mo[this.model][n].raw(this.color)),this.valpha],n)},Qi[n]=function(...o){let a=o[0];return typeof a=="number"&&(a=P2(o,t)),new Qi(a,n)}}function r4e(n,t){return Number(n.toFixed(t))}function i4e(n){return function(t){return r4e(t,n)}}function Mr(n,t,o){n=Array.isArray(n)?n:[n];for(let a of n)(v2[a]||=[])[t]=o;return n=n[0],function(a){let e;return a!==void 0?(o&&(a=o(a)),e=this[n](),e.color[t]=a,e):(e=this[n]().color[t],o&&(e=o(e)),e)}}function ei(n){return function(t){return Math.max(0,Math.min(n,t))}}function a4e(n){return Array.isArray(n)?n:[n]}function P2(n,t){for(let o=0;o{vre.exports=kre().default});function n4e(n){return this._setBackgroundColourOption("tint",n),this}function s4e(n){return this.options.greyscale=O.bool(n)?n:!0,this}function g4e(n){return this.greyscale(n)}function c4e(n){if(!O.string(n))throw O.invalidParameterError("colourspace","string",n);return this.options.colourspacePipeline=n,this}function I4e(n){return this.pipelineColourspace(n)}function l4e(n){if(!O.string(n))throw O.invalidParameterError("colourspace","string",n);return this.options.colourspace=n,this}function d4e(n){return this.toColourspace(n)}function Lre(n){if(O.object(n)||O.string(n)&&n.length>=3&&n.length<=200){let t=(0,Fre.default)(n),o=t.red(),a=t.green(),e=t.blue(),i=Math.round(t.alpha()*255);for(let[A,r]of[["red",o],["green",a],["blue",e],["alpha",i]])if(!O.number(r))throw O.invalidParameterError(`background.${A}`,"number",r);return[o,a,e,i]}else throw O.invalidParameterError("background","object or string",n)}function p4e(n,t){O.defined(t)&&(this.options[n]=Lre(t))}var Fre,Gre,Ure,Hre=ue(()=>{Fre=ze(Pre(),1);Ys();Gre={multiband:"multiband","b-w":"b-w",bw:"b-w",cmyk:"cmyk",srgb:"srgb"};Ure=n=>{Object.assign(n.prototype,{tint:n4e,greyscale:s4e,grayscale:g4e,pipelineColourspace:c4e,pipelineColorspace:I4e,toColourspace:l4e,toColorspace:d4e,_getBackgroundColourOption:Lre,_setBackgroundColourOption:p4e}),n.colourspace=Gre,n.colorspace=Gre}});function E4e(){return this.options.removeAlpha=!0,this}function u4e(n){if(O.defined(n))if(O.number(n)&&O.inRange(n,0,1))this.options.ensureAlpha=n;else throw O.invalidParameterError("alpha","number between 0 and 1",n);else this.options.ensureAlpha=1;return this}function C4e(n){let t={red:0,green:1,blue:2,alpha:3};if(Object.keys(t).includes(n)&&(n=t[n]),O.integer(n)&&O.inRange(n,0,4))this.options.extractChannel=n;else throw O.invalidParameterError("channel","integer or one of: red, green, blue, alpha",n);return this}function B4e(n,t){return Array.isArray(n)?n.forEach(function(o){this.options.joinChannelIn.push(this._createInputDescriptor(o,t))},this):this.options.joinChannelIn.push(this._createInputDescriptor(n,t)),this}function f4e(n){if(O.string(n)&&O.inArray(n,["and","or","eor"]))this.options.bandBoolOp=n;else throw O.invalidParameterError("boolOp","one of: and, or, eor",n);return this}var h4e,Kre,xre=ue(()=>{Ys();h4e={and:"and",or:"or",eor:"eor"};Kre=n=>{Object.assign(n.prototype,{removeAlpha:E4e,ensureAlpha:u4e,extractChannel:C4e,joinChannel:B4e,bandbool:f4e}),n.bool=h4e}});import F2 from"node:path";function y4e(n,t){let o;if(O.string(n)?O.string(this.options.input.file)&&F2.resolve(this.options.input.file)===F2.resolve(n)?o=new Error("Cannot use same file for input and output"):Q4e.test(F2.extname(n))&&!this.constructor.format.jp2.output.file&&(o=jre()):o=new Error("Missing output file path"),o)if(O.fn(t))t(o);else return Promise.reject(o);else{this.options.fileOut=n;let a=Error();return this._pipeline(t,a)}return this}function m4e(n,t){O.object(n)?this._setBooleanOption("resolveWithObject",n.resolveWithObject):this.options.resolveWithObject&&(this.options.resolveWithObject=!1),this.options.fileOut="";let o=Error();return this._pipeline(O.fn(n)?n:t,o)}function S4e(){this.options.resolveWithObject=!0,this.options.typedArrayOut=!0;let n=Error();return this._pipeline(null,n)}function w4e(n){if(O.number(n)&&n>0)this.options.withMetadataDensity=n;else throw O.invalidParameterError("density","positive number",n);return this.keepExif()}function D4e(){return this.options.keepMetadata|=1,this}function O4e(n){if(O.object(n))for(let[t,o]of Object.entries(n))if(O.object(o))for(let[a,e]of Object.entries(o))if(O.string(e))this.options.withExif[`exif-${t.toLowerCase()}-${a}`]=e;else throw O.invalidParameterError(`${t}.${a}`,"string",e);else throw O.invalidParameterError(t,"object",o);else throw O.invalidParameterError("exif","object",n);return this.options.withExifMerge=!1,this.keepExif()}function b4e(n){return this.withExif(n),this.options.withExifMerge=!0,this}function M4e(){return this.options.keepMetadata|=8,this}function _4e(n,t){if(O.string(n))this.options.withIccProfile=n;else throw O.invalidParameterError("icc","string",n);if(this.keepIccProfile(),O.object(t)&&O.defined(t.attach))if(O.bool(t.attach))t.attach||(this.options.keepMetadata&=-9);else throw O.invalidParameterError("attach","boolean",t.attach);return this}function T4e(){return this.options.keepGainMap=!0,this.options.withGainMap=!1,this.options.keepMetadata|=32,this}function N4e(){return this.options.withGainMap=!0,this.options.keepGainMap=!1,this.options.colourspace="scrgb",this}function R4e(){return this.options.keepMetadata|=2,this}function k4e(n){if(O.string(n)&&n.length>0)this.options.withXmp=n,this.options.keepMetadata|=2;else throw O.invalidParameterError("xmp","non-empty string",n);return this}function v4e(){return this.options.keepMetadata|=31,this}function P4e(n){if(this.keepMetadata(),this.withIccProfile("srgb"),O.object(n)){if(O.defined(n.orientation))if(O.integer(n.orientation)&&O.inRange(n.orientation,1,8))this.options.withMetadataOrientation=n.orientation;else throw O.invalidParameterError("orientation","integer between 1 and 8",n.orientation);if(O.defined(n.density))if(O.number(n.density)&&n.density>0)this.options.withMetadataDensity=n.density;else throw O.invalidParameterError("density","positive number",n.density);O.defined(n.icc)&&this.withIccProfile(n.icc),O.defined(n.exif)&&this.withExifMerge(n.exif)}return this}function G4e(n,t){let o=Yre.get((O.object(n)&&O.string(n.id)?n.id:n).toLowerCase());if(!o)throw O.invalidParameterError("format",`one of: ${[...Yre.keys()].join(", ")}`,n);return this[o](t)}function F4e(n){if(O.object(n)){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.jpegQuality=n.quality;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);if(O.defined(n.progressive)&&this._setBooleanOption("jpegProgressive",n.progressive),O.defined(n.chromaSubsampling))if(O.string(n.chromaSubsampling)&&O.inArray(n.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jpegChromaSubsampling=n.chromaSubsampling;else throw O.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",n.chromaSubsampling);let t=O.bool(n.optimizeCoding)?n.optimizeCoding:n.optimiseCoding;if(O.defined(t)&&this._setBooleanOption("jpegOptimiseCoding",t),O.defined(n.mozjpeg))if(O.bool(n.mozjpeg))n.mozjpeg&&(this.options.jpegTrellisQuantisation=!0,this.options.jpegOvershootDeringing=!0,this.options.jpegOptimiseScans=!0,this.options.jpegProgressive=!0,this.options.jpegQuantisationTable=3);else throw O.invalidParameterError("mozjpeg","boolean",n.mozjpeg);let o=O.bool(n.trellisQuantization)?n.trellisQuantization:n.trellisQuantisation;O.defined(o)&&this._setBooleanOption("jpegTrellisQuantisation",o),O.defined(n.overshootDeringing)&&this._setBooleanOption("jpegOvershootDeringing",n.overshootDeringing);let a=O.bool(n.optimizeScans)?n.optimizeScans:n.optimiseScans;O.defined(a)&&(this._setBooleanOption("jpegOptimiseScans",a),a&&(this.options.jpegProgressive=!0));let e=O.number(n.quantizationTable)?n.quantizationTable:n.quantisationTable;if(O.defined(e))if(O.integer(e)&&O.inRange(e,0,8))this.options.jpegQuantisationTable=e;else throw O.invalidParameterError("quantisationTable","integer between 0 and 8",e)}return this._updateFormatOut("jpeg",n)}function L4e(n){if(O.object(n)){if(O.defined(n.progressive)&&this._setBooleanOption("pngProgressive",n.progressive),O.defined(n.compressionLevel))if(O.integer(n.compressionLevel)&&O.inRange(n.compressionLevel,0,9))this.options.pngCompressionLevel=n.compressionLevel;else throw O.invalidParameterError("compressionLevel","integer between 0 and 9",n.compressionLevel);O.defined(n.adaptiveFiltering)&&this._setBooleanOption("pngAdaptiveFiltering",n.adaptiveFiltering);let t=n.colours||n.colors;if(O.defined(t))if(O.integer(t)&&O.inRange(t,2,256))this.options.pngBitdepth=Jre(t);else throw O.invalidParameterError("colours","integer between 2 and 256",t);if(O.defined(n.palette)?this._setBooleanOption("pngPalette",n.palette):[n.quality,n.effort,n.colours,n.colors,n.dither].some(O.defined)&&this._setBooleanOption("pngPalette",!0),this.options.pngPalette){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,0,100))this.options.pngQuality=n.quality;else throw O.invalidParameterError("quality","integer between 0 and 100",n.quality);if(O.defined(n.effort))if(O.integer(n.effort)&&O.inRange(n.effort,1,10))this.options.pngEffort=n.effort;else throw O.invalidParameterError("effort","integer between 1 and 10",n.effort);if(O.defined(n.dither))if(O.number(n.dither)&&O.inRange(n.dither,0,1))this.options.pngDither=n.dither;else throw O.invalidParameterError("dither","number between 0.0 and 1.0",n.dither)}}return this._updateFormatOut("png",n)}function U4e(n){if(O.object(n)){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.webpQuality=n.quality;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);if(O.defined(n.alphaQuality))if(O.integer(n.alphaQuality)&&O.inRange(n.alphaQuality,0,100))this.options.webpAlphaQuality=n.alphaQuality;else throw O.invalidParameterError("alphaQuality","integer between 0 and 100",n.alphaQuality);if(O.defined(n.lossless)&&this._setBooleanOption("webpLossless",n.lossless),O.defined(n.nearLossless)&&this._setBooleanOption("webpNearLossless",n.nearLossless),O.defined(n.smartSubsample)&&this._setBooleanOption("webpSmartSubsample",n.smartSubsample),O.defined(n.smartDeblock)&&this._setBooleanOption("webpSmartDeblock",n.smartDeblock),O.defined(n.preset))if(O.string(n.preset)&&O.inArray(n.preset,["default","photo","picture","drawing","icon","text"]))this.options.webpPreset=n.preset;else throw O.invalidParameterError("preset","one of: default, photo, picture, drawing, icon, text",n.preset);if(O.defined(n.effort))if(O.integer(n.effort)&&O.inRange(n.effort,0,6))this.options.webpEffort=n.effort;else throw O.invalidParameterError("effort","integer between 0 and 6",n.effort);O.defined(n.minSize)&&this._setBooleanOption("webpMinSize",n.minSize),O.defined(n.mixed)&&this._setBooleanOption("webpMixed",n.mixed),O.defined(n.exact)&&this._setBooleanOption("webpExact",n.exact)}return L2(n,this.options),this._updateFormatOut("webp",n)}function H4e(n){if(O.object(n)){O.defined(n.reuse)&&this._setBooleanOption("gifReuse",n.reuse),O.defined(n.progressive)&&this._setBooleanOption("gifProgressive",n.progressive);let t=n.colours||n.colors;if(O.defined(t))if(O.integer(t)&&O.inRange(t,2,256))this.options.gifBitdepth=Jre(t);else throw O.invalidParameterError("colours","integer between 2 and 256",t);if(O.defined(n.effort))if(O.integer(n.effort)&&O.inRange(n.effort,1,10))this.options.gifEffort=n.effort;else throw O.invalidParameterError("effort","integer between 1 and 10",n.effort);if(O.defined(n.dither))if(O.number(n.dither)&&O.inRange(n.dither,0,1))this.options.gifDither=n.dither;else throw O.invalidParameterError("dither","number between 0.0 and 1.0",n.dither);if(O.defined(n.interFrameMaxError))if(O.number(n.interFrameMaxError)&&O.inRange(n.interFrameMaxError,0,32))this.options.gifInterFrameMaxError=n.interFrameMaxError;else throw O.invalidParameterError("interFrameMaxError","number between 0.0 and 32.0",n.interFrameMaxError);if(O.defined(n.interPaletteMaxError))if(O.number(n.interPaletteMaxError)&&O.inRange(n.interPaletteMaxError,0,256))this.options.gifInterPaletteMaxError=n.interPaletteMaxError;else throw O.invalidParameterError("interPaletteMaxError","number between 0.0 and 256.0",n.interPaletteMaxError);if(O.defined(n.keepDuplicateFrames))if(O.bool(n.keepDuplicateFrames))this._setBooleanOption("gifKeepDuplicateFrames",n.keepDuplicateFrames);else throw O.invalidParameterError("keepDuplicateFrames","boolean",n.keepDuplicateFrames)}return L2(n,this.options),this._updateFormatOut("gif",n)}function K4e(n){if(!this.constructor.format.jp2.output.buffer)throw jre();if(O.object(n)){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.jp2Quality=n.quality;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);if(O.defined(n.lossless))if(O.bool(n.lossless))this.options.jp2Lossless=n.lossless;else throw O.invalidParameterError("lossless","boolean",n.lossless);if(O.defined(n.tileWidth))if(O.integer(n.tileWidth)&&O.inRange(n.tileWidth,1,32768))this.options.jp2TileWidth=n.tileWidth;else throw O.invalidParameterError("tileWidth","integer between 1 and 32768",n.tileWidth);if(O.defined(n.tileHeight))if(O.integer(n.tileHeight)&&O.inRange(n.tileHeight,1,32768))this.options.jp2TileHeight=n.tileHeight;else throw O.invalidParameterError("tileHeight","integer between 1 and 32768",n.tileHeight);if(O.defined(n.chromaSubsampling))if(O.string(n.chromaSubsampling)&&O.inArray(n.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jp2ChromaSubsampling=n.chromaSubsampling;else throw O.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",n.chromaSubsampling)}return this._updateFormatOut("jp2",n)}function L2(n,t){if(O.object(n)&&O.defined(n.loop))if(O.integer(n.loop)&&O.inRange(n.loop,0,65535))t.loop=n.loop;else throw O.invalidParameterError("loop","integer between 0 and 65535",n.loop);if(O.object(n)&&O.defined(n.delay))if(O.integer(n.delay)&&O.inRange(n.delay,0,65535))t.delay=[n.delay];else if(Array.isArray(n.delay)&&n.delay.every(O.integer)&&n.delay.every(o=>O.inRange(o,0,65535)))t.delay=n.delay;else throw O.invalidParameterError("delay","integer or an array of integers between 0 and 65535",n.delay)}function x4e(n){if(O.object(n)){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.tiffQuality=n.quality;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);if(O.defined(n.bitdepth))if(O.integer(n.bitdepth)&&O.inArray(n.bitdepth,[1,2,4]))this.options.tiffBitdepth=n.bitdepth;else throw O.invalidParameterError("bitdepth","1, 2 or 4",n.bitdepth);if(O.defined(n.tile)&&this._setBooleanOption("tiffTile",n.tile),O.defined(n.tileWidth))if(O.integer(n.tileWidth)&&O.inRange(n.tileWidth,1,32768))this.options.tiffTileWidth=n.tileWidth;else throw O.invalidParameterError("tileWidth","integer between 1 and 32768",n.tileWidth);if(O.defined(n.tileHeight))if(O.integer(n.tileHeight)&&O.inRange(n.tileHeight,1,32768))this.options.tiffTileHeight=n.tileHeight;else throw O.invalidParameterError("tileHeight","integer between 1 and 32768",n.tileHeight);if(O.defined(n.miniswhite)&&this._setBooleanOption("tiffMiniswhite",n.miniswhite),O.defined(n.pyramid)&&this._setBooleanOption("tiffPyramid",n.pyramid),O.defined(n.xres))if(O.number(n.xres)&&O.inRange(n.xres,.001,1e6))this.options.tiffXres=n.xres;else throw O.invalidParameterError("xres","number between 0.001 and 1000000",n.xres);if(O.defined(n.yres))if(O.number(n.yres)&&O.inRange(n.yres,.001,1e6))this.options.tiffYres=n.yres;else throw O.invalidParameterError("yres","number between 0.001 and 1000000",n.yres);if(O.defined(n.compression))if(O.string(n.compression)&&O.inArray(n.compression,["none","jpeg","deflate","packbits","ccittfax4","lzw","webp","zstd","jp2k"]))this.options.tiffCompression=n.compression;else throw O.invalidParameterError("compression","one of: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k",n.compression);if(O.defined(n.bigtiff)&&this._setBooleanOption("tiffBigtiff",n.bigtiff),O.defined(n.predictor))if(O.string(n.predictor)&&O.inArray(n.predictor,["none","horizontal","float"]))this.options.tiffPredictor=n.predictor;else throw O.invalidParameterError("predictor","one of: none, horizontal, float",n.predictor);if(O.defined(n.resolutionUnit))if(O.string(n.resolutionUnit)&&O.inArray(n.resolutionUnit,["inch","cm"]))this.options.tiffResolutionUnit=n.resolutionUnit;else throw O.invalidParameterError("resolutionUnit","one of: inch, cm",n.resolutionUnit)}return this._updateFormatOut("tiff",n)}function Y4e(n){return this.heif({...n,compression:"av1"})}function j4e(n){if(O.object(n)){if(O.string(n.compression)&&O.inArray(n.compression,["av1","hevc"]))this.options.heifCompression=n.compression;else throw O.invalidParameterError("compression","one of: av1, hevc",n.compression);if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.heifQuality=n.quality;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);if(O.defined(n.lossless))if(O.bool(n.lossless))this.options.heifLossless=n.lossless;else throw O.invalidParameterError("lossless","boolean",n.lossless);if(O.defined(n.effort))if(O.integer(n.effort)&&O.inRange(n.effort,0,9))this.options.heifEffort=n.effort;else throw O.invalidParameterError("effort","integer between 0 and 9",n.effort);if(O.defined(n.chromaSubsampling))if(O.string(n.chromaSubsampling)&&O.inArray(n.chromaSubsampling,["4:2:0","4:4:4"]))this.options.heifChromaSubsampling=n.chromaSubsampling;else throw O.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",n.chromaSubsampling);if(O.defined(n.bitdepth))if(O.integer(n.bitdepth)&&O.inArray(n.bitdepth,[8,10,12]))this.options.heifBitdepth=n.bitdepth;else throw O.invalidParameterError("bitdepth","8, 10 or 12",n.bitdepth);if(O.defined(n.tune))if(O.string(n.tune)&&O.inArray(n.tune,["auto","iq","psnr","ssim"]))this.options.heifLossless&&n.tune==="iq"?this.options.heifTune="ssim":this.options.heifTune=n.tune;else throw O.invalidParameterError("tune","one of: auto, iq, psnr, ssim",n.tune)}else throw O.invalidParameterError("options","Object",n);return this._updateFormatOut("heif",n)}function J4e(n){if(O.object(n)){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.jxlDistance=n.quality>=30?.1+(100-n.quality)*.09:53/3e3*n.quality*n.quality-23/20*n.quality+25;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);else if(O.defined(n.distance))if(O.number(n.distance)&&O.inRange(n.distance,0,15))this.options.jxlDistance=n.distance;else throw O.invalidParameterError("distance","number between 0.0 and 15.0",n.distance);if(O.defined(n.decodingTier))if(O.integer(n.decodingTier)&&O.inRange(n.decodingTier,0,4))this.options.jxlDecodingTier=n.decodingTier;else throw O.invalidParameterError("decodingTier","integer between 0 and 4",n.decodingTier);if(O.defined(n.lossless))if(O.bool(n.lossless))this.options.jxlLossless=n.lossless;else throw O.invalidParameterError("lossless","boolean",n.lossless);if(O.defined(n.effort))if(O.integer(n.effort)&&O.inRange(n.effort,1,9))this.options.jxlEffort=n.effort;else throw O.invalidParameterError("effort","integer between 1 and 9",n.effort)}return L2(n,this.options),this._updateFormatOut("jxl",n)}function q4e(n){if(O.object(n)&&O.defined(n.depth))if(O.string(n.depth)&&O.inArray(n.depth,["char","uchar","short","ushort","int","uint","float","complex","double","dpcomplex"]))this.options.rawDepth=n.depth;else throw O.invalidParameterError("depth","one of: char, uchar, short, ushort, int, uint, float, complex, double, dpcomplex",n.depth);return this._updateFormatOut("raw")}function z4e(n){if(O.object(n)){if(O.defined(n.size))if(O.integer(n.size)&&O.inRange(n.size,1,8192))this.options.tileSize=n.size;else throw O.invalidParameterError("size","integer between 1 and 8192",n.size);if(O.defined(n.overlap))if(O.integer(n.overlap)&&O.inRange(n.overlap,0,8192)){if(n.overlap>this.options.tileSize)throw O.invalidParameterError("overlap",`<= size (${this.options.tileSize})`,n.overlap);this.options.tileOverlap=n.overlap}else throw O.invalidParameterError("overlap","integer between 0 and 8192",n.overlap);if(O.defined(n.container))if(O.string(n.container)&&O.inArray(n.container,["fs","zip"]))this.options.tileContainer=n.container;else throw O.invalidParameterError("container","one of: fs, zip",n.container);if(O.defined(n.layout))if(O.string(n.layout)&&O.inArray(n.layout,["dz","google","iiif","iiif3","zoomify"]))this.options.tileLayout=n.layout;else throw O.invalidParameterError("layout","one of: dz, google, iiif, iiif3, zoomify",n.layout);if(O.defined(n.angle))if(O.integer(n.angle)&&!(n.angle%90))this.options.tileAngle=n.angle;else throw O.invalidParameterError("angle","positive/negative multiple of 90",n.angle);if(this._setBackgroundColourOption("tileBackground",n.background),O.defined(n.depth))if(O.string(n.depth)&&O.inArray(n.depth,["onepixel","onetile","one"]))this.options.tileDepth=n.depth;else throw O.invalidParameterError("depth","one of: onepixel, onetile, one",n.depth);if(O.defined(n.skipBlanks))if(O.integer(n.skipBlanks)&&O.inRange(n.skipBlanks,-1,65535))this.options.tileSkipBlanks=n.skipBlanks;else throw O.invalidParameterError("skipBlanks","integer between -1 and 255/65535",n.skipBlanks);else O.defined(n.layout)&&n.layout==="google"&&(this.options.tileSkipBlanks=5);let t=O.bool(n.center)?n.center:n.centre;if(O.defined(t)&&this._setBooleanOption("tileCentre",t),O.defined(n.id))if(O.string(n.id))this.options.tileId=n.id;else throw O.invalidParameterError("id","string",n.id);if(O.defined(n.basename))if(O.string(n.basename))this.options.tileBasename=n.basename;else throw O.invalidParameterError("basename","string",n.basename)}if(O.inArray(this.options.formatOut,["jpeg","png","webp"]))this.options.tileFormat=this.options.formatOut;else if(this.options.formatOut!=="input")throw O.invalidParameterError("format","one of: jpeg, png, webp",this.options.formatOut);return this._updateFormatOut("dz")}function V4e(n){if(!O.plainObject(n))throw O.invalidParameterError("options","object",n);if(O.integer(n.seconds)&&O.inRange(n.seconds,0,3600))this.options.timeoutSeconds=n.seconds;else throw O.invalidParameterError("seconds","integer between 0 and 3600",n.seconds);return this}function W4e(n,t){return O.object(t)&&t.force===!1||(this.options.formatOut=n),this}function Z4e(n,t){if(O.bool(t))this.options[n]=t;else throw O.invalidParameterError(n,"boolean",t)}function X4e(){if(!this.options.streamOut){this.options.streamOut=!0;let n=Error();this._pipeline(void 0,n)}}function $4e(n,t){return typeof n=="function"?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),Ot.pipeline(this.options,(o,a,e)=>{o?n(O.nativeError(o,t)):n(null,a,e)})}):Ot.pipeline(this.options,(o,a,e)=>{o?n(O.nativeError(o,t)):n(null,a,e)}),this):this.options.streamOut?(this._isStreamInput()?(this.once("finish",()=>{this._flattenBufferIn(),Ot.pipeline(this.options,(o,a,e)=>{o?this.emit("error",O.nativeError(o,t)):(this.emit("info",e),this.push(a)),this.push(null),this.on("end",()=>this.emit("close"))})}),this.streamInFinished&&this.emit("finish")):Ot.pipeline(this.options,(o,a,e)=>{o?this.emit("error",O.nativeError(o,t)):(this.emit("info",e),this.push(a)),this.push(null),this.on("end",()=>this.emit("close"))}),this):this._isStreamInput()?new Promise((o,a)=>{this.once("finish",()=>{this._flattenBufferIn(),Ot.pipeline(this.options,(e,i,A)=>{e?a(O.nativeError(e,t)):this.options.resolveWithObject?o({data:i,info:A}):o(i)})})}):new Promise((o,a)=>{Ot.pipeline(this.options,(e,i,A)=>{e?a(O.nativeError(e,t)):this.options.resolveWithObject?o({data:i,info:A}):o(i)})})}var Yre,Q4e,jre,Jre,qre,zre=ue(()=>{Ys();hf();Yre=new Map([["heic","heif"],["heif","heif"],["avif","avif"],["jpeg","jpeg"],["jpg","jpeg"],["jpe","jpeg"],["tile","tile"],["dz","tile"],["png","png"],["raw","raw"],["tiff","tiff"],["tif","tiff"],["webp","webp"],["gif","gif"],["jp2","jp2"],["jpx","jp2"],["j2k","jp2"],["j2c","jp2"],["jxl","jxl"]]),Q4e=/\.(jp[2x]|j2[kc])$/i,jre=()=>new Error("JP2 output requires libvips with support for OpenJPEG"),Jre=n=>1<<31-Math.clz32(Math.ceil(Math.log2(n)));qre=n=>{Object.assign(n.prototype,{toFile:y4e,toBuffer:m4e,toUint8Array:S4e,withDensity:w4e,keepExif:D4e,withExif:O4e,withExifMerge:b4e,keepIccProfile:M4e,withIccProfile:_4e,keepGainMap:T4e,withGainMap:N4e,keepXmp:R4e,withXmp:k4e,keepMetadata:v4e,withMetadata:P4e,toFormat:G4e,jpeg:F4e,jp2:K4e,png:L4e,webp:U4e,tiff:x4e,avif:Y4e,heif:j4e,jxl:J4e,gif:H4e,raw:q4e,tile:z4e,timeout:V4e,_updateFormatOut:W4e,_setBooleanOption:Z4e,_read:X4e,_pipeline:$4e})}});import e8e from"node:events";import{createRequire as A8e}from"node:module";import{availableParallelism as t8e}from"node:os";function Wre(n){if(O.bool(n))return n?Ot.cache(50,20,100):Ot.cache(0,0,0);if(O.object(n)){for(let t of["memory","files","items"]){let o=n[t];if(O.defined(o)&&!(O.integer(o)&&o>=0))throw O.invalidParameterError(t,"a positive integer",o)}return Ot.cache(n.memory,n.files,n.items)}else return Ot.cache()}function i8e(n){return Ot.concurrency(O.integer(n)?n:null)}function o8e(){return Ot.counters()}function n8e(n){return Ot.simd(O.bool(n)?n:null)}function s8e(n){if(O.object(n))if(Array.isArray(n.operation)&&n.operation.every(O.string))Ot.block(n.operation,!0);else throw O.invalidParameterError("operation","Array",n.operation);else throw O.invalidParameterError("options","object",n)}function g8e(n){if(O.object(n))if(Array.isArray(n.operation)&&n.operation.every(O.string))Ot.block(n.operation,!1);else throw O.invalidParameterError("operation","Array",n.operation);else throw O.invalidParameterError("options","object",n)}var Ef,U2,Vre,H2,mI,r8e,tE,a8e,Zre,Xre=ue(()=>{Ef=ze(IO(),1);Ys();b2();hf();wO();U2=A8e(import.meta.url),Vre=DO.runtimePlatformArch(),H2=Ot.libvipsVersion(),mI=Ot.format();mI.heif.output.alias=["avif","heic"];mI.jpeg.output.alias=["jpe","jpg"];mI.tiff.output.alias=["tif"];mI.jp2.output.alias=["j2c","j2k","jp2","jpx"];r8e={nearest:"nearest",bilinear:"bilinear",bicubic:"bicubic",locallyBoundedBicubic:"lbb",nohalo:"nohalo",vertexSplitQuadraticBasisSpline:"vsqbs"},tE={vips:H2.semver};if(!H2.isGlobal)if(H2.isWasm)try{tE=U2("@img/sharp-wasm32/versions")}catch{}else try{tE=U2(`@img/sharp-${Vre}/versions`)}catch{try{tE=U2(`@img/sharp-libvips-${Vre}/versions`)}catch{}}tE.sharp=ac.version;tE.heif&&mI.heif&&(mI.heif.input.fileSuffix=[".avif"],mI.heif.output.alias=["avif"]);Wre(!0);!process.env.MALLOC_ARENA_MAX&&Ef.default.familySync()===Ef.default.GLIBC&&!Ot._isUsingJemalloc()?Ot.concurrency(1):Ef.default.familySync()===Ef.default.MUSL&&Ot.concurrency()===1024&&Ot.concurrency(t8e());a8e=new e8e.EventEmitter;Zre=n=>{n.cache=Wre,n.concurrency=i8e,n.counters=o8e,n.simd=n8e,n.format=mI,n.interpolators=r8e,n.versions=tE,n.queue=a8e,n.block=s8e,n.unblock=g8e}});var $re={};Ur($re,{default:()=>c8e});var c8e,eie=ue(()=>{pre();ure();mre();wre();bre();Hre();xre();zre();Xre();Ere(Vs);yre(Vs);Sre(Vs);Ore(Vs);Ure(Vs);Kre(Vs);qre(Vs);Zre(Vs);c8e=Vs});var I8e,kA,SI,uf=ue(()=>{I8e="End-Of-Stream",kA=class extends Error{constructor(){super(I8e),this.name="EndOfStreamError"}},SI=class extends Error{constructor(t="The operation was aborted"){super(t),this.name="AbortError"}}});var _O,Aie=ue(()=>{_O=class{constructor(){this.resolve=()=>null,this.reject=()=>null,this.promise=new Promise((t,o)=>{this.reject=o,this.resolve=t})}}});var wI,TO=ue(()=>{uf();wI=class{constructor(){this.endOfStream=!1,this.interrupted=!1,this.peekQueue=[]}async peek(t,o=!1){let a=await this.read(t,o);return this.peekQueue.push(t.subarray(0,a)),a}async read(t,o=!1){if(t.length===0)return 0;let a=this.readFromPeekBuffer(t);if(this.endOfStream||(a+=await this.readRemainderFromStream(t.subarray(a),o)),a===0&&!o)throw new kA;return a}readFromPeekBuffer(t){let o=t.length,a=0;for(;this.peekQueue.length>0&&o>0;){let e=this.peekQueue.pop();if(!e)throw new Error("peekData should be defined");let i=Math.min(e.length,o);t.set(e.subarray(0,i),a),a+=i,o-=i,i{uf();Aie();TO();Cf=class extends wI{constructor(t){if(super(),this.s=t,this.deferred=null,!t.read||!t.once)throw new Error("Expected an instance of stream.Readable");this.s.once("end",()=>{this.endOfStream=!0,this.deferred&&this.deferred.resolve(0)}),this.s.once("error",o=>this.reject(o)),this.s.once("close",()=>this.abort())}async readFromStream(t,o){if(t.length===0)return 0;let a=this.s.read(t.length);if(a)return t.set(a),a.length;let e={buffer:t,mayBeLess:o,deferred:new _O};return this.deferred=e.deferred,this.s.once("readable",()=>{this.readDeferred(e)}),e.deferred.promise}readDeferred(t){let o=this.s.read(t.buffer.length);o?(t.buffer.set(o),t.deferred.resolve(o.length),this.deferred=null):this.s.once("readable",()=>{this.readDeferred(t)})}reject(t){this.interrupted=!0,this.deferred&&(this.deferred.reject(t),this.deferred=null)}async abort(){this.reject(new SI)}async close(){return this.abort()}}});var NO,rie=ue(()=>{TO();NO=class extends wI{constructor(t){super(),this.reader=t}async abort(){return this.close()}async close(){this.reader.releaseLock()}}});var Bf,K2=ue(()=>{rie();Bf=class extends NO{async readFromStream(t,o){if(t.length===0)return 0;let a=await this.reader.read(new Uint8Array(t.length),{min:o?void 0:t.length});return a.done&&(this.endOfStream=a.done),a.value?(t.set(a.value),a.value.length):0}}});var rE,x2=ue(()=>{uf();TO();rE=class extends wI{constructor(t){super(),this.reader=t,this.buffer=null}writeChunk(t,o){let a=Math.min(o.length,t.length);return t.set(o.subarray(0,a)),a{K2();x2()});var DI=ue(()=>{uf();tie();K2();x2();iie()});var es,iE=ue(()=>{DI();es=class{constructor(t){this.numBuffer=new Uint8Array(8),this.position=0,this.onClose=t?.onClose,t?.abortSignal&&t.abortSignal.addEventListener("abort",()=>{this.abort()})}async readToken(t,o=this.position){let a=new Uint8Array(t.len);if(await this.readBuffer(a,{position:o})o)return this.position+=o,o}return this.position+=t,t}async close(){await this.abort(),await this.onClose?.()}normalizeOptions(t,o){if(!this.supportsRandomAccess()&&o&&o.position!==void 0&&o.position{iE();DI();l8e=256e3,ff=class extends es{constructor(t,o){super(o),this.streamReader=t,this.fileInfo=o?.fileInfo??{}}async readBuffer(t,o){let a=this.normalizeOptions(t,o),e=a.position-this.position;if(e>0)return await this.ignore(e),this.readBuffer(t,o);if(e<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(a.length===0)return 0;let i=await this.streamReader.read(t.subarray(0,a.length),a.mayBeLess);if(this.position+=i,(!o||!o.mayBeLess)&&i0){let A=new Uint8Array(a.length+i);return e=await this.peekBuffer(A,{mayBeLess:a.mayBeLess}),t.set(A.subarray(i)),e-i}if(i<0)throw new Error("Cannot peek from a negative offset in a stream")}if(a.length>0){try{e=await this.streamReader.peek(t.subarray(0,a.length),a.mayBeLess)}catch(i){if(o?.mayBeLess&&i instanceof kA)return 0;throw i}if(!a.mayBeLess&&e{DI();iE();RO=class extends es{constructor(t,o){super(o),this.uint8Array=t,this.fileInfo={...o?.fileInfo??{},size:t.length}}async readBuffer(t,o){o?.position&&(this.position=o.position);let a=await this.peekBuffer(t,o);return this.position+=a,a}async peekBuffer(t,o){let a=this.normalizeOptions(t,o),e=Math.min(this.uint8Array.length-a.position,a.length);if(!a.mayBeLess&&e{DI();iE();kO=class extends es{constructor(t,o){super(o),this.blob=t,this.fileInfo={...o?.fileInfo??{},size:t.size,mimeType:t.type}}async readBuffer(t,o){o?.position&&(this.position=o.position);let a=await this.peekBuffer(t,o);return this.position+=a,a}async peekBuffer(t,o){let a=this.normalizeOptions(t,o),e=Math.min(this.blob.size-a.position,a.length);if(!a.mayBeLess&&e{if(await o.close(),e)return e()},new ff(o,a)}function vO(n,t){let o=Y2(n),a=t??{},e=a.onClose;return a.onClose=async()=>{if(await o.close(),e)return e()},new ff(o,a)}function So(n,t){return new RO(n,t)}function PO(n,t){return new kO(n,t)}var GO=ue(()=>{DI();aie();oie();nie();DI();iE()});import{open as p8e}from"node:fs/promises";var aE,j2=ue(()=>{iE();DI();aE=class n extends es{static async fromFile(t){let o=await p8e(t,"r"),a=await o.stat();return new n(o,{fileInfo:{path:t,size:a.size}})}constructor(t,o){super(o),this.fileHandle=t,this.fileInfo=o.fileInfo}async readBuffer(t,o){let a=this.normalizeOptions(t,o);if(this.position=a.position,a.length===0)return 0;let e=await this.fileHandle.read(t,0,a.length,a.position);if(this.position+=e.bytesRead,e.bytesRead{GO();j2();j2();GO();gie=aE.fromFile});var cie=ee(q2=>{q2.read=function(n,t,o,a,e){var i,A,r=e*8-a-1,s=(1<>1,c=-7,I=o?e-1:0,d=o?-1:1,B=n[t+I];for(I+=d,i=B&(1<<-c)-1,B>>=-c,c+=r;c>0;i=i*256+n[t+I],I+=d,c-=8);for(A=i&(1<<-c)-1,i>>=-c,c+=a;c>0;A=A*256+n[t+I],I+=d,c-=8);if(i===0)i=1-g;else{if(i===s)return A?NaN:(B?-1:1)*(1/0);A=A+Math.pow(2,a),i=i-g}return(B?-1:1)*A*Math.pow(2,i-a)};q2.write=function(n,t,o,a,e,i){var A,r,s,g=i*8-e-1,c=(1<>1,d=e===23?Math.pow(2,-24)-Math.pow(2,-77):0,B=a?0:i-1,f=a?1:-1,Q=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(r=isNaN(t)?1:0,A=c):(A=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-A))<1&&(A--,s*=2),A+I>=1?t+=d/s:t+=d*Math.pow(2,1-I),t*s>=2&&(A++,s/=2),A+I>=c?(r=0,A=c):A+I>=1?(r=(t*s-1)*Math.pow(2,e),A=A+I):(r=t*Math.pow(2,I-1)*Math.pow(2,e),A=0));e>=8;n[o+B]=r&255,B+=f,r/=256,e-=8);for(A=A<0;n[o+B]=A&255,B+=f,A/=256,g-=8);n[o+B-f]|=Q*128}});function E8e(){if(!(typeof globalThis.TextDecoder>"u"))return FO??(FO=new globalThis.TextDecoder("utf-8"))}function u8e(){if(!(typeof globalThis.TextEncoder>"u"))return LO??(LO=new globalThis.TextEncoder)}function Tr(n,t="utf-8"){switch(t.toLowerCase()){case"utf-8":case"utf8":{let o=E8e();return o?o.decode(n):B8e(n)}case"utf-16le":return f8e(n);case"us-ascii":case"ascii":return Q8e(n);case"latin1":case"iso-8859-1":return y8e(n);case"windows-1252":return m8e(n);default:throw new RangeError(`Encoding '${t}' not supported`)}}function lie(n="",t="utf-8"){switch(t.toLowerCase()){case"utf-8":case"utf8":{let o=u8e();return o?o.encode(n):S8e(n)}case"utf-16le":return w8e(n);case"us-ascii":case"ascii":return D8e(n);case"latin1":case"iso-8859-1":return O8e(n);case"windows-1252":return b8e(n);default:throw new RangeError(`Encoding '${t}' not supported`)}}function V2(n,t){t.length!==0&&(n.push(String.fromCharCode.apply(null,t)),t.length=0)}function Gr(n,t,o){t.push(o),t.length>=oE&&V2(n,t)}function C8e(n,t,o){if(o<=65535){Gr(n,t,o);return}o-=65536,Gr(n,t,55296+(o>>10)),Gr(n,t,56320+(o&1023))}function B8e(n){let t=[],o=[],a=0;for(n.length>=3&&n[0]===239&&n[1]===187&&n[2]===191&&(a=3);a244){Gr(t,o,Ui),a++;continue}if(e<=223){if(a+1>=n.length){Gr(t,o,Ui),a++;continue}let c=n[a+1];if((c&192)!==128){Gr(t,o,Ui),a++;continue}let I=(e&31)<<6|c&63;Gr(t,o,I),a+=2;continue}if(e<=239){if(a+2>=n.length){Gr(t,o,Ui),a++;continue}let c=n[a+1],I=n[a+2];if(!((c&192)===128&&(I&192)===128&&!(e===224&&c<160)&&!(e===237&&c>=160))){Gr(t,o,Ui),a++;continue}let B=(e&15)<<12|(c&63)<<6|I&63;Gr(t,o,B),a+=3;continue}if(a+3>=n.length){Gr(t,o,Ui),a++;continue}let i=n[a+1],A=n[a+2],r=n[a+3];if(!((i&192)===128&&(A&192)===128&&(r&192)===128&&!(e===240&&i<144)&&!(e===244&&i>143))){Gr(t,o,Ui),a++;continue}let g=(e&7)<<18|(i&63)<<12|(A&63)<<6|r&63;C8e(t,o,g),a+=4}return V2(t,o),t.join("")}function f8e(n){let t=[],o=[],a=n.length,e=0;for(;e+1=55296&&i<=56319){if(e+1=56320&&A<=57343?(Gr(t,o,i),Gr(t,o,A),e+=2):Gr(t,o,Ui)}else Gr(t,o,Ui);continue}if(i>=56320&&i<=57343){Gr(t,o,Ui);continue}Gr(t,o,i)}return e=128&&e<=159?Iie[e]:void 0;o+=i??String.fromCharCode(e),o.length>=oE&&(t.push(o),o="")}return o&&t.push(o),t.join("")}function S8e(n){let t=[];for(let o=0;o=55296&&a<=56319)if(o+1=56320&&e<=57343?(a=65536+(a-55296<<10)+(e-56320),o++):a=Ui}else a=Ui;else a>=56320&&a<=57343&&(a=Ui);a<128?t.push(a):a<2048?t.push(192|a>>6,128|a&63):a<65536?t.push(224|a>>12,128|a>>6&63,128|a&63):t.push(240|a>>18,128|a>>12&63,128|a>>6&63,128|a&63)}return new Uint8Array(t)}function w8e(n){let t=[];for(let a=0;a=55296&&e<=56319){if(a+1=56320&&i<=57343?(t.push(e,i),a++):t.push(Ui)}else t.push(Ui);continue}if(e>=56320&&e<=57343){t.push(Ui);continue}t.push(e)}let o=new Uint8Array(t.length*2);for(let a=0;a>>8}return o}function D8e(n){let t=new Uint8Array(n.length);for(let o=0;o=0&&e<=127||e>=160&&e<=255){t[o]=e;continue}t[o]=63}return t}var Iie,z2,FO,LO,oE,Ui,Zs=ue(()=>{Iie={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"},z2={};for(let[n,t]of Object.entries(Iie))z2[t]=Number.parseInt(n,10);oE=32*1024,Ui=65533});var VA={};Ur(VA,{AnsiStringType:()=>Z2,Float16_BE:()=>T8e,Float16_LE:()=>N8e,Float32_BE:()=>$2,Float32_LE:()=>R8e,Float64_BE:()=>HO,Float64_LE:()=>k8e,Float80_BE:()=>v8e,Float80_LE:()=>P8e,INT16_BE:()=>gn,INT16_LE:()=>M8e,INT24_BE:()=>UO,INT24_LE:()=>_8e,INT32_BE:()=>Sa,INT32_LE:()=>Cr,INT64_BE:()=>X2,INT64_LE:()=>mf,INT8:()=>$s,IgnoreType:()=>W2,StringType:()=>We,UINT16_BE:()=>LA,UINT16_LE:()=>SA,UINT24_BE:()=>Fr,UINT24_LE:()=>yf,UINT32_BE:()=>xe,UINT32_LE:()=>Le,UINT64_BE:()=>eg,UINT64_LE:()=>Lr,UINT8:()=>QA,Uint8ArrayType:()=>Mt});function zA(n){return new DataView(n.buffer,n.byteOffset)}var Xs,QA,SA,LA,yf,Fr,Le,xe,$s,gn,M8e,_8e,UO,Sa,Cr,Lr,mf,eg,X2,T8e,N8e,$2,R8e,HO,k8e,v8e,P8e,W2,Mt,We,Z2,DA=ue(()=>{Xs=ze(cie(),1);Zs();QA={len:1,get(n,t){return zA(n).getUint8(t)},put(n,t,o){return zA(n).setUint8(t,o),t+1}},SA={len:2,get(n,t){return zA(n).getUint16(t,!0)},put(n,t,o){return zA(n).setUint16(t,o,!0),t+2}},LA={len:2,get(n,t){return zA(n).getUint16(t)},put(n,t,o){return zA(n).setUint16(t,o),t+2}},yf={len:3,get(n,t){let o=zA(n);return o.getUint8(t)+(o.getUint16(t+1,!0)<<8)},put(n,t,o){let a=zA(n);return a.setUint8(t,o&255),a.setUint16(t+1,o>>8,!0),t+3}},Fr={len:3,get(n,t){let o=zA(n);return(o.getUint16(t)<<8)+o.getUint8(t+2)},put(n,t,o){let a=zA(n);return a.setUint16(t,o>>8),a.setUint8(t+2,o&255),t+3}},Le={len:4,get(n,t){return zA(n).getUint32(t,!0)},put(n,t,o){return zA(n).setUint32(t,o,!0),t+4}},xe={len:4,get(n,t){return zA(n).getUint32(t)},put(n,t,o){return zA(n).setUint32(t,o),t+4}},$s={len:1,get(n,t){return zA(n).getInt8(t)},put(n,t,o){return zA(n).setInt8(t,o),t+1}},gn={len:2,get(n,t){return zA(n).getInt16(t)},put(n,t,o){return zA(n).setInt16(t,o),t+2}},M8e={len:2,get(n,t){return zA(n).getInt16(t,!0)},put(n,t,o){return zA(n).setInt16(t,o,!0),t+2}},_8e={len:3,get(n,t){let o=yf.get(n,t);return o>8388607?o-16777216:o},put(n,t,o){let a=zA(n);return a.setUint8(t,o&255),a.setUint16(t+1,o>>8,!0),t+3}},UO={len:3,get(n,t){let o=Fr.get(n,t);return o>8388607?o-16777216:o},put(n,t,o){let a=zA(n);return a.setUint16(t,o>>8),a.setUint8(t+2,o&255),t+3}},Sa={len:4,get(n,t){return zA(n).getInt32(t)},put(n,t,o){return zA(n).setInt32(t,o),t+4}},Cr={len:4,get(n,t){return zA(n).getInt32(t,!0)},put(n,t,o){return zA(n).setInt32(t,o,!0),t+4}},Lr={len:8,get(n,t){return zA(n).getBigUint64(t,!0)},put(n,t,o){return zA(n).setBigUint64(t,o,!0),t+8}},mf={len:8,get(n,t){return zA(n).getBigInt64(t,!0)},put(n,t,o){return zA(n).setBigInt64(t,o,!0),t+8}},eg={len:8,get(n,t){return zA(n).getBigUint64(t)},put(n,t,o){return zA(n).setBigUint64(t,o),t+8}},X2={len:8,get(n,t){return zA(n).getBigInt64(t)},put(n,t,o){return zA(n).setBigInt64(t,o),t+8}},T8e={len:2,get(n,t){return Xs.read(n,t,!1,10,this.len)},put(n,t,o){return Xs.write(n,o,t,!1,10,this.len),t+this.len}},N8e={len:2,get(n,t){return Xs.read(n,t,!0,10,this.len)},put(n,t,o){return Xs.write(n,o,t,!0,10,this.len),t+this.len}},$2={len:4,get(n,t){return zA(n).getFloat32(t)},put(n,t,o){return zA(n).setFloat32(t,o),t+4}},R8e={len:4,get(n,t){return zA(n).getFloat32(t,!0)},put(n,t,o){return zA(n).setFloat32(t,o,!0),t+4}},HO={len:8,get(n,t){return zA(n).getFloat64(t)},put(n,t,o){return zA(n).setFloat64(t,o),t+8}},k8e={len:8,get(n,t){return zA(n).getFloat64(t,!0)},put(n,t,o){return zA(n).setFloat64(t,o,!0),t+8}},v8e={len:10,get(n,t){return Xs.read(n,t,!1,63,this.len)},put(n,t,o){return Xs.write(n,o,t,!1,63,this.len),t+this.len}},P8e={len:10,get(n,t){return Xs.read(n,t,!0,63,this.len)},put(n,t,o){return Xs.write(n,o,t,!0,63,this.len),t+this.len}},W2=class{constructor(t){this.len=t}get(t,o){}},Mt=class{constructor(t){this.len=t}get(t,o){return t.subarray(o,o+this.len)}},We=class{constructor(t,o){this.len=t,this.encoding=o}get(t,o=0){let a=t.subarray(o,o+this.len);return Tr(a,this.encoding)}},Z2=class extends We{constructor(t){super(t,"windows-1252")}}});var sd,eU,die,pie,hie,Eie=ue(()=>{DA();sd={LocalFileHeader:67324752,DataDescriptor:134695760,CentralFileHeader:33639248,EndOfCentralDirectory:101010256},eU={get(n){return{signature:Le.get(n,0),compressedSize:Le.get(n,8),uncompressedSize:Le.get(n,12)}},len:16},die={get(n){let t=SA.get(n,6);return{signature:Le.get(n,0),minVersion:SA.get(n,4),dataDescriptor:!!(t&8),compressedMethod:SA.get(n,8),compressedSize:Le.get(n,18),uncompressedSize:Le.get(n,22),filenameLength:SA.get(n,26),extraFieldLength:SA.get(n,28),filename:null}},len:30},pie={get(n){return{signature:Le.get(n,0),nrOfThisDisk:SA.get(n,4),nrOfThisDiskWithTheStart:SA.get(n,6),nrOfEntriesOnThisDisk:SA.get(n,8),nrOfEntriesOfSize:SA.get(n,10),sizeOfCd:Le.get(n,12),offsetOfStartOfCd:Le.get(n,16),zipFileCommentLength:SA.get(n,20)}},len:22},hie={get(n){let t=SA.get(n,8);return{signature:Le.get(n,0),minVersion:SA.get(n,6),dataDescriptor:!!(t&8),compressedMethod:SA.get(n,10),compressedSize:Le.get(n,20),uncompressedSize:Le.get(n,24),filenameLength:SA.get(n,28),extraFieldLength:SA.get(n,30),fileCommentLength:SA.get(n,32),relativeOffsetOfLocalHeader:Le.get(n,42),filename:null}},len:46}});function Cie(n){let t=new Uint8Array(Le.len);return Le.put(t,0,n),t}function F8e(n,t){let o=n.length,a=t.length;if(a>o)return-1;for(let e=0;e<=o-a;e++){let i=!0;for(let A=0;Ae+i.length,0),o=new Uint8Array(t),a=0;for(let e of n)o.set(e,a),a+=e.length;return o}var uie,Ag,AU,G8e,KO,gd,Bie=ue(()=>{DA();uie=ze(lt(),1);Eie();Ag=(0,uie.default)("tokenizer:inflate"),AU=256*1024,G8e=Cie(sd.DataDescriptor),KO=Cie(sd.EndOfCentralDirectory),gd=class n{constructor(t){this.tokenizer=t,this.syncBuffer=new Uint8Array(AU)}async isZip(){return await this.peekSignature()===sd.LocalFileHeader}peekSignature(){return this.tokenizer.peekToken(Le)}async findEndOfCentralDirectoryLocator(){let t=this.tokenizer,o=Math.min(16*1024,t.fileInfo.size),a=this.syncBuffer.subarray(0,o);await this.tokenizer.readBuffer(a,{position:t.fileInfo.size-o});for(let e=a.length-4;e>=0;e--)if(a[e]===KO[0]&&a[e+1]===KO[1]&&a[e+2]===KO[2]&&a[e+3]===KO[3])return t.fileInfo.size-o+e;return-1}async readCentralDirectory(){if(!this.tokenizer.supportsRandomAccess()){Ag("Cannot reading central-directory without random-read support");return}Ag("Reading central-directory...");let t=this.tokenizer.position,o=await this.findEndOfCentralDirectoryLocator();if(o>0){Ag("Central-directory 32-bit signature found");let a=await this.tokenizer.readToken(pie,o),e=[];this.tokenizer.setPosition(a.offsetOfStartOfCd);for(let i=0;i=0?g:s;if(i.handler){let I=new Uint8Array(c);await this.tokenizer.readBuffer(I),r.push(I)}else await this.tokenizer.ignore(c)}Ag(`Found data-descriptor-signature at pos=${this.tokenizer.position}`),i.handler&&await this.inflate(e,L8e(r),i.handler)}else i.handler?(Ag(`Reading compressed-file-data: ${e.compressedSize} bytes`),A=new Uint8Array(e.compressedSize),await this.tokenizer.readBuffer(A),await this.inflate(e,A,i.handler)):(Ag(`Ignoring compressed-file-data: ${e.compressedSize} bytes`),await this.tokenizer.ignore(e.compressedSize));if(Ag(`Reading data-descriptor at pos=${this.tokenizer.position}`),e.dataDescriptor&&(await this.tokenizer.readToken(eU)).signature!==134695760)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-eU.len}`)}while(!a)}async iterateOverCentralDirectory(t,o){for(let a of t){let e=o(a);if(e.handler){this.tokenizer.setPosition(a.relativeOffsetOfLocalHeader);let i=await this.readLocalFileHeader();if(i){await this.tokenizer.ignore(i.extraFieldLength);let A=new Uint8Array(a.compressedSize);await this.tokenizer.readBuffer(A),await this.inflate(i,A,e.handler)}}if(e.stop)break}}async inflate(t,o,a){if(t.compressedMethod===0)return a(o);if(t.compressedMethod!==8)throw new Error(`Unsupported ZIP compression method: ${t.compressedMethod}`);Ag(`Decompress filename=${t.filename}, compressed-size=${o.length}`);let e=await n.decompressDeflateRaw(o);return a(e)}static async decompressDeflateRaw(t){let o=new ReadableStream({start(i){i.enqueue(t),i.close()}}),a=new DecompressionStream("deflate-raw"),e=o.pipeThrough(a);try{let A=await new Response(e).arrayBuffer();return new Uint8Array(A)}catch(i){let A=i instanceof Error?`Failed to deflate ZIP entry: ${i.message}`:"Unknown decompression error in ZIP entry";throw new TypeError(A)}}async readLocalFileHeader(){let t=await this.tokenizer.peekToken(Le);if(t===sd.LocalFileHeader){let o=await this.tokenizer.readToken(die);return o.filename=await this.tokenizer.readToken(new We(o.filenameLength,"utf-8")),o}if(t===sd.CentralFileHeader)return!1;throw t===3759263696?new Error("Encrypted ZIP"):new Error("Unexpected signature")}}});var Sf,fie=ue(()=>{Sf=class{constructor(t){this.tokenizer=t}inflate(){let t=this.tokenizer;return new ReadableStream({async pull(o){let a=new Uint8Array(1024),e=await t.readBuffer(a,{mayBeLess:!0});if(e===0){o.close();return}o.enqueue(a.subarray(0,e))}}).pipeThrough(new DecompressionStream("gzip"))}}});var Qie=ue(()=>{Bie();fie()});function K8e(n,t,o){return n?n.constructor===t?!0:U8e.call(n)===o:!1}function x8e(n){return K8e(n,Uint8Array,H8e)}function Y8e(n){if(!x8e(n))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof n}\``)}function xO(n){Y8e(n);let t="";for(let o=0;o{U8e=Object.prototype.toString,H8e="[object Uint8Array]";kMA={utf8:new globalThis.TextDecoder("utf8")},vMA=new globalThis.TextEncoder,j8e=Array.from({length:256},(n,t)=>t.toString(16).padStart(2,"0"))});function yie(n,t){if(t==="utf-16le"){let o=[];for(let a=0;a>8&255)}return o}if(t==="utf-16be"){let o=[];for(let a=0;a>8&255,e&255)}return o}return[...n].map(o=>o.charCodeAt(0))}function mie(n,t=0){let o=Number.parseInt(new We(6).get(n,148).replace(/\0.*$/,"").trim(),8);if(Number.isNaN(o))return!1;let a=256;for(let e=t;e{DA();Sie={get:(n,t)=>n[t+3]&127|n[t+2]<<7|n[t+1]<<14|n[t]<<21,len:4}});var Die,Oie,bie=ue(()=>{Die=["jpg","png","apng","gif","webp","flif","xcf","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","elf","macho","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ttc","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","j2c","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","skp","avif","eps","lzh","pgp","asar","stl","chm","3mf","zst","jxl","vcf","jls","pst","dwg","parquet","class","arj","cpio","ace","avro","icc","fbx","vsdx","vtt","apk","drc","lz4","potx","xltx","dotx","xltm","ott","ots","otp","odg","otg","xlsm","docm","dotm","potm","pptm","jar","jmp","rm","sav","ppsm","ppsx","tar.gz","reg","dat"],Oie=["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-xcf","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.ms-powerpoint.slideshow.macroenabled.12","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/vnd.apache.arrow.file","video/mp4","audio/midi","video/matroska","video/webm","video/quicktime","video/vnd.avi","audio/wav","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","video/ogg","audio/ogg","audio/ogg; codecs=opus","application/ogg","audio/flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-elf","application/x-mach-binary","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","font/collection","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-cfb","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/j2c","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","text/vcard","text/vtt","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar","model/stl","application/vnd.ms-htmlhelp","model/3mf","image/jxl","application/zstd","image/jls","application/vnd.ms-outlook","image/vnd.dwg","application/vnd.apache.parquet","application/java-vm","application/x-arj","application/x-cpio","application/x-ace-compressed","application/avro","application/vnd.iccprofile","application/x.autodesk.fbx","application/vnd.visio","application/vnd.android.package-archive","application/vnd.google.draco","application/x-lz4","application/vnd.openxmlformats-officedocument.presentationml.template","application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/vnd.ms-excel.template.macroenabled.12","application/vnd.oasis.opendocument.text-template","application/vnd.oasis.opendocument.spreadsheet-template","application/vnd.oasis.opendocument.presentation-template","application/vnd.oasis.opendocument.graphics","application/vnd.oasis.opendocument.graphics-template","application/vnd.ms-excel.sheet.macroenabled.12","application/vnd.ms-word.document.macroenabled.12","application/vnd.ms-word.template.macroenabled.12","application/vnd.ms-powerpoint.template.macroenabled.12","application/vnd.ms-powerpoint.presentation.macroenabled.12","application/java-archive","application/vnd.rn-realmedia","application/x-spss-sav","application/x-ms-regedit","application/x-ft-windows-registry-hive","application/x-jmp-data"]});function aze(n){let t=n?.streamReader;if(t?.constructor?.name!=="WebStreamByobReader")return n;let{reader:o}=t,a=async()=>{await o.cancel(),o.releaseLock()};return t.close=a,t.abort=async()=>{t.interrupted=!0,await a()},n}function aU(n,t,o){if(!Number.isFinite(n)||n<0||n>t)throw new sc(`${o} has invalid size ${n} (maximum ${t} bytes)`);return n}async function OI(n,t,{maximumLength:o=cn,reason:a="skip"}={}){let e=aU(t,o,a);await n.ignore(e)}async function rU(n,t,o,{maximumLength:a=t.length,reason:e="read"}={}){let i=o?.length??t.length,A=aU(i,a,e);return n.readBuffer(t,{...o,length:A})}async function oze(n,{maximumLength:t=rg}={}){let e=new ReadableStream({start(g){g.enqueue(n),g.close()}}).pipeThrough(new DecompressionStream("deflate-raw")).getReader(),i=[],A=0;try{for(;;){let{done:g,value:c}=await e.read();if(g)break;if(A+=c.length,A>t)throw await e.cancel(),new Error(`ZIP entry decompressed data exceeds ${t} bytes`);i.push(c)}}finally{e.releaseLock()}let r=new Uint8Array(A),s=0;for(let g of i)r.set(g,s),s+=g.length;return r}function sze(n,t){if(n.length=0?0:r===e?Math.min(nze,r-1):0,c=s>=0?s:r-g;if(c===0)break;if(A+=c,A>o)throw new Error(`ZIP entry compressed data exceeds ${o} bytes`);if(t){let I=new Uint8Array(c);await n.tokenizer.readBuffer(I),i.push(I)}else await n.tokenizer.ignore(c);if(s>=0)break}if(wa(n.tokenizer)||(n.knownSizeDescriptorScannedBytes+=A),!!t)return cze(i,A)}function lze(n,t){return wa(n.tokenizer)?Math.max(0,cn-(n.tokenizer.position-t)):Math.max(0,rg-n.knownSizeDescriptorScannedBytes)}async function dze(n,t,{shouldBuffer:o,maximumDescriptorLength:a=rg}={}){if(t.dataDescriptor&&t.compressedSize===0)return Ize(n,{shouldBuffer:o,maximumLength:a});if(!o){await OI(n.tokenizer,t.compressedSize,{maximumLength:wa(n.tokenizer)?rg:n.tokenizer.fileInfo.size,reason:"ZIP entry compressed data"});return}let e=Bze(n.tokenizer);if(!Number.isFinite(t.compressedSize)||t.compressedSize<0||t.compressedSize>e)throw new Error(`ZIP entry compressed data exceeds ${e} bytes`);let i=new Uint8Array(t.compressedSize);return await n.tokenizer.readBuffer(i),i}function pze(n,t){let o=n.getReader(),a=0,e=!1,i=!1,A=async r=>{e||i||(i=!0,await o.cancel(r))};return new ReadableStream({async pull(r){if(a>=t){r.close(),await A();return}let{done:s,value:g}=await o.read();if(s||!g){e=!0,r.close();return}let c=t-a;if(g.length>c){r.enqueue(g.subarray(0,c)),a+=c,r.close(),await A();return}r.enqueue(g),a+=g.length},async cancel(r){await A(r)}})}async function Mf(n,t){return new iU(t).fromBuffer(n)}function Fie(n){switch(n=n.toLowerCase(),n){case"application/epub+zip":return{ext:"epub",mime:n};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:n};case"application/vnd.oasis.opendocument.text-template":return{ext:"ott",mime:n};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:n};case"application/vnd.oasis.opendocument.spreadsheet-template":return{ext:"ots",mime:n};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:n};case"application/vnd.oasis.opendocument.presentation-template":return{ext:"otp",mime:n};case"application/vnd.oasis.opendocument.graphics":return{ext:"odg",mime:n};case"application/vnd.oasis.opendocument.graphics-template":return{ext:"otg",mime:n};case"application/vnd.openxmlformats-officedocument.presentationml.slideshow":return{ext:"ppsx",mime:n};case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return{ext:"xlsx",mime:n};case"application/vnd.ms-excel.sheet.macroenabled":return{ext:"xlsm",mime:"application/vnd.ms-excel.sheet.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.spreadsheetml.template":return{ext:"xltx",mime:n};case"application/vnd.ms-excel.template.macroenabled":return{ext:"xltm",mime:"application/vnd.ms-excel.template.macroenabled.12"};case"application/vnd.ms-powerpoint.slideshow.macroenabled":return{ext:"ppsm",mime:"application/vnd.ms-powerpoint.slideshow.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return{ext:"docx",mime:n};case"application/vnd.ms-word.document.macroenabled":return{ext:"docm",mime:"application/vnd.ms-word.document.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.template":return{ext:"dotx",mime:n};case"application/vnd.ms-word.template.macroenabledtemplate":return{ext:"dotm",mime:"application/vnd.ms-word.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.template":return{ext:"potx",mime:n};case"application/vnd.ms-powerpoint.template.macroenabled":return{ext:"potm",mime:"application/vnd.ms-powerpoint.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.presentation":return{ext:"pptx",mime:n};case"application/vnd.ms-powerpoint.presentation.macroenabled":return{ext:"pptm",mime:"application/vnd.ms-powerpoint.presentation.macroenabled.12"};case"application/vnd.ms-visio.drawing":return{ext:"vsdx",mime:"application/vnd.visio"};case"application/vnd.ms-package.3dmanufacturing-3dmodel+xml":return{ext:"3mf",mime:"model/3mf"};default:}}function tg(n,t,o){o={offset:0,...o};for(let[a,e]of t.entries())if(o.mask){if(e!==(o.mask[a]&n[a+o.offset]))return!1}else if(e!==n[a+o.offset])return!1;return!0}function hze(n){return Number.isFinite(n)?Math.max(1,Math.trunc(n)):Of}function Eze(n,t,o){return o===void 0?n.read(t):(o.throwIfAborted(),new Promise((a,e)=>{let i=()=>{o.removeEventListener("abort",A)},A=()=>{let r=o.reason;i(),(async()=>{try{await n.cancel(r)}catch{}})(),e(r)};o.addEventListener("abort",A,{once:!0}),(async()=>{try{let r=await n.read(t);i(),a(r)}catch(r){i(),e(r)}})()}))}function uze(n){return Number.isFinite(n)?Math.max(0,Math.min(J8e,Math.trunc(n))):0}function Cze(n){return Number.isFinite(n)?Math.max(0,n):Number.MAX_SAFE_INTEGER}function wa(n){let t=n.fileInfo.size;return!Number.isFinite(t)||t===Number.MAX_SAFE_INTEGER}function bf(n,t,o){return wa(n)&&n.position-t>o}function Bze(n){let t=n.fileInfo.size,o=Number.isFinite(t)?Math.max(0,t-n.position):Number.MAX_SAFE_INTEGER;return Math.min(o,q8e)}function fze(n){if(n instanceof kA||n instanceof sc)return!0;if(!(n instanceof Error))return!1;if(tze.has(n.message)||ize.has(n.code))return!0;for(let t of rze)if(n.message.startsWith(t))return!0;return!1}function Lie(n,t=rg){let o=[n.compressedSize,n.uncompressedSize];for(let a of o)if(!Number.isFinite(a)||a<0||a>t)return!1;return!0}function Qze(){return{hasContentTypesEntry:!1,hasParsedContentTypesEntry:!1,isParsingContentTypes:!1,hasUnparseableContentTypes:!1,hasWordDirectory:!1,hasPresentationDirectory:!1,hasSpreadsheetDirectory:!1,hasThreeDimensionalModelEntry:!1}}function yze(n,t){t.startsWith("word/")&&(n.hasWordDirectory=!0),t.startsWith("ppt/")&&(n.hasPresentationDirectory=!0),t.startsWith("xl/")&&(n.hasSpreadsheetDirectory=!0),t.startsWith("3D/")&&t.endsWith(".model")&&(n.hasThreeDimensionalModelEntry=!0)}function Uie(n){if(!(!n.hasContentTypesEntry||n.hasUnparseableContentTypes||n.isParsingContentTypes||n.hasParsedContentTypesEntry)){if(n.hasWordDirectory)return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};if(n.hasPresentationDirectory)return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};if(n.hasSpreadsheetDirectory)return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};if(n.hasThreeDimensionalModelEntry)return{ext:"3mf",mime:"model/3mf"}}}function mze(n){let t=n.indexOf('.main+xml"');if(t===-1){let e="application/vnd.ms-package.3dmanufacturing-3dmodel+xml";return n.includes(`ContentType="${e}"`)?e:void 0}let o=n.slice(0,t),a=o.lastIndexOf('"');return o.slice(a+1)}var Of,J8e,rg,Mie,q8e,cn,jO,_ie,z8e,V8e,Tie,tU,Nie,Rie,W8e,Z8e,X8e,$8e,eze,kie,vie,Pie,Aze,Gie,tze,rze,ize,sc,Hie,YO,nze,iU,Sze,wze,Kie=ue(()=>{DA();GO();Qie();Df();wie();bie();Of=4100,J8e=Of-2,rg=1024*1024,Mie=1024,q8e=2**31-1,cn=16*1024*1024,jO=rg,_ie=rg,z8e=cn,V8e=1,Tie=100,tU=cn,Nie=64,Rie=jO,W8e=256,Z8e=512,X8e=cn,$8e=512,eze=512,kie=256,vie=jO,Pie=jO,Aze=jO,Gie=cn,tze=new Set(["Unexpected signature","Encrypted ZIP","Expected Central-File-Header signature"]),rze=["ZIP entry count exceeds ","Unsupported ZIP compression method:","ZIP entry compressed data exceeds ","ZIP entry decompressed data exceeds ","Expected data-descriptor-signature at position "],ize=new Set(["Z_BUF_ERROR","Z_DATA_ERROR","ERR_INVALID_STATE"]),sc=class extends Error{};Hie=134695760,YO=16,nze=YO-1;gd.prototype.inflate=async function(n,t,o){if(n.compressedMethod===0)return o(t);if(n.compressedMethod!==8)throw new Error(`Unsupported ZIP compression method: ${n.compressedMethod}`);let a=await oze(t,{maximumLength:rg});return o(a)};gd.prototype.unzip=async function(n){let t=!1,o=0,a=this.tokenizer.position;this.knownSizeDescriptorScannedBytes=0;do{if(bf(this.tokenizer,a,cn))throw new sc(`ZIP stream probing exceeds ${cn} bytes`);let e=await this.readLocalFileHeader();if(!e)break;if(o++,o>Mie)throw new Error(`ZIP entry count exceeds ${Mie}`);let i=n(e);t=!!i.stop,await this.tokenizer.ignore(e.extraFieldLength);let A=await dze(this,e,{shouldBuffer:!!i.handler,maximumDescriptorLength:Math.min(rg,lze(this,a))});if(i.handler&&await this.inflate(e,A,i.handler),e.dataDescriptor){let r=new Uint8Array(YO);if(await this.tokenizer.readBuffer(r),Le.get(r,0)!==Hie)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-r.length}`)}if(bf(this.tokenizer,a,cn))throw new sc(`ZIP stream probing exceeds ${cn} bytes`)}while(!t)};iU=class n{constructor(t){let o=uze(t?.mpegOffsetTolerance);this.options={...t,mpegOffsetTolerance:o},this.detectors=[...this.options.customDetectors??[],{id:"core",detect:this.detectConfident},{id:"core.imprecise",detect:this.detectImprecise}],this.tokenizerOptions={abortSignal:this.options.signal},this.gzipProbeDepth=0}getTokenizerOptions(){return{...this.tokenizerOptions}}createTokenizerFromWebStream(t){return aze(vO(t,this.getTokenizerOptions()))}async parseTokenizer(t,o=0){this.detectionReentryCount=o;let a=t.position;for(let e of this.detectors){let i;try{i=await e.detect(t)}catch(A){if(A instanceof kA||A instanceof sc)return;throw A}if(i)return i;if(a!==t.position)return}}async fromTokenizer(t){try{return await this.parseTokenizer(t)}finally{await t.close()}}async fromBuffer(t){if(!(t instanceof Uint8Array||t instanceof ArrayBuffer))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof t}\``);let o=t instanceof Uint8Array?t:new Uint8Array(t);if(o?.length>1)return this.fromTokenizer(So(o,this.getTokenizerOptions()))}async fromBlob(t){this.options.signal?.throwIfAborted();let o=PO(t,this.getTokenizerOptions());return this.fromTokenizer(o)}async fromStream(t){this.options.signal?.throwIfAborted();let o=this.createTokenizerFromWebStream(t);return this.fromTokenizer(o)}async toDetectionStream(t,o){let a=hze(o?.sampleSize??Of),e,i,A=t.getReader({mode:"byob"});try{let{value:g,done:c}=await Eze(A,new Uint8Array(a),this.options.signal);if(i=g,!c&&g)try{e=await this.fromBuffer(g.subarray(0,a))}catch(I){if(!(I instanceof kA))throw I;e=void 0}i=g}finally{A.releaseLock()}let r=new TransformStream({async start(g){g.enqueue(i)},transform(g,c){c.enqueue(g)}}),s=t.pipeThrough(r);return s.fileType=e,s}async detectGzip(t){if(this.gzipProbeDepth>=V8e)return{ext:"gz",mime:"application/gzip"};let o=new Sf(t),a=pze(o.inflate(),z8e),e=wa(t),i,A,r,s;if(e){let g=new AbortController;i=setTimeout(()=>{g.abort(new DOMException(`Operation timed out after ${Tie} ms`,"TimeoutError"))},Tie),A=this.options.signal===void 0?g.signal:AbortSignal.any([this.options.signal,g.signal]),r=new n({...this.options,signal:A}),r.gzipProbeDepth=this.gzipProbeDepth+1}else this.gzipProbeDepth++;try{s=await(r??this).fromStream(a)}catch(g){if(g?.name==="AbortError"&&A?.reason?.name!=="TimeoutError")throw g}finally{clearTimeout(i),e||this.gzipProbeDepth--}return s?.ext==="tar"?{ext:"tar.gz",mime:"application/gzip"}:{ext:"gz",mime:"application/gzip"}}check(t,o){return tg(this.buffer,t,o)}checkString(t,o){return this.check(yie(t,o?.encoding),o)}detectConfident=async t=>{if(this.buffer=new Uint8Array(Of),t.fileInfo.size===void 0&&(t.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=t,wa(t)&&(await t.peekBuffer(this.buffer,{length:3,mayBeLess:!0}),this.check([31,139,8])))return this.detectGzip(t);if(await t.peekBuffer(this.buffer,{length:32,mayBeLess:!0}),this.check([66,77]))return{ext:"bmp",mime:"image/bmp"};if(this.check([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(this.check([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(this.check([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(this.check([37,33]))return await t.peekBuffer(this.buffer,{length:24,mayBeLess:!0}),this.checkString("PS-Adobe-",{offset:2})&&this.checkString(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(this.check([31,160])||this.check([31,157]))return{ext:"Z",mime:"application/x-compress"};if(this.check([199,113]))return{ext:"cpio",mime:"application/x-cpio"};if(this.check([96,234]))return{ext:"arj",mime:"application/x-arj"};if(this.check([239,187,191]))return this.detectionReentryCount>=kie?void 0:(this.detectionReentryCount++,await this.tokenizer.ignore(3),this.detectConfident(t));if(this.check([71,73,70]))return{ext:"gif",mime:"image/gif"};if(this.check([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(this.check([31,139,8]))return this.detectGzip(t);if(this.check([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(this.checkString("ID3")){await OI(t,6,{maximumLength:6,reason:"ID3 header prefix"});let o=await t.readToken(Sie),a=wa(t);if(!Number.isFinite(o)||o<0||a&&(o>tU||t.position+o>tU))return;if(t.position+o>t.fileInfo.size)return a?void 0:{ext:"mp3",mime:"audio/mpeg"};try{await OI(t,o,{maximumLength:a?tU:t.fileInfo.size,reason:"ID3 payload"})}catch(e){if(e instanceof kA)return;throw e}return this.detectionReentryCount>=kie?void 0:(this.detectionReentryCount++,this.parseTokenizer(t,this.detectionReentryCount))}if(this.checkString("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((this.buffer[0]===67||this.buffer[0]===70)&&this.check([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(this.check([255,216,255]))return this.check([247],{offset:3})?{ext:"jls",mime:"image/jls"}:{ext:"jpg",mime:"image/jpeg"};if(this.check([79,98,106,1]))return{ext:"avro",mime:"application/avro"};if(this.checkString("FLIF"))return{ext:"flif",mime:"image/flif"};if(this.checkString("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(this.checkString("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(this.checkString("FORM"))return{ext:"aif",mime:"audio/aiff"};if(this.checkString("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(this.check([80,75,3,4])){let o,a=Qze();try{await new gd(t).unzip(e=>{yze(a,e.filename);let i=e.filename==="[Content_Types].xml",A=Uie(a);if(!i&&A)return o=A,{stop:!0};switch(e.filename){case"META-INF/mozilla.rsa":return o={ext:"xpi",mime:"application/x-xpinstall"},{stop:!0};case"META-INF/MANIFEST.MF":return o={ext:"jar",mime:"application/java-archive"},{stop:!0};case"mimetype":return Lie(e,_ie)?{async handler(r){let s=new TextDecoder("utf-8").decode(r).trim();o=Fie(s)},stop:!0}:{};case"[Content_Types].xml":return a.hasContentTypesEntry=!0,Lie(e,_ie)?(a.isParsingContentTypes=!0,{async handler(r){let s=new TextDecoder("utf-8").decode(r),g=mze(s);g&&(o=Fie(g)),a.hasParsedContentTypesEntry=!0,a.isParsingContentTypes=!1},stop:!0}):(a.hasUnparseableContentTypes=!0,{});default:return/classes\d*\.dex/.test(e.filename)?(o={ext:"apk",mime:"application/vnd.android.package-archive"},{stop:!0}):{}}})}catch(e){if(!fze(e))throw e;a.isParsingContentTypes&&(a.isParsingContentTypes=!1,a.hasUnparseableContentTypes=!0)}return o??Uie(a)??{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await t.ignore(28);let o=new Uint8Array(8);return await t.readBuffer(o),tg(o,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:tg(o,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:tg(o,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:tg(o,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:tg(o,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:tg(o,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(this.buffer[2]===3||this.buffer[2]===5||this.buffer[2]===7)&&(this.buffer[3]===4||this.buffer[3]===6||this.buffer[3]===8))return{ext:"zip",mime:"application/zip"};if(this.checkString("MThd"))return{ext:"mid",mime:"audio/midi"};if(this.checkString("wOFF")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(this.checkString("wOF2")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(this.check([212,195,178,161])||this.check([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(this.checkString("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(this.checkString("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(this.checkString("fLaC"))return{ext:"flac",mime:"audio/flac"};if(this.check([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(this.checkString("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(this.checkString("%PDF"))return{ext:"pdf",mime:"application/pdf"};if(this.check([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(this.check([73,73])){let o=await this.readTiffHeader(!1);if(o)return o}if(this.check([77,77])){let o=await this.readTiffHeader(!0);if(o)return o}if(this.checkString("MAC "))return{ext:"ape",mime:"audio/ape"};if(this.check([26,69,223,163])){async function o(){let s=await t.peekNumber(QA),g=128,c=0;for(;(s&g)===0&&g!==0;)++c,g>>=1;let I=new Uint8Array(c+1);return await rU(t,I,void 0,{maximumLength:I.length,reason:"EBML field"}),I}async function a(){let s=await o(),g=await o();g[0]^=128>>g.length-1;let c=Math.min(6,g.length),I=new DataView(s.buffer),d=new DataView(g.buffer,g.length-c,c);return{id:wf(I),len:wf(d)}}async function e(s){let g=0;for(;s>0;){if(g++,g>W8e||bf(t,A,cn))return;let c=t.position,I=await a();if(I.id===17026){if(I.len>Nie)return;let d=aU(I.len,Nie,"EBML DocType");return(await t.readToken(new We(d))).replaceAll(/\00.*$/g,"")}if(wa(t)&&(!Number.isFinite(I.len)||I.len<0||I.len>Rie)||(await OI(t,I.len,{maximumLength:wa(t)?Rie:t.fileInfo.size,reason:"EBML payload"}),--s,t.position<=c))return}}let i=await a(),A=t.position;switch(await e(i.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/matroska"};default:return}}if(this.checkString("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(this.check([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(this.checkString("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(this.checkString("MSCF")||this.checkString("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(this.check([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(this.check([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(this.check([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(this.check([127,69,76,70]))return{ext:"elf",mime:"application/x-elf"};if(this.check([33,66,68,78]))return{ext:"pst",mime:"application/vnd.ms-outlook"};if(this.checkString("PAR1")||this.checkString("PARE"))return{ext:"parquet",mime:"application/vnd.apache.parquet"};if(this.checkString("ttcf"))return{ext:"ttc",mime:"font/collection"};if(this.check([254,237,250,206])||this.check([254,237,250,207])||this.check([206,250,237,254])||this.check([207,250,237,254]))return{ext:"macho",mime:"application/x-mach-binary"};if(this.check([4,34,77,24]))return{ext:"lz4",mime:"application/x-lz4"};if(this.checkString("regf"))return{ext:"dat",mime:"application/x-ft-windows-registry-hive"};if(this.checkString("$FL2")||this.checkString("$FL3"))return{ext:"sav",mime:"application/x-spss-sav"};if(this.check([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(this.checkString("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(this.checkString("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(this.check([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(this.checkString("IMPM"))return{ext:"it",mime:"audio/x-it"};if(this.checkString("-lh0-",{offset:2})||this.checkString("-lh1-",{offset:2})||this.checkString("-lh2-",{offset:2})||this.checkString("-lh3-",{offset:2})||this.checkString("-lh4-",{offset:2})||this.checkString("-lh5-",{offset:2})||this.checkString("-lh6-",{offset:2})||this.checkString("-lh7-",{offset:2})||this.checkString("-lzs-",{offset:2})||this.checkString("-lz4-",{offset:2})||this.checkString("-lz5-",{offset:2})||this.checkString("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(this.check([0,0,1,186])){if(this.check([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(this.check([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(this.checkString("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(this.check([202,254,186,190])){let o=xe.get(this.buffer,4),a=LA.get(this.buffer,6);if(o>0&&o<=30)return{ext:"macho",mime:"application/x-mach-binary"};if(a>30)return{ext:"class",mime:"application/java-vm"}}if(this.checkString(".RMF"))return{ext:"rm",mime:"application/vnd.rn-realmedia"};if(this.checkString("DRACO"))return{ext:"drc",mime:"application/vnd.google.draco"};if(this.check([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(this.checkString("=1e3&&o<=1050)return{ext:"dwg",mime:"image/vnd.dwg"}}if(this.checkString("070707"))return{ext:"cpio",mime:"application/x-cpio"};if(this.checkString("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(this.checkString("!"))return await t.ignore(8),await t.readToken(new We(13,"ascii"))==="debian-binary"?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(this.checkString("WEBVTT")&&[` -`,"\r"," "," ","\0"].some(o=>this.checkString(o,{offset:6})))return{ext:"vtt",mime:"text/vtt"};if(this.check([137,80,78,71,13,10,26,10])){let o={ext:"png",mime:"image/png"},a={ext:"apng",mime:"image/apng"};await t.ignore(8);async function e(){return{length:await t.readToken(Sa),type:await t.readToken(new We(4,"latin1"))}}let i=wa(t),A=t.position,r=0,s=!1;do{if(r++,r>Z8e||bf(t,A,X8e))break;let g=t.position,c=await e();if(c.length<0)return;if(c.type==="IHDR"){if(c.length!==13)return;s=!0}switch(c.type){case"IDAT":return o;case"acTL":return a;default:if(!s&&c.type!=="CgBI")return;if(i&&c.length>vie)return s&&gze(c.type)?o:void 0;try{await OI(t,c.length+4,{maximumLength:i?vie+4:t.fileInfo.size,reason:"PNG chunk payload"})}catch(I){if(!i&&(I instanceof sc||I instanceof kA))return o;throw I}}if(t.position<=g)break}while(t.position+8$8e||bf(t,i,cn)));){let r=t.position,s=await a(),g=s.size-24;if(!Number.isFinite(g)||g<0){o=!0;break}if(tg(s.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){let c=new Uint8Array(16);if(g-=await rU(t,c,void 0,{maximumLength:c.length,reason:"ASF stream type GUID"}),tg(c,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(tg(c,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}if(e&&g>Pie){o=!0;break}if(await OI(t,g,{maximumLength:e?Pie:t.fileInfo.size,reason:"ASF header payload"}),t.position<=r){o=!0;break}}}catch(a){if(a instanceof kA||a instanceof sc)wa(t)&&(o=!0);else throw a}return o?void 0:{ext:"asf",mime:"application/vnd.ms-asf"}}if(this.check([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((this.check([126,16,4])||this.check([126,24,4]))&&this.check([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(this.check([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(this.check([255,79,255,81]))return{ext:"j2c",mime:"image/j2c"};if(this.check([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await t.ignore(20),await t.readToken(new We(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(this.check([255,10])||this.check([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(this.check([254,255]))return this.checkString("=16){let o=new DataView(this.buffer.buffer).getUint32(12,!0);if(o>12&&this.buffer.length>=o+16)try{let a=new TextDecoder().decode(this.buffer.subarray(16,o+16));if(JSON.parse(a).files)return{ext:"asar",mime:"application/x-asar"}}catch{}}if(this.check([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(this.checkString("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(this.check([71])&&this.check([71],{offset:188}))return{ext:"mts",mime:"video/mp2t"};if(this.check([71],{offset:4})&&this.check([71],{offset:196}))return{ext:"mts",mime:"video/mp2t"};if(this.check([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(this.check([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(this.check([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(this.check([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(this.checkString("Kaydara FBX Binary \0"))return{ext:"fbx",mime:"application/x.autodesk.fbx"};if(this.check([76,80],{offset:34})&&(this.check([0,0,1],{offset:8})||this.check([1,0,2],{offset:8})||this.check([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(this.check([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(this.check([255,255,0,0,7,0,0,0,4,0,0,0,1,0,1,0])||this.check([0,0,255,255,0,0,0,7,0,0,0,4,0,1,0,1]))return{ext:"jmp",mime:"application/x-jmp-data"};if(await t.peekBuffer(this.buffer,{length:Math.min(512,t.fileInfo.size),mayBeLess:!0}),this.checkString("ustar",{offset:257})&&(this.checkString("\0",{offset:262})||this.checkString(" ",{offset:262}))||this.check([0,0,0,0,0,0],{offset:257})&&mie(this.buffer))return{ext:"tar",mime:"application/x-tar"};if(this.check([255,254])){let o="utf-16le";return this.checkString("{this.buffer=new Uint8Array(Of);let o=Cze(t.fileInfo.size);if(await t.peekBuffer(this.buffer,{length:Math.min(8,o),mayBeLess:!0}),this.check([0,0,1,186])||this.check([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(this.check([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(this.check([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(this.check([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(await t.peekBuffer(this.buffer,{length:Math.min(2+this.options.mpegOffsetTolerance,o),mayBeLess:!0}),this.buffer.length>=2+this.options.mpegOffsetTolerance)for(let a=0;a<=this.options.mpegOffsetTolerance;++a){let e=this.scanMpeg(a);if(e)return e}};async readTiffTag(t){let o=await this.tokenizer.readToken(t?LA:SA);switch(await this.tokenizer.ignore(10),o){case 50341:return{ext:"arw",mime:"image/x-sony-arw"};case 50706:return{ext:"dng",mime:"image/x-adobe-dng"};default:}}async readTiffIFD(t){let o=await this.tokenizer.readToken(t?LA:SA);if(!(o>eze)&&!(wa(this.tokenizer)&&2+o*12>Gie))for(let a=0;a=6){if(this.checkString("CR",{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(e>=8){let r=(t?LA:SA).get(this.buffer,8),s=(t?LA:SA).get(this.buffer,10);if(r===28&&s===254||r===31&&s===11)return{ext:"nef",mime:"image/x-nikon-nef"}}}if(wa(this.tokenizer)&&e>Aze)return o;let i=wa(this.tokenizer)?Gie:this.tokenizer.fileInfo.size;try{await OI(this.tokenizer,e,{maximumLength:i,reason:"TIFF IFD offset"})}catch(r){if(r instanceof kA)return;throw r}let A;try{A=await this.readTiffIFD(t)}catch(r){if(r instanceof kA)return;throw r}return A??o}if(a===43)return o}scanMpeg(t){if(this.check([255,224],{offset:t,mask:[255,224]})){if(this.check([16],{offset:t+1,mask:[22]}))return this.check([8],{offset:t+1,mask:[8]})?{ext:"aac",mime:"audio/aac"}:{ext:"aac",mime:"audio/aac"};if(this.check([2],{offset:t+1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(this.check([4],{offset:t+1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(this.check([6],{offset:t+1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}},Sze=new Set(Die),wze=new Set(Oie)});var oU=ue(()=>{sn();Kie()});var Vie=ee(JO=>{"use strict";Object.defineProperty(JO,"__esModule",{value:!0});JO.format=Mze;JO.parse=_ze;var Dze=/^[\u0009\u0020-\u007e\u0080-\u00ff]*$/,Yie=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,Oze=/[\\"]/g,bze=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,jie=(()=>{let n=function(){};return n.prototype=Object.create(null),n})();function Mze(n){let{type:t,parameters:o}=n;if(!t||!bze.test(t))throw new TypeError(`Invalid type: ${t}`);let a=t;if(o)for(let e of Object.keys(o)){if(!Yie.test(e))throw new TypeError(`Invalid parameter name: ${e}`);a+=`; ${e}=${vze(o[e])}`}return a}function _ze(n,t){let o=t?.comma===!0?Rze:65536,a=n.length,e=sU(n,t?.start??0,a),i=e;e=nU(n,e,a,o);let A=gU(n,i,e),r=n.slice(i,A).toLowerCase();return t?.parameters===!1?{type:r,index:e,parameters:new jie}:kze(n,r,e,a,o)}var Jie=32,qie=9,zie=59,Tze=61,xie=34,Nze=92,Rze=44;function kze(n,t,o,a,e){let i=new jie;e:for(;ot;){let a=n.charCodeAt(o-1);if(a!==Jie&&a!==qie)break;o--}return o}function vze(n){if(Yie.test(n))return n;if(Dze.test(n))return`"${n.replace(Oze,"\\$&")}"`;throw new TypeError(`Invalid parameter value: ${n}`)}});function Wie(n){if(!Pze.test(n))throw new TypeError(`Invalid media type: ${n}`);let t=n.indexOf("/"),o=n.slice(0,t).toLowerCase(),a=n.slice(t+1).toLowerCase(),e,i=a.lastIndexOf("+");return i!==-1&&(e=a.slice(i+1),a=a.slice(0,i)),{type:o,subtype:a,suffix:e}}var Pze,Zie=ue(()=>{Pze=/^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}\/[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}$/});var Xie,yi,cU,IU=ue(()=>{Xie={10:"shot",20:"scene",30:"track",40:"part",50:"album",60:"edition",70:"collection"},yi={video:1,audio:2,complex:3,logo:4,subtitle:17,button:18,control:32},cU={[yi.video]:"video",[yi.audio]:"audio",[yi.complex]:"complex",[yi.logo]:"logo",[yi.subtitle]:"subtitle",[yi.button]:"button",[yi.control]:"control"}});var nE,bI,MI,lU,In,cd,St,nr=ue(()=>{nE=n=>class extends Error{constructor(o){super(o),this.name=n}},bI=class extends nE("CouldNotDetermineFileTypeError"){},MI=class extends nE("UnsupportedFileTypeError"){},lU=class extends nE("UnexpectedFileContentError"){constructor(t,o){super(o),this.fileType=t}toString(){return`${this.name} (FileType: ${this.fileType}): ${this.message}`}},In=class extends nE("FieldDecodingError"){},cd=class extends nE("InternalParserError"){},St=n=>class extends lU{constructor(t){super(n,t)}}});function GA(n,t,o){return(n[t]&1<>i;let r=8-i,s=a-r;return s<0?A>>=8-i-a:s>0&&(A<<=s,A|=XA(n,t,o+r,s)),A}function Hi(n,t,o){return XA(n,t,o,1)===1}function eae(n){let t=[];for(let o=0,a=n.length;oo.trim().toLowerCase());if(t.length>=1){let o=Number.parseFloat(t[0]);return t.length===2&&t[1]==="db"?{dB:o,ratio:Fze(o)}:{dB:Gze(o),ratio:o}}}function dU(n){if(n.length===0)throw new Error("decodeUintBE: empty Uint8Array");let t=new DataView(n.buffer,n.byteOffset,n.byteLength);return wf(t)}var sr=ue(()=>{DA();nr();Df()});var sE,gE,cE,pU,_f,hU,IE,zO,EU,_I=ue(()=>{DA();sr();sE={0:"Other",1:"32x32 pixels 'file icon' (PNG only)",2:"Other file icon",3:"Cover (front)",4:"Cover (back)",5:"Leaflet page",6:"Media (e.g. label side of CD)",7:"Lead artist/lead performer/soloist",8:"Artist/performer",9:"Conductor",10:"Band/Orchestra",11:"Composer",12:"Lyricist/text writer",13:"Recording Location",14:"During recording",15:"During performance",16:"Movie/video screen capture",17:"A bright coloured fish",18:"Illustration",19:"Band/artist logotype",20:"Publisher/Studio logotype"},gE={other:0,lyrics:1,text:2,movement_part:3,events:4,chord:5,trivia_pop:6},cE={notSynchronized:0,mpegFrameNumber:1,milliseconds:2},pU={get:(n,t)=>n[t+3]&127|n[t+2]<<7|n[t+1]<<14|n[t]<<21,len:4},_f={len:10,get:(n,t)=>({fileIdentifier:new We(3,"ascii").get(n,t),version:{major:$s.get(n,t+3),revision:$s.get(n,t+4)},flags:{unsynchronisation:GA(n,t+5,7),isExtendedHeader:GA(n,t+5,6),expIndicator:GA(n,t+5,5),footer:GA(n,t+5,4)},size:pU.get(n,t+6)})},hU={len:10,get:(n,t)=>({size:xe.get(n,t),extendedFlags:LA.get(n,t+4),sizeOfPadding:xe.get(n,t+6),crcDataPresent:GA(n,t+4,31)})},IE={len:1,get:(n,t)=>{switch(n[t]){case 0:return{encoding:"latin1"};case 1:return{encoding:"utf-16le",bom:!0};case 2:return{encoding:"utf-16be",bom:!1};case 3:return{encoding:"utf8",bom:!1};default:return{encoding:"utf8",bom:!1}}}},zO={len:4,get:(n,t)=>({encoding:IE.get(n,t),language:new We(3,"latin1").get(n,t+1)})},EU={len:6,get:(n,t)=>{let o=zO.get(n,t);return{encoding:o.encoding,language:o.language,timeStampFormat:QA.get(n,t+4),contentType:QA.get(n,t+5)}}}});var Id=ue(()=>{IU();_I()});function tae(n){return VO[n]&&!VO[n].multiple}function rae(n){return!VO[n].multiple||VO[n].unique||!1}var AA,VO,iae=ue(()=>{AA={multiple:!1},VO={year:AA,track:AA,disk:AA,title:AA,artist:AA,artists:{multiple:!0,unique:!0},albumartist:AA,albumartists:{multiple:!0,unique:!0},album:AA,date:AA,originaldate:AA,originalyear:AA,releasedate:AA,comment:{multiple:!0,unique:!1},genre:{multiple:!0,unique:!0},picture:{multiple:!0,unique:!0},composer:{multiple:!0,unique:!0},lyrics:{multiple:!0,unique:!1},albumsort:{multiple:!1,unique:!0},titlesort:{multiple:!1,unique:!0},work:{multiple:!1,unique:!0},artistsort:{multiple:!1,unique:!0},albumartistsort:{multiple:!1,unique:!0},composersort:{multiple:!1,unique:!0},lyricist:{multiple:!0,unique:!0},writer:{multiple:!0,unique:!0},conductor:{multiple:!0,unique:!0},remixer:{multiple:!0,unique:!0},arranger:{multiple:!0,unique:!0},engineer:{multiple:!0,unique:!0},producer:{multiple:!0,unique:!0},technician:{multiple:!0,unique:!0},djmixer:{multiple:!0,unique:!0},mixer:{multiple:!0,unique:!0},label:{multiple:!0,unique:!0},grouping:AA,subtitle:{multiple:!0},discsubtitle:AA,totaltracks:AA,totaldiscs:AA,compilation:AA,rating:{multiple:!0},bpm:AA,mood:AA,media:AA,catalognumber:{multiple:!0,unique:!0},tvShow:AA,tvShowSort:AA,tvSeason:AA,tvEpisode:AA,tvEpisodeId:AA,tvNetwork:AA,podcast:AA,podcasturl:AA,releasestatus:AA,releasetype:{multiple:!0},releasecountry:AA,script:AA,language:AA,copyright:AA,license:AA,encodedby:AA,encodersettings:AA,gapless:AA,barcode:AA,isrc:{multiple:!0},asin:AA,musicbrainz_recordingid:AA,musicbrainz_trackid:AA,musicbrainz_albumid:AA,musicbrainz_artistid:{multiple:!0},musicbrainz_albumartistid:{multiple:!0},musicbrainz_releasegroupid:AA,musicbrainz_workid:AA,musicbrainz_trmid:AA,musicbrainz_discid:AA,acoustid_id:AA,acoustid_fingerprint:AA,musicip_puid:AA,musicip_fingerprint:AA,website:AA,"performer:instrument":{multiple:!0,unique:!0},averageLevel:AA,peakLevel:AA,notes:{multiple:!0,unique:!1},key:AA,originalalbum:AA,originalartist:AA,discogs_artist_id:{multiple:!0,unique:!0},discogs_release_id:AA,discogs_label_id:AA,discogs_master_release_id:AA,discogs_votes:AA,discogs_rating:AA,replaygain_track_peak:AA,replaygain_track_gain:AA,replaygain_album_peak:AA,replaygain_album_gain:AA,replaygain_track_minmax:AA,replaygain_album_minmax:AA,replaygain_undo:AA,description:{multiple:!0},longDescription:AA,category:{multiple:!0},hdVideo:AA,keywords:{multiple:!0},movement:AA,movementIndex:AA,movementTotal:AA,podcastId:AA,showMovement:AA,stik:AA,playCounter:AA}});var Br,gc=ue(()=>{Br=class{static toIntOrNull(t){let o=Number.parseInt(t,10);return Number.isNaN(o)?null:o}static normalizeTrack(t){let o=t.toString().split("/");return{no:Number.parseInt(o[0],10)||null,of:Number.parseInt(o[1],10)||null}}constructor(t,o){this.tagTypes=t,this.tagMap=o}mapGenericTag(t,o){t={id:t.id,value:t.value},this.postMap(t,o);let a=this.getCommonName(t.id);return a?{id:a,value:t.value}:null}getCommonName(t){return this.tagMap[t]}postMap(t,o){}};Br.maxRatingScore=1});var Lze,WO,aae=ue(()=>{gc();Lze={title:"title",artist:"artist",album:"album",year:"year",comment:"comment",track:"track",genre:"genre"},WO=class extends Br{constructor(){super(["ID3v1"],Lze)}}});var dn,lE=ue(()=>{gc();dn=class extends Br{constructor(t,o){let a={};for(let e of Object.keys(o))a[e.toUpperCase()]=o[e];super(t,a)}getCommonName(t){return this.tagMap[t.toUpperCase()]}}});var Uze,ZO,oae=ue(()=>{DA();gc();lE();sr();Uze={TIT2:"title",TPE1:"artist","TXXX:Artists":"artists",TPE2:"albumartist",TALB:"album",TDRV:"date",TORY:"originalyear",TPOS:"disk",TCON:"genre",APIC:"picture",TCOM:"composer",USLT:"lyrics",TSOA:"albumsort",TSOT:"titlesort",TOAL:"originalalbum",TSOP:"artistsort",TSO2:"albumartistsort",TSOC:"composersort",TEXT:"lyricist","TXXX:Writer":"writer",TPE3:"conductor",TPE4:"remixer","IPLS:arranger":"arranger","IPLS:engineer":"engineer","IPLS:producer":"producer","IPLS:DJ-mix":"djmixer","IPLS:mix":"mixer",TPUB:"label",TIT1:"grouping",TIT3:"subtitle",TRCK:"track",TCMP:"compilation",POPM:"rating",TBPM:"bpm",TMED:"media","TXXX:CATALOGNUMBER":"catalognumber","TXXX:MusicBrainz Album Status":"releasestatus","TXXX:MusicBrainz Album Type":"releasetype","TXXX:MusicBrainz Album Release Country":"releasecountry","TXXX:RELEASECOUNTRY":"releasecountry","TXXX:SCRIPT":"script",TLAN:"language",TCOP:"copyright",WCOP:"license",TENC:"encodedby",TSSE:"encodersettings","TXXX:BARCODE":"barcode","TXXX:ISRC":"isrc",TSRC:"isrc","TXXX:ASIN":"asin","TXXX:originalyear":"originalyear","UFID:http://musicbrainz.org":"musicbrainz_recordingid","TXXX:MusicBrainz Release Track Id":"musicbrainz_trackid","TXXX:MusicBrainz Album Id":"musicbrainz_albumid","TXXX:MusicBrainz Artist Id":"musicbrainz_artistid","TXXX:MusicBrainz Album Artist Id":"musicbrainz_albumartistid","TXXX:MusicBrainz Release Group Id":"musicbrainz_releasegroupid","TXXX:MusicBrainz Work Id":"musicbrainz_workid","TXXX:MusicBrainz TRM Id":"musicbrainz_trmid","TXXX:MusicBrainz Disc Id":"musicbrainz_discid","TXXX:ACOUSTID_ID":"acoustid_id","TXXX:Acoustid Id":"acoustid_id","TXXX:Acoustid Fingerprint":"acoustid_fingerprint","TXXX:MusicIP PUID":"musicip_puid","TXXX:MusicMagic Fingerprint":"musicip_fingerprint",WOAR:"website",TDRC:"date",TYER:"year",TDOR:"originaldate","TIPL:arranger":"arranger","TIPL:engineer":"engineer","TIPL:producer":"producer","TIPL:DJ-mix":"djmixer","TIPL:mix":"mixer",TMOO:"mood",SYLT:"lyrics",TSST:"discsubtitle",TKEY:"key",COMM:"comment",TOPE:"originalartist","PRIV:AverageLevel":"averageLevel","PRIV:PeakLevel":"peakLevel","TXXX:DISCOGS_ARTIST_ID":"discogs_artist_id","TXXX:DISCOGS_ARTISTS":"artists","TXXX:DISCOGS_ARTIST_NAME":"artists","TXXX:DISCOGS_ALBUM_ARTISTS":"albumartist","TXXX:DISCOGS_CATALOG":"catalognumber","TXXX:DISCOGS_COUNTRY":"releasecountry","TXXX:DISCOGS_DATE":"originaldate","TXXX:DISCOGS_LABEL":"label","TXXX:DISCOGS_LABEL_ID":"discogs_label_id","TXXX:DISCOGS_MASTER_RELEASE_ID":"discogs_master_release_id","TXXX:DISCOGS_RATING":"discogs_rating","TXXX:DISCOGS_RELEASED":"date","TXXX:DISCOGS_RELEASE_ID":"discogs_release_id","TXXX:DISCOGS_VOTES":"discogs_votes","TXXX:CATALOGID":"catalognumber","TXXX:STYLE":"genre","TXXX:REPLAYGAIN_TRACK_PEAK":"replaygain_track_peak","TXXX:REPLAYGAIN_TRACK_GAIN":"replaygain_track_gain","TXXX:REPLAYGAIN_ALBUM_PEAK":"replaygain_album_peak","TXXX:REPLAYGAIN_ALBUM_GAIN":"replaygain_album_gain","TXXX:MP3GAIN_MINMAX":"replaygain_track_minmax","TXXX:MP3GAIN_ALBUM_MINMAX":"replaygain_album_minmax","TXXX:MP3GAIN_UNDO":"replaygain_undo",MVNM:"movement",MVIN:"movementIndex",PCST:"podcast",TCAT:"category",TDES:"description",TDRL:"releasedate",TGID:"podcastId",TKWD:"keywords",WFED:"podcasturl",GRP1:"grouping",PCNT:"playCounter"},ZO=class n extends dn{static toRating(t){return{source:t.email,rating:t.rating>0?(t.rating-1)/254*Br.maxRatingScore:void 0}}constructor(){super(["ID3v2.3","ID3v2.4"],Uze)}postMap(t,o){switch(t.id){case"UFID":{let a=t.value;a.owner_identifier==="http://musicbrainz.org"&&(t.id+=`:${a.owner_identifier}`,t.value=mi(a.identifier,"latin1"))}break;case"PRIV":{let a=t.value;switch(a.owner_identifier){case"AverageLevel":case"PeakValue":t.id+=`:${a.owner_identifier}`,t.value=a.data.length===4?Le.get(a.data,0):null,t.value===null&&o.addWarning("Failed to parse PRIV:PeakValue");break;default:o.addWarning(`Unknown PRIV owner-identifier: ${a.data}`)}}break;case"POPM":t.value=n.toRating(t.value);break;default:break}}}});var Hze,XO,nae=ue(()=>{gc();Hze={Title:"title",Author:"artist","WM/AlbumArtist":"albumartist","WM/AlbumTitle":"album","WM/Year":"date","WM/OriginalReleaseTime":"originaldate","WM/OriginalReleaseYear":"originalyear",Description:"comment","WM/TrackNumber":"track","WM/PartOfSet":"disk","WM/Genre":"genre","WM/Composer":"composer","WM/Lyrics":"lyrics","WM/AlbumSortOrder":"albumsort","WM/TitleSortOrder":"titlesort","WM/ArtistSortOrder":"artistsort","WM/AlbumArtistSortOrder":"albumartistsort","WM/ComposerSortOrder":"composersort","WM/Writer":"lyricist","WM/Conductor":"conductor","WM/ModifiedBy":"remixer","WM/Engineer":"engineer","WM/Producer":"producer","WM/DJMixer":"djmixer","WM/Mixer":"mixer","WM/Publisher":"label","WM/ContentGroupDescription":"grouping","WM/SubTitle":"subtitle","WM/SetSubTitle":"discsubtitle","WM/IsCompilation":"compilation","WM/SharedUserRating":"rating","WM/BeatsPerMinute":"bpm","WM/Mood":"mood","WM/Media":"media","WM/CatalogNo":"catalognumber","MusicBrainz/Album Status":"releasestatus","MusicBrainz/Album Type":"releasetype","MusicBrainz/Album Release Country":"releasecountry","WM/Script":"script","WM/Language":"language",Copyright:"copyright",LICENSE:"license","WM/EncodedBy":"encodedby","WM/EncodingSettings":"encodersettings","WM/Barcode":"barcode","WM/ISRC":"isrc","MusicBrainz/Track Id":"musicbrainz_recordingid","MusicBrainz/Release Track Id":"musicbrainz_trackid","MusicBrainz/Album Id":"musicbrainz_albumid","MusicBrainz/Artist Id":"musicbrainz_artistid","MusicBrainz/Album Artist Id":"musicbrainz_albumartistid","MusicBrainz/Release Group Id":"musicbrainz_releasegroupid","MusicBrainz/Work Id":"musicbrainz_workid","MusicBrainz/TRM Id":"musicbrainz_trmid","MusicBrainz/Disc Id":"musicbrainz_discid","Acoustid/Id":"acoustid_id","Acoustid/Fingerprint":"acoustid_fingerprint","MusicIP/PUID":"musicip_puid","WM/ARTISTS":"artists","WM/InitialKey":"key",ASIN:"asin","WM/Work":"work","WM/AuthorURL":"website","WM/Picture":"picture"},XO=class n extends Br{static toRating(t){return{rating:Number.parseFloat(t+1)/5}}constructor(){super(["asf"],Hze)}postMap(t){switch(t.id){case"WM/SharedUserRating":{let o=t.id.split(":");t.value=n.toRating(t.value),t.id=o[0];break}}}}});var Kze,$O,sae=ue(()=>{lE();Kze={TT2:"title",TP1:"artist",TP2:"albumartist",TAL:"album",TYE:"year",COM:"comment",TRK:"track",TPA:"disk",TCO:"genre",PIC:"picture",TCM:"composer",TOR:"originaldate",TOT:"originalalbum",TXT:"lyricist",TP3:"conductor",TPB:"label",TT1:"grouping",TT3:"subtitle",TLA:"language",TCR:"copyright",WCP:"license",TEN:"encodedby",TSS:"encodersettings",WAR:"website",PCS:"podcast",TCP:"compilation",TDR:"date",TS2:"albumartistsort",TSA:"albumsort",TSC:"composersort",TSP:"artistsort",TST:"titlesort",WFD:"podcasturl",TBP:"bpm",GP1:"grouping"},$O=class extends dn{constructor(){super(["ID3v2.2"],Kze)}}});var xze,eb,gae=ue(()=>{lE();xze={Title:"title",Artist:"artist",Artists:"artists","Album Artist":"albumartist",Album:"album",Year:"date",Originalyear:"originalyear",Originaldate:"originaldate",Releasedate:"releasedate",Comment:"comment",Track:"track",Disc:"disk",DISCNUMBER:"disk",Genre:"genre","Cover Art (Front)":"picture","Cover Art (Back)":"picture",Composer:"composer",Lyrics:"lyrics",ALBUMSORT:"albumsort",TITLESORT:"titlesort",WORK:"work",ARTISTSORT:"artistsort",ALBUMARTISTSORT:"albumartistsort",COMPOSERSORT:"composersort",Lyricist:"lyricist",Writer:"writer",Conductor:"conductor",MixArtist:"remixer",Arranger:"arranger",Engineer:"engineer",Producer:"producer",DJMixer:"djmixer",Mixer:"mixer",Label:"label",Grouping:"grouping",Subtitle:"subtitle",DiscSubtitle:"discsubtitle",Compilation:"compilation",BPM:"bpm",Mood:"mood",Media:"media",CatalogNumber:"catalognumber",MUSICBRAINZ_ALBUMSTATUS:"releasestatus",MUSICBRAINZ_ALBUMTYPE:"releasetype",RELEASECOUNTRY:"releasecountry",Script:"script",Language:"language",Copyright:"copyright",LICENSE:"license",EncodedBy:"encodedby",EncoderSettings:"encodersettings",Barcode:"barcode",ISRC:"isrc",ASIN:"asin",musicbrainz_trackid:"musicbrainz_recordingid",musicbrainz_releasetrackid:"musicbrainz_trackid",MUSICBRAINZ_ALBUMID:"musicbrainz_albumid",MUSICBRAINZ_ARTISTID:"musicbrainz_artistid",MUSICBRAINZ_ALBUMARTISTID:"musicbrainz_albumartistid",MUSICBRAINZ_RELEASEGROUPID:"musicbrainz_releasegroupid",MUSICBRAINZ_WORKID:"musicbrainz_workid",MUSICBRAINZ_TRMID:"musicbrainz_trmid",MUSICBRAINZ_DISCID:"musicbrainz_discid",Acoustid_Id:"acoustid_id",ACOUSTID_FINGERPRINT:"acoustid_fingerprint",MUSICIP_PUID:"musicip_puid",Weblink:"website",REPLAYGAIN_TRACK_GAIN:"replaygain_track_gain",REPLAYGAIN_TRACK_PEAK:"replaygain_track_peak",MP3GAIN_MINMAX:"replaygain_track_minmax",MP3GAIN_UNDO:"replaygain_undo"},eb=class extends dn{constructor(){super(["APEv2"],xze)}}});var Yze,jze,Tf,cae=ue(()=>{lE();Yze={"\xA9nam":"title","\xA9ART":"artist",aART:"albumartist","----:com.apple.iTunes:Band":"albumartist","\xA9alb":"album","\xA9day":"date","\xA9cmt":"comment","\xA9com":"comment",trkn:"track",disk:"disk","\xA9gen":"genre",covr:"picture","\xA9wrt":"composer","\xA9lyr":"lyrics",soal:"albumsort",sonm:"titlesort",soar:"artistsort",soaa:"albumartistsort",soco:"composersort","----:com.apple.iTunes:LYRICIST":"lyricist","----:com.apple.iTunes:CONDUCTOR":"conductor","----:com.apple.iTunes:REMIXER":"remixer","----:com.apple.iTunes:ENGINEER":"engineer","----:com.apple.iTunes:PRODUCER":"producer","----:com.apple.iTunes:DJMIXER":"djmixer","----:com.apple.iTunes:MIXER":"mixer","----:com.apple.iTunes:LABEL":"label","\xA9grp":"grouping","----:com.apple.iTunes:SUBTITLE":"subtitle","----:com.apple.iTunes:DISCSUBTITLE":"discsubtitle",cpil:"compilation",tmpo:"bpm","----:com.apple.iTunes:MOOD":"mood","----:com.apple.iTunes:MEDIA":"media","----:com.apple.iTunes:CATALOGNUMBER":"catalognumber",tvsh:"tvShow",tvsn:"tvSeason",tves:"tvEpisode",sosn:"tvShowSort",tven:"tvEpisodeId",tvnn:"tvNetwork",pcst:"podcast",purl:"podcasturl","----:com.apple.iTunes:MusicBrainz Album Status":"releasestatus","----:com.apple.iTunes:MusicBrainz Album Type":"releasetype","----:com.apple.iTunes:MusicBrainz Album Release Country":"releasecountry","----:com.apple.iTunes:SCRIPT":"script","----:com.apple.iTunes:LANGUAGE":"language",cprt:"copyright","\xA9cpy":"copyright","----:com.apple.iTunes:LICENSE":"license","\xA9too":"encodedby",pgap:"gapless","----:com.apple.iTunes:BARCODE":"barcode","----:com.apple.iTunes:ISRC":"isrc","----:com.apple.iTunes:ASIN":"asin","----:com.apple.iTunes:NOTES":"comment","----:com.apple.iTunes:MusicBrainz Track Id":"musicbrainz_recordingid","----:com.apple.iTunes:MusicBrainz Release Track Id":"musicbrainz_trackid","----:com.apple.iTunes:MusicBrainz Album Id":"musicbrainz_albumid","----:com.apple.iTunes:MusicBrainz Artist Id":"musicbrainz_artistid","----:com.apple.iTunes:MusicBrainz Album Artist Id":"musicbrainz_albumartistid","----:com.apple.iTunes:MusicBrainz Release Group Id":"musicbrainz_releasegroupid","----:com.apple.iTunes:MusicBrainz Work Id":"musicbrainz_workid","----:com.apple.iTunes:MusicBrainz TRM Id":"musicbrainz_trmid","----:com.apple.iTunes:MusicBrainz Disc Id":"musicbrainz_discid","----:com.apple.iTunes:Acoustid Id":"acoustid_id","----:com.apple.iTunes:Acoustid Fingerprint":"acoustid_fingerprint","----:com.apple.iTunes:MusicIP PUID":"musicip_puid","----:com.apple.iTunes:fingerprint":"musicip_fingerprint","----:com.apple.iTunes:replaygain_track_gain":"replaygain_track_gain","----:com.apple.iTunes:replaygain_track_peak":"replaygain_track_peak","----:com.apple.iTunes:replaygain_album_gain":"replaygain_album_gain","----:com.apple.iTunes:replaygain_album_peak":"replaygain_album_peak","----:com.apple.iTunes:replaygain_track_minmax":"replaygain_track_minmax","----:com.apple.iTunes:replaygain_album_minmax":"replaygain_album_minmax","----:com.apple.iTunes:replaygain_undo":"replaygain_undo",gnre:"genre","----:com.apple.iTunes:ALBUMARTISTSORT":"albumartistsort","----:com.apple.iTunes:ARTISTS":"artists","----:com.apple.iTunes:ORIGINALDATE":"originaldate","----:com.apple.iTunes:ORIGINALYEAR":"originalyear","----:com.apple.iTunes:RELEASEDATE":"releasedate",desc:"description",ldes:"longDescription","\xA9mvn":"movement","\xA9mvi":"movementIndex","\xA9mvc":"movementTotal","\xA9wrk":"work",catg:"category",egid:"podcastId",hdvd:"hdVideo",keyw:"keywords",shwm:"showMovement",stik:"stik",rate:"rating"},jze="iTunes",Tf=class extends dn{constructor(){super([jze],Yze)}postMap(t,o){switch(t.id){case"rate":t.value={source:void 0,rating:Number.parseFloat(t.value)/100};break}}}});var Jze,Ab,Iae=ue(()=>{gc();Jze={TITLE:"title",ARTIST:"artist",ARTISTS:"artists",ALBUMARTIST:"albumartist","ALBUM ARTIST":"albumartist",ALBUM:"album",DATE:"date",ORIGINALDATE:"originaldate",ORIGINALYEAR:"originalyear",RELEASEDATE:"releasedate",COMMENT:"comment",TRACKNUMBER:"track",DISCNUMBER:"disk",GENRE:"genre",METADATA_BLOCK_PICTURE:"picture",COMPOSER:"composer",LYRICS:"lyrics",ALBUMSORT:"albumsort",TITLESORT:"titlesort",WORK:"work",ARTISTSORT:"artistsort",ALBUMARTISTSORT:"albumartistsort",COMPOSERSORT:"composersort",LYRICIST:"lyricist",WRITER:"writer",CONDUCTOR:"conductor",REMIXER:"remixer",ARRANGER:"arranger",ENGINEER:"engineer",PRODUCER:"producer",DJMIXER:"djmixer",MIXER:"mixer",LABEL:"label",GROUPING:"grouping",SUBTITLE:"subtitle",DISCSUBTITLE:"discsubtitle",TRACKTOTAL:"totaltracks",DISCTOTAL:"totaldiscs",COMPILATION:"compilation",RATING:"rating",BPM:"bpm",KEY:"key",MOOD:"mood",MEDIA:"media",CATALOGNUMBER:"catalognumber",RELEASESTATUS:"releasestatus",RELEASETYPE:"releasetype",RELEASECOUNTRY:"releasecountry",SCRIPT:"script",LANGUAGE:"language",COPYRIGHT:"copyright",LICENSE:"license",ENCODEDBY:"encodedby",ENCODERSETTINGS:"encodersettings",BARCODE:"barcode",ISRC:"isrc",ASIN:"asin",MUSICBRAINZ_TRACKID:"musicbrainz_recordingid",MUSICBRAINZ_RELEASETRACKID:"musicbrainz_trackid",MUSICBRAINZ_ALBUMID:"musicbrainz_albumid",MUSICBRAINZ_ARTISTID:"musicbrainz_artistid",MUSICBRAINZ_ALBUMARTISTID:"musicbrainz_albumartistid",MUSICBRAINZ_RELEASEGROUPID:"musicbrainz_releasegroupid",MUSICBRAINZ_WORKID:"musicbrainz_workid",MUSICBRAINZ_TRMID:"musicbrainz_trmid",MUSICBRAINZ_DISCID:"musicbrainz_discid",ACOUSTID_ID:"acoustid_id",ACOUSTID_ID_FINGERPRINT:"acoustid_fingerprint",MUSICIP_PUID:"musicip_puid",WEBSITE:"website",NOTES:"notes",TOTALTRACKS:"totaltracks",TOTALDISCS:"totaldiscs",DISCOGS_ARTIST_ID:"discogs_artist_id",DISCOGS_ARTISTS:"artists",DISCOGS_ARTIST_NAME:"artists",DISCOGS_ALBUM_ARTISTS:"albumartist",DISCOGS_CATALOG:"catalognumber",DISCOGS_COUNTRY:"releasecountry",DISCOGS_DATE:"originaldate",DISCOGS_LABEL:"label",DISCOGS_LABEL_ID:"discogs_label_id",DISCOGS_MASTER_RELEASE_ID:"discogs_master_release_id",DISCOGS_RATING:"discogs_rating",DISCOGS_RELEASED:"date",DISCOGS_RELEASE_ID:"discogs_release_id",DISCOGS_VOTES:"discogs_votes",CATALOGID:"catalognumber",STYLE:"genre",REPLAYGAIN_TRACK_GAIN:"replaygain_track_gain",REPLAYGAIN_TRACK_PEAK:"replaygain_track_peak",REPLAYGAIN_ALBUM_GAIN:"replaygain_album_gain",REPLAYGAIN_ALBUM_PEAK:"replaygain_album_peak",REPLAYGAIN_MINMAX:"replaygain_track_minmax",REPLAYGAIN_ALBUM_MINMAX:"replaygain_album_minmax",REPLAYGAIN_UNDO:"replaygain_undo"},Ab=class n extends Br{static toRating(t,o,a){return{source:t?t.toLowerCase():void 0,rating:Number.parseFloat(o)/a*Br.maxRatingScore}}constructor(){super(["vorbis"],Jze)}postMap(t){if(t.id==="RATING")t.value=n.toRating(void 0,t.value,100);else if(t.id.indexOf("RATING:")===0){let o=t.id.split(":");t.value=n.toRating(o[1],t.value,1),t.id=o[0]}}}});var qze,tb,lae=ue(()=>{gc();qze={IART:"artist",ICRD:"date",INAM:"title",TITL:"title",IPRD:"album",ITRK:"track",IPRT:"track",COMM:"comment",ICMT:"comment",ICNT:"releasecountry",GNRE:"genre",IWRI:"writer",RATE:"rating",YEAR:"year",ISFT:"encodedby",CODE:"encodedby",TURL:"website",IGNR:"genre",IENG:"engineer",ITCH:"technician",IMED:"media",IRPD:"album"},tb=class extends Br{constructor(){super(["exif"],qze)}}});var zze,rb,dae=ue(()=>{lE();zze={"segment:title":"title","album:ARTIST":"albumartist","album:ARTISTSORT":"albumartistsort","album:TITLE":"album","album:DATE_RECORDED":"originaldate","album:DATE_RELEASED":"releasedate","album:PART_NUMBER":"disk","album:TOTAL_PARTS":"totaltracks","track:ARTIST":"artist","track:ARTISTSORT":"artistsort","track:TITLE":"title","track:PART_NUMBER":"track","track:MUSICBRAINZ_TRACKID":"musicbrainz_recordingid","track:MUSICBRAINZ_ALBUMID":"musicbrainz_albumid","track:MUSICBRAINZ_ARTISTID":"musicbrainz_artistid","track:PUBLISHER":"label","track:GENRE":"genre","track:ENCODER":"encodedby","track:ENCODER_OPTIONS":"encodersettings","edition:TOTAL_PARTS":"totaldiscs",picture:"picture"},rb=class extends dn{constructor(){super(["matroska"],zze)}}});var Vze,ib,pae=ue(()=>{gc();Vze={NAME:"title",AUTH:"artist","(c) ":"copyright",ANNO:"comment"},ib=class extends Br{constructor(){super(["AIFF"],Vze)}}});var ab,hae=ue(()=>{aae();oae();nae();sae();gae();cae();Iae();lae();dae();pae();nr();ab=class{constructor(){this.tagMappers={},[new WO,new $O,new ZO,new Tf,new Tf,new Ab,new eb,new XO,new tb,new rb,new ib].forEach(t=>{this.registerTagMapper(t)})}mapTag(t,o,a){if(this.tagMappers[t])return this.tagMappers[t].mapGenericTag(o,a);throw new cd(`No generic tag mapper defined for tag-format: ${t}`)}registerTagMapper(t){for(let o of t.tagTypes)this.tagMappers[o]=t}}});function Eae(n){return uU.test(n)?Zze(n):Wze(n)}function Wze(n){return{contentType:gE.lyrics,timeStampFormat:cE.notSynchronized,text:n.trim(),syncText:[]}}function Zze(n){let t=n.split(` +Check the top-level render call using <`+pe+">.")}return te}function Gx(x,te){if(!(!x._store||x._store.validated||x.key!=null)){x._store.validated=!0;var pe=jde(te);if(!Px[pe]){Px[pe]=!0;var me="";x&&x._owner&&x._owner!==R.current&&(me=" It was passed a child from "+Ce(x._owner.type)+"."),Hd(x),k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',pe,me),Hd(null)}}}function Fx(x,te){if(typeof x=="object"){if(je(x))for(var pe=0;pe",Ve=" Did you accidentally export a JSX literal instead of a component?"):CA=typeof x,k("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",CA,Ve)}var xA=Qe.apply(this,arguments);if(xA==null)return xA;if(me)for(var Et=2;Et10&&N("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),me._updatedFibers.clear()}}}var Kx=!1,LQ=null;function Wde(x){if(LQ===null)try{var te=("require"+Math.random()).slice(0,7),pe=Ew&&Ew[te];LQ=pe.call(Ew,"timers").setImmediate}catch{LQ=function(Ve){Kx===!1&&(Kx=!0,typeof MessageChannel>"u"&&k("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var TA=new MessageChannel;TA.port1.onmessage=Ve,TA.port2.postMessage(void 0)}}return LQ(x)}var Kd=0,xx=!1;function Yx(x){{var te=Kd;Kd++,T.current===null&&(T.current=[]);var pe=T.isBatchingLegacy,me;try{if(T.isBatchingLegacy=!0,me=x(),!pe&&T.didScheduleLegacyUpdate){var Ve=T.current;Ve!==null&&(T.didScheduleLegacyUpdate=!1,S_(Ve))}}catch(lr){throw UQ(te),lr}finally{T.isBatchingLegacy=pe}if(me!==null&&typeof me=="object"&&typeof me.then=="function"){var TA=me,CA=!1,xA={then:function(lr,Nr){CA=!0,TA.then(function(Oi){UQ(te),Kd===0?y_(Oi,lr,Nr):lr(Oi)},function(Oi){UQ(te),Nr(Oi)})}};return!xx&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){CA||(xx=!0,k("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),xA}else{var Et=me;if(UQ(te),Kd===0){var Ht=T.current;Ht!==null&&(S_(Ht),T.current=null);var Ar={then:function(lr,Nr){T.current===null?(T.current=[],y_(Et,lr,Nr)):lr(Et)}};return Ar}else{var tr={then:function(lr,Nr){lr(Et)}};return tr}}}}function UQ(x){x!==Kd-1&&k("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Kd=x}function y_(x,te,pe){{var me=T.current;if(me!==null)try{S_(me),Wde(function(){me.length===0?(T.current=null,te(x)):y_(x,te,pe)})}catch(Ve){pe(Ve)}else te(x)}}var m_=!1;function S_(x){if(!m_){m_=!0;var te=0;try{for(;te{"use strict";process.env.NODE_ENV==="production"?RG.exports=WZ():RG.exports=ZZ()});var Zl=ee((GSA,s7)=>{"use strict";var bD=$e("crypto"),Cxe=$e("assert");function tn(n){if(!(n instanceof Buffer))throw TypeError(`Expected Buffer instead of: ${n.constructor.name}`);return n}function Bxe(n,t,o){tn(n),tn(t),tn(o);let a=bD.createCipheriv("aes-256-cbc",n,o);return Buffer.concat([a.update(t),a.final()])}function fxe(n,t,o){tn(n),tn(t),tn(o);let a=bD.createDecipheriv("aes-256-cbc",n,o);return Buffer.concat([a.update(t),a.final()])}function _h(n,t){tn(n),tn(t);let o=bD.createHmac("sha256",n);return o.update(t),Buffer.from(o.digest())}function Qxe(n){tn(n);let t=bD.createHash("sha512");return t.update(n),t.digest()}function yxe(n,t,o,a){if(tn(n),tn(t),tn(o),t.byteLength!=32)throw new Error("Got salt of incorrect length");a=a||3,Cxe(a>=1&&a<=3);let e=_h(t,n),i=new Uint8Array(o.byteLength+1+32);i.set(o,32),i[i.length-1]=1;let A=[_h(e,Buffer.from(i.slice(32)))];return a>1&&(i.set(A[A.length-1]),i[i.length-1]=2,A.push(_h(e,Buffer.from(i)))),a>2&&(i.set(A[A.length-1]),i[i.length-1]=3,A.push(_h(e,Buffer.from(i)))),A}function mxe(n,t,o,a){let e=_h(t,n).slice(0,a);if(o.length!==a||e.length!==a)throw new Error("Bad MAC length");if(!o.equals(e))throw new Error("Bad MAC")}s7.exports={deriveSecrets:yxe,decrypt:fxe,encrypt:Bxe,hash:Qxe,calculateMAC:_h,verifyMAC:mxe}});var y7=ee(Wg=>{"use strict";Object.defineProperty(Wg,"__esModule",{value:!0});var FSA=new Uint8Array(16),E7=new Uint8Array(32);E7[0]=9;function hA(n){var t,o=new Float64Array(16);if(n)for(t=0;t>24&255,n[t+1]=o>>16&255,n[t+2]=o>>8&255,n[t+3]=o&255,n[t+4]=a>>24&255,n[t+5]=a>>16&255,n[t+6]=a>>8&255,n[t+7]=a&255}function bxe(n,t,o,a,e){var i,A=0;for(i=0;i>>8)-1}function u7(n,t,o,a){return bxe(n,t,o,a,32)}function oI(n,t){var o;for(o=0;o<16;o++)n[o]=t[o]|0}function IL(n){var t,o,a=1;for(t=0;t<16;t++)o=n[t]+a+65535,a=Math.floor(o/65536),n[t]=o-a*65536;n[0]+=a-1+37*(a-1)}function Th(n,t,o){for(var a,e=~(o-1),i=0;i<16;i++)a=e&(n[i]^t[i]),n[i]^=a,t[i]^=a}function Rh(n,t){var o,a,e,i=hA(),A=hA();for(o=0;o<16;o++)A[o]=t[o];for(IL(A),IL(A),IL(A),a=0;a<2;a++){for(i[0]=A[0]-65517,o=1;o<15;o++)i[o]=A[o]-65535-(i[o-1]>>16&1),i[o-1]&=65535;i[15]=A[15]-32767-(i[14]>>16&1),e=i[15]>>16&1,i[14]&=65535,Th(A,i,1-e)}for(o=0;o<16;o++)n[2*o]=A[o]&255,n[2*o+1]=A[o]>>8}function l7(n,t){var o=new Uint8Array(32),a=new Uint8Array(32);return Rh(o,n),Rh(a,t),u7(o,0,a,0)}function C7(n){var t=new Uint8Array(32);return Rh(t,n),t[0]&1}function EL(n,t){var o;for(o=0;o<16;o++)n[o]=t[2*o]+(t[2*o+1]<<8);n[15]&=32767}function jn(n,t,o){for(var a=0;a<16;a++)n[a]=t[a]+o[a]}function qn(n,t,o){for(var a=0;a<16;a++)n[a]=t[a]-o[a]}function pt(n,t,o){var a,e,i=0,A=0,r=0,s=0,g=0,c=0,I=0,d=0,B=0,f=0,Q=0,y=0,m=0,_=0,T=0,R=0,L=0,U=0,F=0,J=0,V=0,H=0,G=0,q=0,K=0,N=0,k=0,z=0,X=0,ie=0,De=0,oe=o[0],Se=o[1],Be=o[2],Re=o[3],Ne=o[4],Je=o[5],ve=o[6],tA=o[7],fe=o[8],Ie=o[9],Xe=o[10],je=o[11],be=o[12],uA=o[13],EA=o[14],aA=o[15];a=t[0],i+=a*oe,A+=a*Se,r+=a*Be,s+=a*Re,g+=a*Ne,c+=a*Je,I+=a*ve,d+=a*tA,B+=a*fe,f+=a*Ie,Q+=a*Xe,y+=a*je,m+=a*be,_+=a*uA,T+=a*EA,R+=a*aA,a=t[1],A+=a*oe,r+=a*Se,s+=a*Be,g+=a*Re,c+=a*Ne,I+=a*Je,d+=a*ve,B+=a*tA,f+=a*fe,Q+=a*Ie,y+=a*Xe,m+=a*je,_+=a*be,T+=a*uA,R+=a*EA,L+=a*aA,a=t[2],r+=a*oe,s+=a*Se,g+=a*Be,c+=a*Re,I+=a*Ne,d+=a*Je,B+=a*ve,f+=a*tA,Q+=a*fe,y+=a*Ie,m+=a*Xe,_+=a*je,T+=a*be,R+=a*uA,L+=a*EA,U+=a*aA,a=t[3],s+=a*oe,g+=a*Se,c+=a*Be,I+=a*Re,d+=a*Ne,B+=a*Je,f+=a*ve,Q+=a*tA,y+=a*fe,m+=a*Ie,_+=a*Xe,T+=a*je,R+=a*be,L+=a*uA,U+=a*EA,F+=a*aA,a=t[4],g+=a*oe,c+=a*Se,I+=a*Be,d+=a*Re,B+=a*Ne,f+=a*Je,Q+=a*ve,y+=a*tA,m+=a*fe,_+=a*Ie,T+=a*Xe,R+=a*je,L+=a*be,U+=a*uA,F+=a*EA,J+=a*aA,a=t[5],c+=a*oe,I+=a*Se,d+=a*Be,B+=a*Re,f+=a*Ne,Q+=a*Je,y+=a*ve,m+=a*tA,_+=a*fe,T+=a*Ie,R+=a*Xe,L+=a*je,U+=a*be,F+=a*uA,J+=a*EA,V+=a*aA,a=t[6],I+=a*oe,d+=a*Se,B+=a*Be,f+=a*Re,Q+=a*Ne,y+=a*Je,m+=a*ve,_+=a*tA,T+=a*fe,R+=a*Ie,L+=a*Xe,U+=a*je,F+=a*be,J+=a*uA,V+=a*EA,H+=a*aA,a=t[7],d+=a*oe,B+=a*Se,f+=a*Be,Q+=a*Re,y+=a*Ne,m+=a*Je,_+=a*ve,T+=a*tA,R+=a*fe,L+=a*Ie,U+=a*Xe,F+=a*je,J+=a*be,V+=a*uA,H+=a*EA,G+=a*aA,a=t[8],B+=a*oe,f+=a*Se,Q+=a*Be,y+=a*Re,m+=a*Ne,_+=a*Je,T+=a*ve,R+=a*tA,L+=a*fe,U+=a*Ie,F+=a*Xe,J+=a*je,V+=a*be,H+=a*uA,G+=a*EA,q+=a*aA,a=t[9],f+=a*oe,Q+=a*Se,y+=a*Be,m+=a*Re,_+=a*Ne,T+=a*Je,R+=a*ve,L+=a*tA,U+=a*fe,F+=a*Ie,J+=a*Xe,V+=a*je,H+=a*be,G+=a*uA,q+=a*EA,K+=a*aA,a=t[10],Q+=a*oe,y+=a*Se,m+=a*Be,_+=a*Re,T+=a*Ne,R+=a*Je,L+=a*ve,U+=a*tA,F+=a*fe,J+=a*Ie,V+=a*Xe,H+=a*je,G+=a*be,q+=a*uA,K+=a*EA,N+=a*aA,a=t[11],y+=a*oe,m+=a*Se,_+=a*Be,T+=a*Re,R+=a*Ne,L+=a*Je,U+=a*ve,F+=a*tA,J+=a*fe,V+=a*Ie,H+=a*Xe,G+=a*je,q+=a*be,K+=a*uA,N+=a*EA,k+=a*aA,a=t[12],m+=a*oe,_+=a*Se,T+=a*Be,R+=a*Re,L+=a*Ne,U+=a*Je,F+=a*ve,J+=a*tA,V+=a*fe,H+=a*Ie,G+=a*Xe,q+=a*je,K+=a*be,N+=a*uA,k+=a*EA,z+=a*aA,a=t[13],_+=a*oe,T+=a*Se,R+=a*Be,L+=a*Re,U+=a*Ne,F+=a*Je,J+=a*ve,V+=a*tA,H+=a*fe,G+=a*Ie,q+=a*Xe,K+=a*je,N+=a*be,k+=a*uA,z+=a*EA,X+=a*aA,a=t[14],T+=a*oe,R+=a*Se,L+=a*Be,U+=a*Re,F+=a*Ne,J+=a*Je,V+=a*ve,H+=a*tA,G+=a*fe,q+=a*Ie,K+=a*Xe,N+=a*je,k+=a*be,z+=a*uA,X+=a*EA,ie+=a*aA,a=t[15],R+=a*oe,L+=a*Se,U+=a*Be,F+=a*Re,J+=a*Ne,V+=a*Je,H+=a*ve,G+=a*tA,q+=a*fe,K+=a*Ie,N+=a*Xe,k+=a*je,z+=a*be,X+=a*uA,ie+=a*EA,De+=a*aA,i+=38*L,A+=38*U,r+=38*F,s+=38*J,g+=38*V,c+=38*H,I+=38*G,d+=38*q,B+=38*K,f+=38*N,Q+=38*k,y+=38*z,m+=38*X,_+=38*ie,T+=38*De,e=1,a=i+e+65535,e=Math.floor(a/65536),i=a-e*65536,a=A+e+65535,e=Math.floor(a/65536),A=a-e*65536,a=r+e+65535,e=Math.floor(a/65536),r=a-e*65536,a=s+e+65535,e=Math.floor(a/65536),s=a-e*65536,a=g+e+65535,e=Math.floor(a/65536),g=a-e*65536,a=c+e+65535,e=Math.floor(a/65536),c=a-e*65536,a=I+e+65535,e=Math.floor(a/65536),I=a-e*65536,a=d+e+65535,e=Math.floor(a/65536),d=a-e*65536,a=B+e+65535,e=Math.floor(a/65536),B=a-e*65536,a=f+e+65535,e=Math.floor(a/65536),f=a-e*65536,a=Q+e+65535,e=Math.floor(a/65536),Q=a-e*65536,a=y+e+65535,e=Math.floor(a/65536),y=a-e*65536,a=m+e+65535,e=Math.floor(a/65536),m=a-e*65536,a=_+e+65535,e=Math.floor(a/65536),_=a-e*65536,a=T+e+65535,e=Math.floor(a/65536),T=a-e*65536,a=R+e+65535,e=Math.floor(a/65536),R=a-e*65536,i+=e-1+37*(e-1),e=1,a=i+e+65535,e=Math.floor(a/65536),i=a-e*65536,a=A+e+65535,e=Math.floor(a/65536),A=a-e*65536,a=r+e+65535,e=Math.floor(a/65536),r=a-e*65536,a=s+e+65535,e=Math.floor(a/65536),s=a-e*65536,a=g+e+65535,e=Math.floor(a/65536),g=a-e*65536,a=c+e+65535,e=Math.floor(a/65536),c=a-e*65536,a=I+e+65535,e=Math.floor(a/65536),I=a-e*65536,a=d+e+65535,e=Math.floor(a/65536),d=a-e*65536,a=B+e+65535,e=Math.floor(a/65536),B=a-e*65536,a=f+e+65535,e=Math.floor(a/65536),f=a-e*65536,a=Q+e+65535,e=Math.floor(a/65536),Q=a-e*65536,a=y+e+65535,e=Math.floor(a/65536),y=a-e*65536,a=m+e+65535,e=Math.floor(a/65536),m=a-e*65536,a=_+e+65535,e=Math.floor(a/65536),_=a-e*65536,a=T+e+65535,e=Math.floor(a/65536),T=a-e*65536,a=R+e+65535,e=Math.floor(a/65536),R=a-e*65536,i+=e-1+37*(e-1),n[0]=i,n[1]=A,n[2]=r,n[3]=s,n[4]=g,n[5]=c,n[6]=I,n[7]=d,n[8]=B,n[9]=f,n[10]=Q,n[11]=y,n[12]=m,n[13]=_,n[14]=T,n[15]=R}function Jn(n,t){pt(n,t,t)}function uL(n,t){var o=hA(),a;for(a=0;a<16;a++)o[a]=t[a];for(a=253;a>=0;a--)Jn(o,o),a!==2&&a!==4&&pt(o,o,t);for(a=0;a<16;a++)n[a]=o[a]}function Mxe(n,t){var o=hA(),a;for(a=0;a<16;a++)o[a]=t[a];for(a=250;a>=0;a--)Jn(o,o),a!==1&&pt(o,o,t);for(a=0;a<16;a++)n[a]=o[a]}function B7(n,t,o){var a=new Uint8Array(32),e=new Float64Array(80),i,A,r=hA(),s=hA(),g=hA(),c=hA(),I=hA(),d=hA();for(A=0;A<31;A++)a[A]=t[A];for(a[31]=t[31]&127|64,a[0]&=248,EL(e,o),A=0;A<16;A++)s[A]=e[A],c[A]=r[A]=g[A]=0;for(r[0]=c[0]=1,A=254;A>=0;--A)i=a[A>>>3]>>>(A&7)&1,Th(r,s,i),Th(g,c,i),jn(I,r,g),qn(r,r,g),jn(g,s,c),qn(s,s,c),Jn(c,I),Jn(d,r),pt(r,g,r),pt(g,s,I),jn(I,r,g),qn(r,r,g),Jn(s,r),qn(g,c,d),pt(r,g,Sxe),jn(r,r,c),pt(g,g,r),pt(r,c,d),pt(c,s,e),Jn(s,I),Th(r,s,i),Th(g,c,i);for(A=0;A<16;A++)e[A+16]=r[A],e[A+32]=g[A],e[A+48]=s[A],e[A+64]=c[A];var B=e.subarray(32),f=e.subarray(16);return uL(B,B),pt(f,f,B),Rh(n,f),0}function _xe(n,t){return B7(n,t,E7)}var d7=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function p7(n,t,o,a){for(var e=new Int32Array(16),i=new Int32Array(16),A,r,s,g,c,I,d,B,f,Q,y,m,_,T,R,L,U,F,J,V,H,G,q,K,N,k,z=n[0],X=n[1],ie=n[2],De=n[3],oe=n[4],Se=n[5],Be=n[6],Re=n[7],Ne=t[0],Je=t[1],ve=t[2],tA=t[3],fe=t[4],Ie=t[5],Xe=t[6],je=t[7],be=0;a>=128;){for(J=0;J<16;J++)V=8*J+be,e[J]=o[V+0]<<24|o[V+1]<<16|o[V+2]<<8|o[V+3],i[J]=o[V+4]<<24|o[V+5]<<16|o[V+6]<<8|o[V+7];for(J=0;J<80;J++)if(A=z,r=X,s=ie,g=De,c=oe,I=Se,d=Be,B=Re,f=Ne,Q=Je,y=ve,m=tA,_=fe,T=Ie,R=Xe,L=je,H=Re,G=je,q=G&65535,K=G>>>16,N=H&65535,k=H>>>16,H=(oe>>>14|fe<<18)^(oe>>>18|fe<<14)^(fe>>>9|oe<<23),G=(fe>>>14|oe<<18)^(fe>>>18|oe<<14)^(oe>>>9|fe<<23),q+=G&65535,K+=G>>>16,N+=H&65535,k+=H>>>16,H=oe&Se^~oe&Be,G=fe&Ie^~fe&Xe,q+=G&65535,K+=G>>>16,N+=H&65535,k+=H>>>16,H=d7[J*2],G=d7[J*2+1],q+=G&65535,K+=G>>>16,N+=H&65535,k+=H>>>16,H=e[J%16],G=i[J%16],q+=G&65535,K+=G>>>16,N+=H&65535,k+=H>>>16,K+=q>>>16,N+=K>>>16,k+=N>>>16,U=N&65535|k<<16,F=q&65535|K<<16,H=U,G=F,q=G&65535,K=G>>>16,N=H&65535,k=H>>>16,H=(z>>>28|Ne<<4)^(Ne>>>2|z<<30)^(Ne>>>7|z<<25),G=(Ne>>>28|z<<4)^(z>>>2|Ne<<30)^(z>>>7|Ne<<25),q+=G&65535,K+=G>>>16,N+=H&65535,k+=H>>>16,H=z&X^z&ie^X&ie,G=Ne&Je^Ne&ve^Je&ve,q+=G&65535,K+=G>>>16,N+=H&65535,k+=H>>>16,K+=q>>>16,N+=K>>>16,k+=N>>>16,B=N&65535|k<<16,L=q&65535|K<<16,H=g,G=m,q=G&65535,K=G>>>16,N=H&65535,k=H>>>16,H=U,G=F,q+=G&65535,K+=G>>>16,N+=H&65535,k+=H>>>16,K+=q>>>16,N+=K>>>16,k+=N>>>16,g=N&65535|k<<16,m=q&65535|K<<16,X=A,ie=r,De=s,oe=g,Se=c,Be=I,Re=d,z=B,Je=f,ve=Q,tA=y,fe=m,Ie=_,Xe=T,je=R,Ne=L,J%16===15)for(V=0;V<16;V++)H=e[V],G=i[V],q=G&65535,K=G>>>16,N=H&65535,k=H>>>16,H=e[(V+9)%16],G=i[(V+9)%16],q+=G&65535,K+=G>>>16,N+=H&65535,k+=H>>>16,U=e[(V+1)%16],F=i[(V+1)%16],H=(U>>>1|F<<31)^(U>>>8|F<<24)^U>>>7,G=(F>>>1|U<<31)^(F>>>8|U<<24)^(F>>>7|U<<25),q+=G&65535,K+=G>>>16,N+=H&65535,k+=H>>>16,U=e[(V+14)%16],F=i[(V+14)%16],H=(U>>>19|F<<13)^(F>>>29|U<<3)^U>>>6,G=(F>>>19|U<<13)^(U>>>29|F<<3)^(F>>>6|U<<26),q+=G&65535,K+=G>>>16,N+=H&65535,k+=H>>>16,K+=q>>>16,N+=K>>>16,k+=N>>>16,e[V]=N&65535|k<<16,i[V]=q&65535|K<<16;H=z,G=Ne,q=G&65535,K=G>>>16,N=H&65535,k=H>>>16,H=n[0],G=t[0],q+=G&65535,K+=G>>>16,N+=H&65535,k+=H>>>16,K+=q>>>16,N+=K>>>16,k+=N>>>16,n[0]=z=N&65535|k<<16,t[0]=Ne=q&65535|K<<16,H=X,G=Je,q=G&65535,K=G>>>16,N=H&65535,k=H>>>16,H=n[1],G=t[1],q+=G&65535,K+=G>>>16,N+=H&65535,k+=H>>>16,K+=q>>>16,N+=K>>>16,k+=N>>>16,n[1]=X=N&65535|k<<16,t[1]=Je=q&65535|K<<16,H=ie,G=ve,q=G&65535,K=G>>>16,N=H&65535,k=H>>>16,H=n[2],G=t[2],q+=G&65535,K+=G>>>16,N+=H&65535,k+=H>>>16,K+=q>>>16,N+=K>>>16,k+=N>>>16,n[2]=ie=N&65535|k<<16,t[2]=ve=q&65535|K<<16,H=De,G=tA,q=G&65535,K=G>>>16,N=H&65535,k=H>>>16,H=n[3],G=t[3],q+=G&65535,K+=G>>>16,N+=H&65535,k+=H>>>16,K+=q>>>16,N+=K>>>16,k+=N>>>16,n[3]=De=N&65535|k<<16,t[3]=tA=q&65535|K<<16,H=oe,G=fe,q=G&65535,K=G>>>16,N=H&65535,k=H>>>16,H=n[4],G=t[4],q+=G&65535,K+=G>>>16,N+=H&65535,k+=H>>>16,K+=q>>>16,N+=K>>>16,k+=N>>>16,n[4]=oe=N&65535|k<<16,t[4]=fe=q&65535|K<<16,H=Se,G=Ie,q=G&65535,K=G>>>16,N=H&65535,k=H>>>16,H=n[5],G=t[5],q+=G&65535,K+=G>>>16,N+=H&65535,k+=H>>>16,K+=q>>>16,N+=K>>>16,k+=N>>>16,n[5]=Se=N&65535|k<<16,t[5]=Ie=q&65535|K<<16,H=Be,G=Xe,q=G&65535,K=G>>>16,N=H&65535,k=H>>>16,H=n[6],G=t[6],q+=G&65535,K+=G>>>16,N+=H&65535,k+=H>>>16,K+=q>>>16,N+=K>>>16,k+=N>>>16,n[6]=Be=N&65535|k<<16,t[6]=Xe=q&65535|K<<16,H=Re,G=je,q=G&65535,K=G>>>16,N=H&65535,k=H>>>16,H=n[7],G=t[7],q+=G&65535,K+=G>>>16,N+=H&65535,k+=H>>>16,K+=q>>>16,N+=K>>>16,k+=N>>>16,n[7]=Re=N&65535|k<<16,t[7]=je=q&65535|K<<16,be+=128,a-=128}return a}function HB(n,t,o){var a=new Int32Array(8),e=new Int32Array(8),i=new Uint8Array(256),A,r=o;for(a[0]=1779033703,a[1]=3144134277,a[2]=1013904242,a[3]=2773480762,a[4]=1359893119,a[5]=2600822924,a[6]=528734635,a[7]=1541459225,e[0]=4089235720,e[1]=2227873595,e[2]=4271175723,e[3]=1595750129,e[4]=2917565137,e[5]=725511199,e[6]=4215389547,e[7]=327033209,p7(a,e,t,o),o%=128,A=0;A=0;--e)a=o[e/8|0]>>(e&7)&1,h7(n,t,a),pL(t,n),pL(n,n),h7(n,t,a)}function _D(n,t){var o=[hA(),hA(),hA(),hA()];oI(o[0],g7),oI(o[1],c7),oI(o[2],Nh),pt(o[3],g7,c7),f7(n,o,t)}var lL=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function CL(n,t){var o,a,e,i;for(a=63;a>=32;--a){for(o=0,e=a-32,i=a-12;e>8,t[e]-=o*256;t[e]+=o,t[a]=0}for(o=0,e=0;e<32;e++)t[e]+=o-(t[31]>>4)*lL[e],o=t[e]>>8,t[e]&=255;for(e=0;e<32;e++)t[e]-=o*lL[e];for(a=0;a<32;a++)t[a+1]+=t[a]>>8,n[a]=t[a]&255}function KB(n){var t=new Float64Array(64),o;for(o=0;o<64;o++)t[o]=n[o];for(o=0;o<64;o++)n[o]=0;CL(n,t)}function Txe(n,t,o,a){var e=new Uint8Array(64),i=new Uint8Array(64),A,r,s=new Float64Array(64),g=[hA(),hA(),hA(),hA()];for(A=0;A>7&&qn(n[0],dL,n[0]),pt(n[3],n[0],n[1]),0)}function kxe(n,t,o,a){var e,i,A=new Uint8Array(32),r=new Uint8Array(64),s=[hA(),hA(),hA(),hA()],g=[hA(),hA(),hA(),hA()];if(i=-1,o<64||Rxe(g,a))return-1;for(e=0;e=0}Wg.verify=Uxe;function Hxe(n){if(nI(n),n.length!==32)throw new Error("wrong seed length");for(var t=new Uint8Array(32),o=new Uint8Array(32),a=0;a<32;a++)t[a]=n[a];return _xe(o,t),t[0]&=248,t[31]&=127,t[31]|=64,o[31]&=127,{public:o,private:t}}Wg.generateKeyPair=Hxe;Wg.default={}});var sI=ee(vh=>{"use strict";var xB=y7(),kh=$e("crypto"),BL=Buffer.from([48,42,48,5,6,3,43,101,110,3,33,0]),fL=Buffer.from([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]),Kxe=Buffer.from([5]),QL=function(n){return Buffer.concat([Kxe,n])};function m7(n){if(n===void 0)throw new Error("Undefined private key");if(!(n instanceof Buffer))throw new Error(`Invalid private key type: ${n.constructor.name}`);if(n.byteLength!=32)throw new Error(`Incorrect private key length: ${n.byteLength}`)}function S7(n){if(!(n instanceof Buffer))throw new Error(`Invalid public key type: ${n.constructor.name}`);if(n===void 0||(n.byteLength!=33||n[0]!=5)&&n.byteLength!=32)throw new Error("Invalid public key");return n.byteLength==33?n.slice(1):(console.error("WARNING: Expected pubkey of length 33, please report the ST and client that generated the pubkey"),n)}function xxe(n){let t=new Uint8Array(n);return t[0]|=6,t[31]|=128,t[31]&=-65,t}vh.getPublicFromPrivateKey=function(n){let t=xxe(n),o=xB.generateKeyPair(t);return QL(Buffer.from(o.public))};vh.generateKeyPair=function(){try{let{publicKey:n,privateKey:t}=kh.generateKeyPairSync("x25519",{publicKeyEncoding:{format:"der",type:"spki"},privateKeyEncoding:{format:"der",type:"pkcs8"}}),o=n.slice(BL.length,BL.length+32),a=t.slice(fL.length,fL.length+32);return{pubKey:QL(o),privKey:a}}catch{let t=xB.generateKeyPair(kh.randomBytes(32));return{privKey:Buffer.from(t.private),pubKey:QL(Buffer.from(t.public))}}};vh.calculateAgreement=function(n,t){if(n=S7(n),m7(t),!n||n.byteLength!=32)throw new Error("Invalid public key");if(typeof kh.diffieHellman=="function"){let o=kh.createPrivateKey({key:Buffer.concat([fL,t]),format:"der",type:"pkcs8"}),a=kh.createPublicKey({key:Buffer.concat([BL,n]),format:"der",type:"spki"});return kh.diffieHellman({privateKey:o,publicKey:a})}else{let o=xB.sharedKey(t,n);return Buffer.from(o)}};vh.calculateSignature=function(n,t){if(m7(n),!t)throw new Error("Invalid message");return Buffer.from(xB.sign(n,t))};vh.verifySignature=function(n,t,o,a){if(n=S7(n),!n||n.byteLength!=32)throw new Error("Invalid public key");if(!t)throw new Error("Invalid message");if(!o||o.byteLength!=64)throw new Error("Invalid signature");return a?!0:xB.verify(n,t,o)}});var D7=ee(YB=>{var TD=sI(),Yxe=$e("crypto");function w7(n){return typeof n=="number"&&n%1===0&&n>=0}YB.generateIdentityKeyPair=TD.generateKeyPair;YB.generateRegistrationId=function(){var n=Uint16Array.from(Yxe.randomBytes(2))[0];return n&16383};YB.generateSignedPreKey=function(n,t){if(!(n.privKey instanceof Buffer)||n.privKey.byteLength!=32||!(n.pubKey instanceof Buffer)||n.pubKey.byteLength!=33)throw new TypeError("Invalid argument for identityKeyPair");if(!w7(t))throw new TypeError("Invalid argument for signedKeyId: "+t);let o=TD.generateKeyPair(),a=TD.calculateSignature(n.privKey,o.pubKey);return{keyId:t,keyPair:o,signature:a}};YB.generatePreKey=function(n){if(!w7(n))throw new TypeError("Invalid argument for keyId: "+n);let t=TD.generateKeyPair();return{keyId:n,keyPair:t}}});var mL=ee((KSA,O7)=>{var yL=class n{static from(t){if(typeof t!="string"||!t.match(/.*\.\d+/))throw new Error("Invalid address encoding");let o=t.split(".");return new this(o[0],parseInt(o[1]))}constructor(t,o){if(typeof t!="string")throw new TypeError("id required for addr");if(t.indexOf(".")!==-1)throw new TypeError("encoded addr detected");if(this.id=t,typeof o!="number")throw new TypeError("number required for deviceId");this.deviceId=o}toString(){return`${this.id}.${this.deviceId}`}is(t){return t instanceof n?t.id===this.id&&t.deviceId===this.deviceId:!1}};O7.exports=yL});var SL=ee((xSA,b7)=>{var jxe={OURS:1,THEIRS:2};b7.exports=jxe});var wL=ee((YSA,M7)=>{var Jxe={SENDING:1,RECEIVING:2};M7.exports=Jxe});var vD=ee((jSA,T7)=>{var qxe=SL(),zxe=40,_7="v1";function RD(n){if(!Buffer.isBuffer(n))throw new TypeError("Buffer required")}var kD=class{constructor(){this._chains={}}toString(){return``}inspect(){return this.toString()}addChain(t,o){RD(t);let a=t.toString("base64");if(this._chains.hasOwnProperty(a))throw new Error("Overwrite attempt");this._chains[a]=o}getChain(t){return RD(t),this._chains[t.toString("base64")]}deleteChain(t){RD(t);let o=t.toString("base64");if(!this._chains.hasOwnProperty(o))throw new ReferenceError("Not Found");delete this._chains[o]}*chains(){for(let[t,o]of Object.entries(this._chains))yield[Buffer.from(t,"base64"),o]}serialize(){let t={registrationId:this.registrationId,currentRatchet:{ephemeralKeyPair:{pubKey:this.currentRatchet.ephemeralKeyPair.pubKey.toString("base64"),privKey:this.currentRatchet.ephemeralKeyPair.privKey.toString("base64")},lastRemoteEphemeralKey:this.currentRatchet.lastRemoteEphemeralKey.toString("base64"),previousCounter:this.currentRatchet.previousCounter,rootKey:this.currentRatchet.rootKey.toString("base64")},indexInfo:{baseKey:this.indexInfo.baseKey.toString("base64"),baseKeyType:this.indexInfo.baseKeyType,closed:this.indexInfo.closed,used:this.indexInfo.used,created:this.indexInfo.created,remoteIdentityKey:this.indexInfo.remoteIdentityKey.toString("base64")},_chains:this._serialize_chains(this._chains)};return this.pendingPreKey&&(t.pendingPreKey=Object.assign({},this.pendingPreKey),t.pendingPreKey.baseKey=this.pendingPreKey.baseKey.toString("base64")),t}static deserialize(t){let o=new this;return o.registrationId=t.registrationId,o.currentRatchet={ephemeralKeyPair:{pubKey:Buffer.from(t.currentRatchet.ephemeralKeyPair.pubKey,"base64"),privKey:Buffer.from(t.currentRatchet.ephemeralKeyPair.privKey,"base64")},lastRemoteEphemeralKey:Buffer.from(t.currentRatchet.lastRemoteEphemeralKey,"base64"),previousCounter:t.currentRatchet.previousCounter,rootKey:Buffer.from(t.currentRatchet.rootKey,"base64")},o.indexInfo={baseKey:Buffer.from(t.indexInfo.baseKey,"base64"),baseKeyType:t.indexInfo.baseKeyType,closed:t.indexInfo.closed,used:t.indexInfo.used,created:t.indexInfo.created,remoteIdentityKey:Buffer.from(t.indexInfo.remoteIdentityKey,"base64")},o._chains=this._deserialize_chains(t._chains),t.pendingPreKey&&(o.pendingPreKey=Object.assign({},t.pendingPreKey),o.pendingPreKey.baseKey=Buffer.from(t.pendingPreKey.baseKey,"base64")),o}_serialize_chains(t){let o={};for(let a of Object.keys(t)){let e=t[a],i={};for(let[A,r]of Object.entries(e.messageKeys))i[A]=r.toString("base64");o[a]={chainKey:{counter:e.chainKey.counter,key:e.chainKey.key&&e.chainKey.key.toString("base64")},chainType:e.chainType,messageKeys:i}}return o}static _deserialize_chains(t){let o={};for(let a of Object.keys(t)){let e=t[a],i={};for(let[A,r]of Object.entries(e.messageKeys))i[A]=Buffer.from(r,"base64");o[a]={chainKey:{counter:e.chainKey.counter,key:e.chainKey.key&&Buffer.from(e.chainKey.key,"base64")},chainType:e.chainType,messageKeys:i}}return o}},ND=[{version:"v1",migrate:function(t){let o=t._sessions;if(t.registrationId)for(let a in o)o[a].registrationId||(o[a].registrationId=t.registrationId);else for(let a in o)o[a].indexInfo.closed===-1&&console.error("V1 session storage migration error: registrationId",t.registrationId,"for open session version",t.version)}}],DL=class{static createEntry(){return new kD}static migrate(t){let o=t.version===void 0;for(let a=0;a{let a=t.indexInfo.used||0,e=o.indexInfo.used||0;return a===e?0:azxe;){let t,o;for(let[a,e]of Object.entries(this.sessions))e.indexInfo.closed!==-1&&(!o||e.indexInfo.closed{Us.SignalError=class extends Error{};Us.UntrustedIdentityKeyError=class extends Us.SignalError{constructor(t,o){super(),this.name="UntrustedIdentityKeyError",this.addr=t,this.identityKey=o}};Us.SessionError=class extends Us.SignalError{constructor(t){super(t),this.name="SessionError"}};Us.MessageCounterError=class extends Us.SessionError{constructor(t){super(t),this.name="MessageCounterError"}};Us.PreKeyError=class extends Us.SessionError{constructor(t){super(t),this.name="PreKeyError"}}});var OL=ee((XSA,R7)=>{"use strict";var GD=new Map,N7=1e4;async function Vxe(n,t){let o=0;for(;;){let a=Math.min(n.length,N7);for(let e=o;e=N7?(n.splice(0,a),o=0):o=a;else break}t()}R7.exports=function(n,t){t.name||(Object.defineProperty(t,"name",{writable:!0}),typeof n=="string"?t.name=n:console.warn("Unhandled bucket type (for naming):",typeof n,n));let o;GD.has(n)||(GD.set(n,[]),o=!0);let a=GD.get(n),e=new Promise((i,A)=>a.push({awaitable:t,resolve:i,reject:A}));return o&&Vxe(a,()=>GD.delete(n)),e}});var ML=ee(($SA,G7)=>{"use strict";var k7=SL(),Wxe=wL(),v7=vD(),P7=Zl(),gI=sI(),FD=PD(),Zxe=OL(),bL=class{constructor(t,o){this.addr=o,this.storage=t}async initOutgoing(t){let o=this.addr.toString();return await Zxe(o,async()=>{if(!await this.storage.isTrustedIdentity(this.addr.id,t.identityKey))throw new FD.UntrustedIdentityKeyError(this.addr.id,t.identityKey);gI.verifySignature(t.identityKey,t.signedPreKey.publicKey,t.signedPreKey.signature,!0);let a=gI.generateKeyPair(),e=t.preKey&&t.preKey.publicKey,i=await this.initSession(!0,a,void 0,t.identityKey,e,t.signedPreKey.publicKey,t.registrationId);i.pendingPreKey={signedKeyId:t.signedPreKey.keyId,baseKey:a.pubKey},t.preKey&&(i.pendingPreKey.preKeyId=t.preKey.keyId);let A=await this.storage.loadSession(o);if(!A)A=new v7;else{let r=A.getOpenSession();r&&A.closeSession(r)}A.setSession(i),await this.storage.storeSession(o,A)})}async initIncoming(t,o){let a=this.addr.toString();if(!await this.storage.isTrustedIdentity(a,o.identityKey))throw new FD.UntrustedIdentityKeyError(this.addr.id,o.identityKey);if(t.getSession(o.baseKey))return;let e=await this.storage.loadPreKey(o.preKeyId);if(o.preKeyId&&!e)throw new FD.PreKeyError("Invalid PreKey ID");let i=await this.storage.loadSignedPreKey(o.signedPreKeyId);if(!i)throw new FD.PreKeyError("Missing SignedPreKey");let A=t.getOpenSession();return A&&(console.warn("Closing open session in favor of incoming prekey bundle"),t.closeSession(A)),t.setSession(await this.initSession(!1,e,i,o.identityKey,o.baseKey,void 0,o.registrationId)),o.preKeyId}async initSession(t,o,a,e,i,A,r){if(t){if(a)throw new Error("Invalid call to initSession");a=o}else{if(A)throw new Error("Invalid call to initSession");A=i}let s;!o||!i?s=new Uint8Array(128):s=new Uint8Array(160);for(var g=0;g<32;g++)s[g]=255;let c=await this.storage.getOurIdentity(),I=gI.calculateAgreement(A,c.privKey),d=gI.calculateAgreement(e,a.privKey),B=gI.calculateAgreement(A,a.privKey);if(t?(s.set(new Uint8Array(I),32),s.set(new Uint8Array(d),64)):(s.set(new Uint8Array(I),64),s.set(new Uint8Array(d),32)),s.set(new Uint8Array(B),96),o&&i){let y=gI.calculateAgreement(i,o.privKey);s.set(new Uint8Array(y),128)}let f=P7.deriveSecrets(Buffer.from(s),Buffer.alloc(32),Buffer.from("WhisperText")),Q=v7.createEntry();return Q.registrationId=r,Q.currentRatchet={rootKey:f[0],ephemeralKeyPair:t?gI.generateKeyPair():a,lastRemoteEphemeralKey:A,previousCounter:0},Q.indexInfo={created:Date.now(),used:Date.now(),remoteIdentityKey:e,baseKey:t?o.pubKey:i,baseKeyType:t?k7.OURS:k7.THEIRS,closed:-1},t&&this.calculateSendingRatchet(Q,A),Q}calculateSendingRatchet(t,o){let a=t.currentRatchet,e=gI.calculateAgreement(o,a.ephemeralKeyPair.privKey),i=P7.deriveSecrets(e,a.rootKey,Buffer.from("WhisperRatchet"));t.addChain(a.ephemeralKeyPair.pubKey,{messageKeys:{},chainKey:{counter:-1,key:i[1]},chainType:Wxe.SENDING}),a.rootKey=i[0]}};G7.exports=bL});var L7=ee((ewA,F7)=>{"use strict";var cI=CS(),rn=cI.Reader,_L=cI.Writer,nA=cI.util,zn=cI.roots.default||(cI.roots.default={});zn.textsecure=(function(){var n={};return n.WhisperMessage=(function(){function t(o){if(o)for(var a=Object.keys(o),e=0;e>>3){case 1:A.ephemeralKey=a.bytes();break;case 2:A.counter=a.uint32();break;case 3:A.previousCounter=a.uint32();break;case 4:A.ciphertext=a.bytes();break;default:a.skipType(r&7);break}}return A},t.decodeDelimited=function(a){return a instanceof rn||(a=new rn(a)),this.decode(a,a.uint32())},t.verify=function(a){return typeof a!="object"||a===null?"object expected":a.ephemeralKey!=null&&a.hasOwnProperty("ephemeralKey")&&!(a.ephemeralKey&&typeof a.ephemeralKey.length=="number"||nA.isString(a.ephemeralKey))?"ephemeralKey: buffer expected":a.counter!=null&&a.hasOwnProperty("counter")&&!nA.isInteger(a.counter)?"counter: integer expected":a.previousCounter!=null&&a.hasOwnProperty("previousCounter")&&!nA.isInteger(a.previousCounter)?"previousCounter: integer expected":a.ciphertext!=null&&a.hasOwnProperty("ciphertext")&&!(a.ciphertext&&typeof a.ciphertext.length=="number"||nA.isString(a.ciphertext))?"ciphertext: buffer expected":null},t.fromObject=function(a){if(a instanceof zn.textsecure.WhisperMessage)return a;var e=new zn.textsecure.WhisperMessage;return a.ephemeralKey!=null&&(typeof a.ephemeralKey=="string"?nA.base64.decode(a.ephemeralKey,e.ephemeralKey=nA.newBuffer(nA.base64.length(a.ephemeralKey)),0):a.ephemeralKey.length&&(e.ephemeralKey=a.ephemeralKey)),a.counter!=null&&(e.counter=a.counter>>>0),a.previousCounter!=null&&(e.previousCounter=a.previousCounter>>>0),a.ciphertext!=null&&(typeof a.ciphertext=="string"?nA.base64.decode(a.ciphertext,e.ciphertext=nA.newBuffer(nA.base64.length(a.ciphertext)),0):a.ciphertext.length&&(e.ciphertext=a.ciphertext)),e},t.toObject=function(a,e){e||(e={});var i={};return e.defaults&&(e.bytes===String?i.ephemeralKey="":(i.ephemeralKey=[],e.bytes!==Array&&(i.ephemeralKey=nA.newBuffer(i.ephemeralKey))),i.counter=0,i.previousCounter=0,e.bytes===String?i.ciphertext="":(i.ciphertext=[],e.bytes!==Array&&(i.ciphertext=nA.newBuffer(i.ciphertext)))),a.ephemeralKey!=null&&a.hasOwnProperty("ephemeralKey")&&(i.ephemeralKey=e.bytes===String?nA.base64.encode(a.ephemeralKey,0,a.ephemeralKey.length):e.bytes===Array?Array.prototype.slice.call(a.ephemeralKey):a.ephemeralKey),a.counter!=null&&a.hasOwnProperty("counter")&&(i.counter=a.counter),a.previousCounter!=null&&a.hasOwnProperty("previousCounter")&&(i.previousCounter=a.previousCounter),a.ciphertext!=null&&a.hasOwnProperty("ciphertext")&&(i.ciphertext=e.bytes===String?nA.base64.encode(a.ciphertext,0,a.ciphertext.length):e.bytes===Array?Array.prototype.slice.call(a.ciphertext):a.ciphertext),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,cI.util.toJSONOptions)},t})(),n.PreKeyWhisperMessage=(function(){function t(o){if(o)for(var a=Object.keys(o),e=0;e>>3){case 5:A.registrationId=a.uint32();break;case 1:A.preKeyId=a.uint32();break;case 6:A.signedPreKeyId=a.uint32();break;case 2:A.baseKey=a.bytes();break;case 3:A.identityKey=a.bytes();break;case 4:A.message=a.bytes();break;default:a.skipType(r&7);break}}return A},t.decodeDelimited=function(a){return a instanceof rn||(a=new rn(a)),this.decode(a,a.uint32())},t.verify=function(a){return typeof a!="object"||a===null?"object expected":a.registrationId!=null&&a.hasOwnProperty("registrationId")&&!nA.isInteger(a.registrationId)?"registrationId: integer expected":a.preKeyId!=null&&a.hasOwnProperty("preKeyId")&&!nA.isInteger(a.preKeyId)?"preKeyId: integer expected":a.signedPreKeyId!=null&&a.hasOwnProperty("signedPreKeyId")&&!nA.isInteger(a.signedPreKeyId)?"signedPreKeyId: integer expected":a.baseKey!=null&&a.hasOwnProperty("baseKey")&&!(a.baseKey&&typeof a.baseKey.length=="number"||nA.isString(a.baseKey))?"baseKey: buffer expected":a.identityKey!=null&&a.hasOwnProperty("identityKey")&&!(a.identityKey&&typeof a.identityKey.length=="number"||nA.isString(a.identityKey))?"identityKey: buffer expected":a.message!=null&&a.hasOwnProperty("message")&&!(a.message&&typeof a.message.length=="number"||nA.isString(a.message))?"message: buffer expected":null},t.fromObject=function(a){if(a instanceof zn.textsecure.PreKeyWhisperMessage)return a;var e=new zn.textsecure.PreKeyWhisperMessage;return a.registrationId!=null&&(e.registrationId=a.registrationId>>>0),a.preKeyId!=null&&(e.preKeyId=a.preKeyId>>>0),a.signedPreKeyId!=null&&(e.signedPreKeyId=a.signedPreKeyId>>>0),a.baseKey!=null&&(typeof a.baseKey=="string"?nA.base64.decode(a.baseKey,e.baseKey=nA.newBuffer(nA.base64.length(a.baseKey)),0):a.baseKey.length&&(e.baseKey=a.baseKey)),a.identityKey!=null&&(typeof a.identityKey=="string"?nA.base64.decode(a.identityKey,e.identityKey=nA.newBuffer(nA.base64.length(a.identityKey)),0):a.identityKey.length&&(e.identityKey=a.identityKey)),a.message!=null&&(typeof a.message=="string"?nA.base64.decode(a.message,e.message=nA.newBuffer(nA.base64.length(a.message)),0):a.message.length&&(e.message=a.message)),e},t.toObject=function(a,e){e||(e={});var i={};return e.defaults&&(i.preKeyId=0,e.bytes===String?i.baseKey="":(i.baseKey=[],e.bytes!==Array&&(i.baseKey=nA.newBuffer(i.baseKey))),e.bytes===String?i.identityKey="":(i.identityKey=[],e.bytes!==Array&&(i.identityKey=nA.newBuffer(i.identityKey))),e.bytes===String?i.message="":(i.message=[],e.bytes!==Array&&(i.message=nA.newBuffer(i.message))),i.registrationId=0,i.signedPreKeyId=0),a.preKeyId!=null&&a.hasOwnProperty("preKeyId")&&(i.preKeyId=a.preKeyId),a.baseKey!=null&&a.hasOwnProperty("baseKey")&&(i.baseKey=e.bytes===String?nA.base64.encode(a.baseKey,0,a.baseKey.length):e.bytes===Array?Array.prototype.slice.call(a.baseKey):a.baseKey),a.identityKey!=null&&a.hasOwnProperty("identityKey")&&(i.identityKey=e.bytes===String?nA.base64.encode(a.identityKey,0,a.identityKey.length):e.bytes===Array?Array.prototype.slice.call(a.identityKey):a.identityKey),a.message!=null&&a.hasOwnProperty("message")&&(i.message=e.bytes===String?nA.base64.encode(a.message,0,a.message.length):e.bytes===Array?Array.prototype.slice.call(a.message):a.message),a.registrationId!=null&&a.hasOwnProperty("registrationId")&&(i.registrationId=a.registrationId),a.signedPreKeyId!=null&&a.hasOwnProperty("signedPreKeyId")&&(i.signedPreKeyId=a.signedPreKeyId),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,cI.util.toJSONOptions)},t})(),n.KeyExchangeMessage=(function(){function t(o){if(o)for(var a=Object.keys(o),e=0;e>>3){case 1:A.id=a.uint32();break;case 2:A.baseKey=a.bytes();break;case 3:A.ephemeralKey=a.bytes();break;case 4:A.identityKey=a.bytes();break;case 5:A.baseKeySignature=a.bytes();break;default:a.skipType(r&7);break}}return A},t.decodeDelimited=function(a){return a instanceof rn||(a=new rn(a)),this.decode(a,a.uint32())},t.verify=function(a){return typeof a!="object"||a===null?"object expected":a.id!=null&&a.hasOwnProperty("id")&&!nA.isInteger(a.id)?"id: integer expected":a.baseKey!=null&&a.hasOwnProperty("baseKey")&&!(a.baseKey&&typeof a.baseKey.length=="number"||nA.isString(a.baseKey))?"baseKey: buffer expected":a.ephemeralKey!=null&&a.hasOwnProperty("ephemeralKey")&&!(a.ephemeralKey&&typeof a.ephemeralKey.length=="number"||nA.isString(a.ephemeralKey))?"ephemeralKey: buffer expected":a.identityKey!=null&&a.hasOwnProperty("identityKey")&&!(a.identityKey&&typeof a.identityKey.length=="number"||nA.isString(a.identityKey))?"identityKey: buffer expected":a.baseKeySignature!=null&&a.hasOwnProperty("baseKeySignature")&&!(a.baseKeySignature&&typeof a.baseKeySignature.length=="number"||nA.isString(a.baseKeySignature))?"baseKeySignature: buffer expected":null},t.fromObject=function(a){if(a instanceof zn.textsecure.KeyExchangeMessage)return a;var e=new zn.textsecure.KeyExchangeMessage;return a.id!=null&&(e.id=a.id>>>0),a.baseKey!=null&&(typeof a.baseKey=="string"?nA.base64.decode(a.baseKey,e.baseKey=nA.newBuffer(nA.base64.length(a.baseKey)),0):a.baseKey.length&&(e.baseKey=a.baseKey)),a.ephemeralKey!=null&&(typeof a.ephemeralKey=="string"?nA.base64.decode(a.ephemeralKey,e.ephemeralKey=nA.newBuffer(nA.base64.length(a.ephemeralKey)),0):a.ephemeralKey.length&&(e.ephemeralKey=a.ephemeralKey)),a.identityKey!=null&&(typeof a.identityKey=="string"?nA.base64.decode(a.identityKey,e.identityKey=nA.newBuffer(nA.base64.length(a.identityKey)),0):a.identityKey.length&&(e.identityKey=a.identityKey)),a.baseKeySignature!=null&&(typeof a.baseKeySignature=="string"?nA.base64.decode(a.baseKeySignature,e.baseKeySignature=nA.newBuffer(nA.base64.length(a.baseKeySignature)),0):a.baseKeySignature.length&&(e.baseKeySignature=a.baseKeySignature)),e},t.toObject=function(a,e){e||(e={});var i={};return e.defaults&&(i.id=0,e.bytes===String?i.baseKey="":(i.baseKey=[],e.bytes!==Array&&(i.baseKey=nA.newBuffer(i.baseKey))),e.bytes===String?i.ephemeralKey="":(i.ephemeralKey=[],e.bytes!==Array&&(i.ephemeralKey=nA.newBuffer(i.ephemeralKey))),e.bytes===String?i.identityKey="":(i.identityKey=[],e.bytes!==Array&&(i.identityKey=nA.newBuffer(i.identityKey))),e.bytes===String?i.baseKeySignature="":(i.baseKeySignature=[],e.bytes!==Array&&(i.baseKeySignature=nA.newBuffer(i.baseKeySignature)))),a.id!=null&&a.hasOwnProperty("id")&&(i.id=a.id),a.baseKey!=null&&a.hasOwnProperty("baseKey")&&(i.baseKey=e.bytes===String?nA.base64.encode(a.baseKey,0,a.baseKey.length):e.bytes===Array?Array.prototype.slice.call(a.baseKey):a.baseKey),a.ephemeralKey!=null&&a.hasOwnProperty("ephemeralKey")&&(i.ephemeralKey=e.bytes===String?nA.base64.encode(a.ephemeralKey,0,a.ephemeralKey.length):e.bytes===Array?Array.prototype.slice.call(a.ephemeralKey):a.ephemeralKey),a.identityKey!=null&&a.hasOwnProperty("identityKey")&&(i.identityKey=e.bytes===String?nA.base64.encode(a.identityKey,0,a.identityKey.length):e.bytes===Array?Array.prototype.slice.call(a.identityKey):a.identityKey),a.baseKeySignature!=null&&a.hasOwnProperty("baseKeySignature")&&(i.baseKeySignature=e.bytes===String?nA.base64.encode(a.baseKeySignature,0,a.baseKeySignature.length):e.bytes===Array?Array.prototype.slice.call(a.baseKeySignature):a.baseKeySignature),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,cI.util.toJSONOptions)},t})(),n})();F7.exports=zn});var TL=ee((AwA,U7)=>{"use strict";var{textsecure:{WhisperMessage:Xxe,PreKeyWhisperMessage:$xe}}=L7();U7.exports={WhisperMessage:Xxe,PreKeyWhisperMessage:$xe}});var Y7=ee((twA,x7)=>{var LD=wL(),eYe=mL(),AYe=ML(),H7=vD(),Zg=Zl(),K7=sI(),Hs=PD(),Ph=TL(),tYe=OL(),II=3;function UD(n){if(!(n instanceof Buffer))throw TypeError(`Expected Buffer instead of: ${n.constructor.name}`);return n}var NL=class{constructor(t,o){if(!(o instanceof eYe))throw new TypeError("protocolAddress must be a ProtocolAddress");this.addr=o,this.storage=t}_encodeTupleByte(t,o){if(t>15||o>15)throw TypeError("Numbers must be 4 bits or less");return t<<4|o}_decodeTupleByte(t){return[t>>4,t&15]}toString(){return``}async getRecord(){let t=await this.storage.loadSession(this.addr.toString());if(t&&!(t instanceof H7))throw new TypeError("SessionRecord type expected from loadSession");return t}async storeRecord(t){t.removeOldSessions(),await this.storage.storeSession(this.addr.toString(),t)}async queueJob(t){return await tYe(this.addr.toString(),t)}async encrypt(t){UD(t);let o=await this.storage.getOurIdentity();return await this.queueJob(async()=>{let a=await this.getRecord();if(!a)throw new Hs.SessionError("No sessions");let e=a.getOpenSession();if(!e)throw new Hs.SessionError("No open session");let i=e.indexInfo.remoteIdentityKey;if(!await this.storage.isTrustedIdentity(this.addr.id,i))throw new Hs.UntrustedIdentityKeyError(this.addr.id,i);let A=e.getChain(e.currentRatchet.ephemeralKeyPair.pubKey);if(A.chainType===LD.RECEIVING)throw new Error("Tried to encrypt on a receiving chain");this.fillMessageKeys(A,A.chainKey.counter+1);let r=Zg.deriveSecrets(A.messageKeys[A.chainKey.counter],Buffer.alloc(32),Buffer.from("WhisperMessageKeys"));delete A.messageKeys[A.chainKey.counter];let s=Ph.WhisperMessage.create();s.ephemeralKey=e.currentRatchet.ephemeralKeyPair.pubKey,s.counter=A.chainKey.counter,s.previousCounter=e.currentRatchet.previousCounter,s.ciphertext=Zg.encrypt(r[0],t,r[2].slice(0,16));let g=Ph.WhisperMessage.encode(s).finish(),c=Buffer.alloc(g.byteLength+66+1);c.set(o.pubKey),c.set(e.indexInfo.remoteIdentityKey,33),c[66]=this._encodeTupleByte(II,II),c.set(g,67);let I=Zg.calculateMAC(r[1],c),d=Buffer.alloc(g.byteLength+9);d[0]=this._encodeTupleByte(II,II),d.set(g,1),d.set(I.slice(0,8),g.byteLength+1),await this.storeRecord(a);let B,f;if(e.pendingPreKey){B=3;let Q=Ph.PreKeyWhisperMessage.create({identityKey:o.pubKey,registrationId:await this.storage.getOurRegistrationId(),baseKey:e.pendingPreKey.baseKey,signedPreKeyId:e.pendingPreKey.signedKeyId,message:d});e.pendingPreKey.preKeyId&&(Q.preKeyId=e.pendingPreKey.preKeyId),f=Buffer.concat([Buffer.from([this._encodeTupleByte(II,II)]),Buffer.from(Ph.PreKeyWhisperMessage.encode(Q).finish())])}else B=1,f=d;return{type:B,body:f,registrationId:e.registrationId}})}async decryptWithSessions(t,o){if(!o.length)throw new Hs.SessionError("No sessions available");let a=[];for(let e of o){let i;try{return i=await this.doDecryptWhisperMessage(t,e),e.indexInfo.used=Date.now(),{session:e,plaintext:i}}catch(A){a.push(A)}}console.error("Failed to decrypt message with any known session...");for(let e of a)console.error("Session error:"+e,e.stack);throw new Hs.SessionError("No matching sessions found for message")}async decryptWhisperMessage(t){return UD(t),await this.queueJob(async()=>{let o=await this.getRecord();if(!o)throw new Hs.SessionError("No session record");let a=await this.decryptWithSessions(t,o.getSessions()),e=a.session.indexInfo.remoteIdentityKey;if(!await this.storage.isTrustedIdentity(this.addr.id,e))throw new Hs.UntrustedIdentityKeyError(this.addr.id,e);return o.isClosed(a.session)&&console.warn("Decrypted message with closed session."),await this.storeRecord(o),a.plaintext})}async decryptPreKeyWhisperMessage(t){UD(t);let o=this._decodeTupleByte(t[0]);if(o[1]>3||o[0]<3)throw new Error("Incompatible version number on PreKeyWhisperMessage");return await this.queueJob(async()=>{let a=await this.getRecord(),e=Ph.PreKeyWhisperMessage.decode(t.slice(1));if(!a){if(e.registrationId==null)throw new Error("No registrationId");a=new H7}let A=await new AYe(this.storage,this.addr).initIncoming(a,e),r=a.getSession(e.baseKey),s=await this.doDecryptWhisperMessage(e.message,r);return await this.storeRecord(a),A&&await this.storage.removePreKey(A),s})}async doDecryptWhisperMessage(t,o){if(UD(t),!o)throw new TypeError("session required");let a=this._decodeTupleByte(t[0]);if(a[1]>3||a[0]<3)throw new Error("Incompatible version number on WhisperMessage");let e=t.slice(1,-8),i=Ph.WhisperMessage.decode(e);this.maybeStepRatchet(o,i.ephemeralKey,i.previousCounter);let A=o.getChain(i.ephemeralKey);if(A.chainType===LD.SENDING)throw new Error("Tried to decrypt on a sending chain");if(this.fillMessageKeys(A,i.counter),!A.messageKeys.hasOwnProperty(i.counter))throw new Hs.MessageCounterError("Key used already or never filled");let r=A.messageKeys[i.counter];delete A.messageKeys[i.counter];let s=Zg.deriveSecrets(r,Buffer.alloc(32),Buffer.from("WhisperMessageKeys")),g=await this.storage.getOurIdentity(),c=Buffer.alloc(e.byteLength+66+1);c.set(o.indexInfo.remoteIdentityKey),c.set(g.pubKey,33),c[66]=this._encodeTupleByte(II,II),c.set(e,67),Zg.verifyMAC(c,s[1],t.slice(-8),8);let I=Zg.decrypt(s[0],i.ciphertext,s[2].slice(0,16));return delete o.pendingPreKey,I}fillMessageKeys(t,o){if(t.chainKey.counter>=o)return;if(o-t.chainKey.counter>2e3)throw new Hs.SessionError("Over 2000 messages into the future!");if(t.chainKey.key===void 0)throw new Hs.SessionError("Chain closed");let a=t.chainKey.key;return t.messageKeys[t.chainKey.counter+1]=Zg.calculateMAC(a,Buffer.from([1])),t.chainKey.key=Zg.calculateMAC(a,Buffer.from([2])),t.chainKey.counter+=1,this.fillMessageKeys(t,o)}maybeStepRatchet(t,o,a){if(t.getChain(o))return;let e=t.currentRatchet,i=t.getChain(e.lastRemoteEphemeralKey);i&&(this.fillMessageKeys(i,a),delete i.chainKey.key),this.calculateRatchet(t,o,!1);let A=t.getChain(e.ephemeralKeyPair.pubKey);A&&(e.previousCounter=A.chainKey.counter,t.deleteChain(e.ephemeralKeyPair.pubKey)),e.ephemeralKeyPair=K7.generateKeyPair(),this.calculateRatchet(t,o,!0),e.lastRemoteEphemeralKey=o}calculateRatchet(t,o,a){let e=t.currentRatchet,i=K7.calculateAgreement(o,e.ephemeralKeyPair.privKey),A=Zg.deriveSecrets(i,e.rootKey,Buffer.from("WhisperRatchet"),2),r=a?e.ephemeralKeyPair.pubKey:o;t.addChain(r,{messageKeys:{},chainKey:{counter:-1,key:A[1]},chainType:a?LD.SENDING:LD.RECEIVING}),e.rootKey=A[0]}async hasOpenSession(){return await this.queueJob(async()=>{let t=await this.getRecord();return t?t.haveOpenSession():!1})}async closeOpenSession(){return await this.queueJob(async()=>{let t=await this.getRecord();if(t){let o=t.getOpenSession();o&&(t.closeSession(o),await this.storeRecord(t))}})}};x7.exports=NL});var j7=ee(Xg=>{"use strict";Xg.crypto=Zl();Xg.curve=sI();Xg.keyhelper=D7();Xg.ProtocolAddress=mL();Xg.SessionBuilder=ML();Xg.SessionCipher=Y7();Xg.SessionRecord=vD();Object.assign(Xg,PD())});var kL=ee((nwA,W7)=>{"use strict";W7.exports=function(...n){try{return JSON.stringify(...n)}catch(t){return"[Cannot display object: "+t.message+"]"}}});var vL=ee((Z7,X7)=>{"use strict";var gYe=kL();X7.exports=class extends Error{constructor(n){let t=n.filter(o=>o!=="").map(o=>typeof o=="string"?o:o instanceof Error?o.message:gYe(o));super(t.join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Z7.assert)}}});var Xl=ee((gwA,$7)=>{"use strict";var cYe=vL();$7.exports=function(n,...t){if(!n)throw t.length===1&&t[0]instanceof Error?t[0]:new cYe(t)}});var qB=ee((cwA,A$)=>{"use strict";var PL=Xl(),e$={};A$.exports=function(n,t,o){if(t===!1||t===null||t===void 0)return n;o=o||{},typeof o=="string"&&(o={separator:o});let a=Array.isArray(t);PL(!a||!o.separator,"Separator option is not valid for array-based chain");let e=a?t:t.split(o.separator||"."),i=n;for(let A=0;A{"use strict";var t$={};ya=r$.exports={array:Array.prototype,buffer:Buffer&&Buffer.prototype,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype};t$.typeMap=new Map([["[object Error]",ya.error],["[object Map]",ya.map],["[object Promise]",ya.promise],["[object Set]",ya.set],["[object WeakMap]",ya.weakMap],["[object WeakSet]",ya.weakSet]]);ya.getInternalProto=function(n){if(Array.isArray(n))return ya.array;if(Buffer&&n instanceof Buffer)return ya.buffer;if(n instanceof Date)return ya.date;if(n instanceof RegExp)return ya.regex;if(n instanceof Error)return ya.error;let t=Object.prototype.toString.call(n);return t$.typeMap.get(t)||ya.generic}});var KD=ee(i$=>{"use strict";i$.keys=function(n,t={}){return t.symbols!==!1?Reflect.ownKeys(n):Object.getOwnPropertyNames(n)}});var xD=ee((lwA,a$)=>{"use strict";var IYe=qB(),Qo=GL(),lYe=KD(),ec={needsProtoHack:new Set([Qo.set,Qo.map,Qo.weakSet,Qo.weakMap])};a$.exports=ec.clone=function(n,t={},o=null){if(typeof n!="object"||n===null)return n;let a=ec.clone,e=o;if(t.shallow){if(t.shallow!==!0)return ec.cloneWithShallow(n,t);a=s=>s}else if(e){let s=e.get(n);if(s)return s}else e=new Map;let i=Qo.getInternalProto(n);if(i===Qo.buffer)return Buffer&&Buffer.from(n);if(i===Qo.date)return new Date(n.getTime());if(i===Qo.regex)return new RegExp(n);let A=ec.base(n,i,t);if(A===n)return n;if(e&&e.set(n,A),i===Qo.set)for(let s of n)A.add(a(s,t,e));else if(i===Qo.map)for(let[s,g]of n)A.set(s,a(g,t,e));let r=lYe.keys(n,t);for(let s of r){if(s==="__proto__")continue;if(i===Qo.array&&s==="length"){A.length=n.length;continue}let g=Object.getOwnPropertyDescriptor(n,s);g?g.get||g.set?Object.defineProperty(A,s,g):g.enumerable?A[s]=a(n[s],t,e):Object.defineProperty(A,s,{enumerable:!1,writable:!0,configurable:!0,value:a(n[s],t,e)}):Object.defineProperty(A,s,{enumerable:!0,writable:!0,configurable:!0,value:a(n[s],t,e)})}return A};ec.cloneWithShallow=function(n,t){let o=t.shallow;t=Object.assign({},t),t.shallow=!1;let a=new Map;for(let e of o){let i=IYe(n,e);(typeof i=="object"||typeof i=="function")&&a.set(i,i)}return ec.clone(n,t,a)};ec.base=function(n,t,o){if(o.prototype===!1)return ec.needsProtoHack.has(t)?new t.constructor:t===Qo.array?[]:{};let a=Object.getPrototypeOf(n);if(a&&a.isImmutable)return n;if(t===Qo.array){let e=[];return a!==t&&Object.setPrototypeOf(e,a),e}if(ec.needsProtoHack.has(t)){let e=new a.constructor;return a!==t&&Object.setPrototypeOf(e,a),e}return Object.create(a)}});var LL=ee((dwA,s$)=>{"use strict";var FL=Xl(),o$=xD(),dYe=KD(),n$={};s$.exports=n$.merge=function(n,t,o){if(FL(n&&typeof n=="object","Invalid target value: must be an object"),FL(t==null||typeof t=="object","Invalid source value: must be null, undefined, or an object"),!t)return n;if(o=Object.assign({nullOverride:!0,mergeArrays:!0},o),Array.isArray(t)){FL(Array.isArray(n),"Cannot merge array onto an object"),o.mergeArrays||(n.length=0);for(let e=0;e{"use strict";var YD=Xl(),c$=xD(),I$=LL(),g$=qB(),jD={};l$.exports=function(n,t,o={}){if(YD(n&&typeof n=="object","Invalid defaults value: must be an object"),YD(!t||t===!0||typeof t=="object","Invalid source value: must be true, falsy or an object"),YD(typeof o=="object","Invalid options: must be an object"),!t)return null;if(o.shallow)return jD.applyToDefaultsWithShallow(n,t,o);let a=c$(n);if(t===!0)return a;let e=o.nullOverride!==void 0?o.nullOverride:!1;return I$(a,t,{nullOverride:e,mergeArrays:!1})};jD.applyToDefaultsWithShallow=function(n,t,o){let a=o.shallow;YD(Array.isArray(a),"Invalid keys");let e=new Map,i=t===!0?null:new Set;for(let s of a){s=Array.isArray(s)?s:s.split(".");let g=g$(n,s);g&&typeof g=="object"?e.set(g,i&&g$(t,s)||g):i&&i.add(s)}let A=c$(n,{},e);if(!i)return A;for(let s of i)jD.reachCopy(A,t,s);let r=o.nullOverride!==void 0?o.nullOverride:!1;return I$(A,t,{nullOverride:r,mergeArrays:!1})};jD.reachCopy=function(n,t,o){for(let i of o){if(!(i in t))return;let A=t[i];if(typeof A!="object"||A===null)return;t=A}let a=t,e=n;for(let i=0;i{"use strict";var UL={};p$.exports=UL.Bench=class{constructor(){this.ts=0,this.reset()}reset(){this.ts=UL.Bench.now()}elapsed(){return UL.Bench.now()-this.ts}static now(){let n=process.hrtime();return n[0]*1e3+n[1]/1e6}}});var HL=ee((uwA,E$)=>{"use strict";E$.exports=function(){}});var C$=ee((CwA,u$)=>{"use strict";var pYe=HL();u$.exports=function(){return new Promise(pYe)}});var KL=ee((BwA,B$)=>{"use strict";var Ks=GL(),Ia={mismatched:null};B$.exports=function(n,t,o){return o=Object.assign({prototype:!0},o),!!Ia.isDeepEqual(n,t,o,[])};Ia.isDeepEqual=function(n,t,o,a){if(n===t)return n!==0||1/n===1/t;let e=typeof n;if(e!==typeof t||n===null||t===null)return!1;if(e==="function"){if(!o.deepFunction||n.toString()!==t.toString())return!1}else if(e!=="object")return n!==n&&t!==t;let i=Ia.getSharedType(n,t,!!o.prototype);switch(i){case Ks.buffer:return Buffer&&Buffer.prototype.equals.call(n,t);case Ks.promise:return n===t;case Ks.regex:return n.toString()===t.toString();case Ia.mismatched:return!1}for(let A=a.length-1;A>=0;--A)if(a[A].isSame(n,t))return!0;a.push(new Ia.SeenEntry(n,t));try{return!!Ia.isDeepEqualObj(i,n,t,o,a)}finally{a.pop()}};Ia.getSharedType=function(n,t,o){if(o)return Object.getPrototypeOf(n)!==Object.getPrototypeOf(t)?Ia.mismatched:Ks.getInternalProto(n);let a=Ks.getInternalProto(n);return a!==Ks.getInternalProto(t)?Ia.mismatched:a};Ia.valueOf=function(n){let t=n.valueOf;if(t===void 0)return n;try{return t.call(n)}catch(o){return o}};Ia.hasOwnEnumerableProperty=function(n,t){return Object.prototype.propertyIsEnumerable.call(n,t)};Ia.isSetSimpleEqual=function(n,t){for(let o of Set.prototype.values.call(n))if(!Set.prototype.has.call(t,o))return!1;return!0};Ia.isDeepEqualObj=function(n,t,o,a,e){let{isDeepEqual:i,valueOf:A,hasOwnEnumerableProperty:r}=Ia,{keys:s,getOwnPropertySymbols:g}=Object;if(n===Ks.array)if(a.part){for(let f of t)for(let Q of o)if(i(f,Q,a,e))return!0}else{if(t.length!==o.length)return!1;for(let f=0;f{"use strict";f$.exports=function(n){return n.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}});var y$=ee((ywA,Q$)=>{"use strict";var JD=Xl(),hYe=KL(),EYe=xL(),uYe=KD(),yo={};Q$.exports=function(n,t,o={}){return typeof t!="object"&&(t=[t]),JD(!Array.isArray(t)||t.length,"Values array cannot be empty"),typeof n=="string"?yo.string(n,t,o):Array.isArray(n)?yo.array(n,t,o):(JD(typeof n=="object","Reference must be string or an object"),yo.object(n,t,o))};yo.array=function(n,t,o){if(Array.isArray(t)||(t=[t]),!n.length||o.only&&o.once&&n.length!==t.length)return!1;let a,e=new Map;for(let A of t)if(!o.deep||!A||typeof A!="object"){let r=e.get(A);r?++r.allowed:e.set(A,{allowed:1,hits:0})}else{a=a||yo.compare(o);let r=!1;for(let[s,g]of e.entries())if(a(s,A)){++g.allowed,r=!0;break}r||e.set(A,{allowed:1,hits:0})}let i=0;for(let A of n){let r;if(!o.deep||!A||typeof A!="object")r=e.get(A);else{a=a||yo.compare(o);for(let[s,g]of e.entries())if(a(s,A)){r=g;break}}if(r&&(++r.hits,++i,o.once&&r.hits>r.allowed))return!1}if(o.only&&i!==n.length)return!1;for(let A of e.values())if(A.hits!==A.allowed&&A.hitst.propertyIsEnumerable(s)),i=[...Object.keys(t),...e],A=yo.compare(o),r=new Set(i);for(let s of a){if(!r.has(s)){if(o.only)return!1;continue}if(!A(t[s],n[s]))return!1;r.delete(s)}return r.size?o.part?r.sizes!=="");let a=new Map,e=[];for(let s of t)if(JD(typeof s=="string","Cannot compare string reference to non-string value"),s){let g=a.get(s);g?++g.allowed:(a.set(s,{allowed:1,hits:0}),e.push(EYe(s)))}else if(o.once||o.only)return!1;if(!e.length)return!0;let i=new RegExp(`(${e.join("|")})`,"g"),A=n.replace(i,(s,g)=>(++a.get(g).hits,""));if(o.only&&A)return!1;let r=!1;for(let s of a.values())if(s.hits&&(r=!0),s.hits!==s.allowed&&(s.hitshYe(e,i,a)};yo.shallow=function(n,t){return n===t}});var S$=ee((mwA,m$)=>{"use strict";var CYe=Xl();m$.exports=function(n){return CYe(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(n),"Bad attribute value ("+n+")"),n.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')}});var D$=ee((SwA,w$)=>{"use strict";var dI={};w$.exports=function(n){if(!n)return"";let t="";for(let o=0;o=256?"&#"+n+";":`&#x${n.toString(16).padStart(2,"0")};`)};dI.isSafe=function(n){return dI.safeCharCodes.has(n)};dI.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]);dI.safeCharCodes=(function(){let n=new Set;for(let t=32;t<123;++t)(t>=97||t>=65&&t<=90||t>=48&&t<=57||t===32||t===46||t===44||t===45||t===58||t===95)&&n.add(t);return n})()});var b$=ee((wwA,O$)=>{"use strict";var qD={};O$.exports=function(n){return n?n.replace(/[<>&\u2028\u2029]/g,qD.escape):""};qD.escape=function(n){return qD.replacements.get(n)};qD.replacements=new Map([["<","\\u003c"],[">","\\u003e"],["&","\\u0026"],["\u2028","\\u2028"],["\u2029","\\u2029"]])});var T$=ee((DwA,_$)=>{"use strict";var M$={};_$.exports=M$.flatten=function(n,t){let o=t||[];for(let a of n)Array.isArray(a)?M$.flatten(a,o):o.push(a);return o}});var k$=ee((OwA,R$)=>{"use strict";var N$={};R$.exports=function(n,t,o={}){if(!n||!t)return o.first?null:[];let a=[],e=Array.isArray(n)?new Set(n):n,i=new Set;for(let A of t)if(N$.has(e,A)&&!i.has(A)){if(o.first)return A;a.push(A),i.add(A)}return o.first?null:a};N$.has=function(n,t){return typeof n.has=="function"?n.has(t):n[t]!==void 0}});var P$=ee((bwA,v$)=>{"use strict";v$.exports=function(n){return!!n&&typeof n.then=="function"}});var L$=ee((MwA,F$)=>{"use strict";var G$={wrapped:Symbol("wrapped")};F$.exports=function(n){if(n[G$.wrapped])return n;let t=!1,o=function(...a){t||(t=!0,n(...a))};return o[G$.wrapped]=!0,o}});var H$=ee((_wA,U$)=>{"use strict";var BYe=qB();U$.exports=function(n,t,o){return t.replace(/{([^{}]+)}/g,(a,e)=>{let i=BYe(n,e,o);return i??""})}});var x$=ee((TwA,K$)=>{"use strict";var fYe={maxTimer:2147483647};K$.exports=function(n,t,o){if(typeof n=="bigint"&&(n=Number(n)),n>=Number.MAX_SAFE_INTEGER&&(n=1/0),typeof n!="number"&&n!==void 0)throw new TypeError("Timeout must be a number or bigint");return new Promise(a=>{let e=o?o.setTimeout:setTimeout,i=()=>{let A=Math.min(n,fYe.maxTimer);n-=A,e(()=>n>0?i():a(t),A)};n!==1/0&&i()})}});var Y$=ee(ur=>{"use strict";ur.applyToDefaults=d$();ur.assert=Xl();ur.Bench=h$();ur.block=C$();ur.clone=xD();ur.contain=y$();ur.deepEqual=KL();ur.Error=vL();ur.escapeHeaderAttribute=S$();ur.escapeHtml=D$();ur.escapeJson=b$();ur.escapeRegex=xL();ur.flatten=T$();ur.ignore=HL();ur.intersect=k$();ur.isPromise=P$();ur.merge=LL();ur.once=L$();ur.reach=qB();ur.reachTemplate=H$();ur.stringify=kL();ur.wait=x$()});var zr=ee(Pe=>{"use strict";var $l=Y$(),$a={codes:new Map([[100,"Continue"],[101,"Switching Protocols"],[102,"Processing"],[200,"OK"],[201,"Created"],[202,"Accepted"],[203,"Non-Authoritative Information"],[204,"No Content"],[205,"Reset Content"],[206,"Partial Content"],[207,"Multi-Status"],[300,"Multiple Choices"],[301,"Moved Permanently"],[302,"Moved Temporarily"],[303,"See Other"],[304,"Not Modified"],[305,"Use Proxy"],[307,"Temporary Redirect"],[400,"Bad Request"],[401,"Unauthorized"],[402,"Payment Required"],[403,"Forbidden"],[404,"Not Found"],[405,"Method Not Allowed"],[406,"Not Acceptable"],[407,"Proxy Authentication Required"],[408,"Request Time-out"],[409,"Conflict"],[410,"Gone"],[411,"Length Required"],[412,"Precondition Failed"],[413,"Request Entity Too Large"],[414,"Request-URI Too Large"],[415,"Unsupported Media Type"],[416,"Requested Range Not Satisfiable"],[417,"Expectation Failed"],[418,"I'm a teapot"],[422,"Unprocessable Entity"],[423,"Locked"],[424,"Failed Dependency"],[425,"Too Early"],[426,"Upgrade Required"],[428,"Precondition Required"],[429,"Too Many Requests"],[431,"Request Header Fields Too Large"],[451,"Unavailable For Legal Reasons"],[500,"Internal Server Error"],[501,"Not Implemented"],[502,"Bad Gateway"],[503,"Service Unavailable"],[504,"Gateway Time-out"],[505,"HTTP Version Not Supported"],[506,"Variant Also Negotiates"],[507,"Insufficient Storage"],[509,"Bandwidth Limit Exceeded"],[510,"Not Extended"],[511,"Network Authentication Required"]])};Pe.Boom=class extends Error{constructor(n,t={}){if(n instanceof Error)return Pe.boomify($l.clone(n),t);let{statusCode:o=500,data:a=null,ctor:e=Pe.Boom}=t,i=new Error(n||void 0);Error.captureStackTrace(i,e),i.data=a;let A=$a.initialize(i,o);return Object.defineProperty(A,"typeof",{value:e}),t.decorate&&Object.assign(A,t.decorate),A}static[Symbol.hasInstance](n){return this===Pe.Boom?Pe.isBoom(n):this.prototype.isPrototypeOf(n)}};Pe.isBoom=function(n,t){return n instanceof Error&&!!n.isBoom&&(!t||n.output.statusCode===t)};Pe.boomify=function(n,t){return $l.assert(n instanceof Error,"Cannot wrap non-Error object"),t=t||{},t.data!==void 0&&(n.data=t.data),t.decorate&&Object.assign(n,t.decorate),n.isBoom?t.override===!1||!t.statusCode&&!t.message?n:$a.initialize(n,t.statusCode||n.output.statusCode,t.message):$a.initialize(n,t.statusCode||500,t.message)};Pe.badRequest=function(n,t){return new Pe.Boom(n,{statusCode:400,data:t,ctor:Pe.badRequest})};Pe.unauthorized=function(n,t,o){let a=new Pe.Boom(n,{statusCode:401,ctor:Pe.unauthorized});if(!t)return a;if(typeof t!="string")return a.output.headers["WWW-Authenticate"]=t.join(", "),a;let e=`${t}`;return(o||n)&&(a.output.payload.attributes={}),o&&(typeof o=="string"?(e+=" "+$l.escapeHeaderAttribute(o),a.output.payload.attributes=o):e+=" "+Object.keys(o).map(i=>{let A=o[i];return A==null&&(A=""),a.output.payload.attributes[i]=A,`${i}="${$l.escapeHeaderAttribute(A.toString())}"`}).join(", ")),n?(o&&(e+=","),e+=` error="${$l.escapeHeaderAttribute(n)}"`,a.output.payload.attributes.error=n):a.isMissing=!0,a.output.headers["WWW-Authenticate"]=e,a};Pe.paymentRequired=function(n,t){return new Pe.Boom(n,{statusCode:402,data:t,ctor:Pe.paymentRequired})};Pe.forbidden=function(n,t){return new Pe.Boom(n,{statusCode:403,data:t,ctor:Pe.forbidden})};Pe.notFound=function(n,t){return new Pe.Boom(n,{statusCode:404,data:t,ctor:Pe.notFound})};Pe.methodNotAllowed=function(n,t,o){let a=new Pe.Boom(n,{statusCode:405,data:t,ctor:Pe.methodNotAllowed});return typeof o=="string"&&(o=[o]),Array.isArray(o)&&(a.output.headers.Allow=o.join(", ")),a};Pe.notAcceptable=function(n,t){return new Pe.Boom(n,{statusCode:406,data:t,ctor:Pe.notAcceptable})};Pe.proxyAuthRequired=function(n,t){return new Pe.Boom(n,{statusCode:407,data:t,ctor:Pe.proxyAuthRequired})};Pe.clientTimeout=function(n,t){return new Pe.Boom(n,{statusCode:408,data:t,ctor:Pe.clientTimeout})};Pe.conflict=function(n,t){return new Pe.Boom(n,{statusCode:409,data:t,ctor:Pe.conflict})};Pe.resourceGone=function(n,t){return new Pe.Boom(n,{statusCode:410,data:t,ctor:Pe.resourceGone})};Pe.lengthRequired=function(n,t){return new Pe.Boom(n,{statusCode:411,data:t,ctor:Pe.lengthRequired})};Pe.preconditionFailed=function(n,t){return new Pe.Boom(n,{statusCode:412,data:t,ctor:Pe.preconditionFailed})};Pe.entityTooLarge=function(n,t){return new Pe.Boom(n,{statusCode:413,data:t,ctor:Pe.entityTooLarge})};Pe.uriTooLong=function(n,t){return new Pe.Boom(n,{statusCode:414,data:t,ctor:Pe.uriTooLong})};Pe.unsupportedMediaType=function(n,t){return new Pe.Boom(n,{statusCode:415,data:t,ctor:Pe.unsupportedMediaType})};Pe.rangeNotSatisfiable=function(n,t){return new Pe.Boom(n,{statusCode:416,data:t,ctor:Pe.rangeNotSatisfiable})};Pe.expectationFailed=function(n,t){return new Pe.Boom(n,{statusCode:417,data:t,ctor:Pe.expectationFailed})};Pe.teapot=function(n,t){return new Pe.Boom(n,{statusCode:418,data:t,ctor:Pe.teapot})};Pe.badData=function(n,t){return new Pe.Boom(n,{statusCode:422,data:t,ctor:Pe.badData})};Pe.locked=function(n,t){return new Pe.Boom(n,{statusCode:423,data:t,ctor:Pe.locked})};Pe.failedDependency=function(n,t){return new Pe.Boom(n,{statusCode:424,data:t,ctor:Pe.failedDependency})};Pe.tooEarly=function(n,t){return new Pe.Boom(n,{statusCode:425,data:t,ctor:Pe.tooEarly})};Pe.preconditionRequired=function(n,t){return new Pe.Boom(n,{statusCode:428,data:t,ctor:Pe.preconditionRequired})};Pe.tooManyRequests=function(n,t){return new Pe.Boom(n,{statusCode:429,data:t,ctor:Pe.tooManyRequests})};Pe.illegal=function(n,t){return new Pe.Boom(n,{statusCode:451,data:t,ctor:Pe.illegal})};Pe.internal=function(n,t,o=500){return $a.serverError(n,t,o,Pe.internal)};Pe.notImplemented=function(n,t){return $a.serverError(n,t,501,Pe.notImplemented)};Pe.badGateway=function(n,t){return $a.serverError(n,t,502,Pe.badGateway)};Pe.serverUnavailable=function(n,t){return $a.serverError(n,t,503,Pe.serverUnavailable)};Pe.gatewayTimeout=function(n,t){return $a.serverError(n,t,504,Pe.gatewayTimeout)};Pe.badImplementation=function(n,t){let o=$a.serverError(n,t,500,Pe.badImplementation);return o.isDeveloperError=!0,o};$a.initialize=function(n,t,o){let a=parseInt(t,10);if($l.assert(!isNaN(a)&&a>=400,"First argument must be a number (400+):",t),n.isBoom=!0,n.isServer=a>=500,n.hasOwnProperty("data")||(n.data=null),n.output={statusCode:a,payload:{},headers:{}},Object.defineProperty(n,"reformat",{value:$a.reformat,configurable:!0}),!o&&!n.message&&(n.reformat(),o=n.output.payload.error),o){let e=Object.getOwnPropertyDescriptor(n,"message")||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(n),"message");$l.assert(!e||e.configurable&&!e.get,"The error is not compatible with boom"),n.message=o+(n.message?": "+n.message:""),n.output.payload.message=n.message}return n.reformat(),n};$a.reformat=function(n=!1){this.output.payload.statusCode=this.output.statusCode,this.output.payload.error=$a.codes.get(this.output.statusCode)||"Unknown",this.output.statusCode===500&&n!==!0?this.output.payload.message="An internal server error occurred":this.message&&(this.output.payload.message=this.message)};$a.serverError=function(n,t,o,a){return t instanceof Error&&!t.isBoom?Pe.boomify(t,{statusCode:o,message:n}):new Pe.Boom(n,{statusCode:o,data:t,ctor:a})}});var qee,e1e,A1e,t1e,r1e,i1e,a1e,o1e,n1e,s1e,g1e,c1e,I1e,l1e,d1e,O,Ys=ue(()=>{qee=n=>typeof n<"u"&&n!==null,e1e=n=>typeof n=="object",A1e=n=>Object.prototype.toString.call(n)==="[object Object]",t1e=n=>typeof n=="function",r1e=n=>typeof n=="boolean",i1e=n=>n instanceof Buffer,a1e=n=>{if(qee(n))switch(n.constructor){case Uint8Array:case Uint8ClampedArray:case Int8Array:case Uint16Array:case Int16Array:case Uint32Array:case Int32Array:case Float32Array:case Float64Array:return!0}return!1},o1e=n=>n instanceof ArrayBuffer,n1e=n=>typeof n=="string"&&n.length>0,s1e=n=>typeof n=="number"&&Number.isFinite(n),g1e=n=>Number.isInteger(n),c1e=(n,t,o)=>n>=t&&n<=o,I1e=(n,t)=>t.includes(n),l1e=(n,t,o)=>new Error(`Expected ${t} for ${n} but received ${o} of type ${typeof o}`),d1e=(n,t)=>(t.message=n.message,t),O={defined:qee,object:e1e,plainObject:A1e,fn:t1e,bool:r1e,buffer:i1e,typedArray:a1e,arrayBuffer:o1e,string:n1e,number:s1e,integer:g1e,inRange:c1e,inArray:I1e,invalidParameterError:l1e,nativeError:d1e}});var Wee=ee((KDA,Vee)=>{"use strict";var zee=()=>process.platform==="linux",gO=null,p1e=()=>{if(!gO)if(zee()&&process.report){let n=process.report.excludeNetwork;process.report.excludeNetwork=!0,gO=process.report.getReport(),process.report.excludeNetwork=n}else gO={};return gO};Vee.exports={isLinux:zee,getReport:p1e}});var Xee=ee((xDA,Zee)=>{"use strict";var qh=$e("fs"),h1e="/usr/bin/ldd",E1e="/proc/self/exe",cO=2048,u1e=n=>{let t=qh.openSync(n,"r"),o=Buffer.alloc(cO),a=qh.readSync(t,o,0,cO,0);return qh.close(t,()=>{}),o.subarray(0,a)},C1e=n=>new Promise((t,o)=>{qh.open(n,"r",(a,e)=>{if(a)o(a);else{let i=Buffer.alloc(cO);qh.read(e,i,0,cO,0,(A,r)=>{t(i.subarray(0,r)),qh.close(e,()=>{})})}})});Zee.exports={LDD_PATH:h1e,SELF_PATH:E1e,readFileSync:u1e,readFile:C1e}});var eAe=ee((YDA,$ee)=>{"use strict";var B1e=n=>{if(n.length<64||n.readUInt32BE(0)!==2135247942||n.readUInt8(4)!==2||n.readUInt8(5)!==1)return null;let t=n.readUInt32LE(32),o=n.readUInt16LE(54),a=n.readUInt16LE(56);for(let e=0;e{"use strict";var tAe=$e("child_process"),{isLinux:zh,getReport:rAe}=Wee(),{LDD_PATH:IO,SELF_PATH:iAe,readFile:r2,readFileSync:i2}=Xee(),{interpreterPath:aAe}=eAe(),js,Js,qs,oAe="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",fI="",nAe=()=>fI||new Promise(n=>{tAe.exec(oAe,(t,o)=>{fI=t?" ":o,n(fI)})}),sAe=()=>{if(!fI)try{fI=tAe.execSync(oAe,{encoding:"utf8"})}catch{fI=" "}return fI},ac="glibc",gAe=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,ad="musl",f1e=n=>n.includes("libc.musl-")||n.includes("ld-musl-"),cAe=()=>{let n=rAe();return n.header&&n.header.glibcVersionRuntime?ac:Array.isArray(n.sharedObjects)&&n.sharedObjects.some(f1e)?ad:null},IAe=n=>{let[t,o]=n.split(/[\r\n]+/);return t&&t.includes(ac)?ac:o&&o.includes(ad)?ad:null},lAe=n=>{if(n){if(n.includes("/ld-musl-"))return ad;if(n.includes("/ld-linux-"))return ac}return null},dAe=n=>(n=n.toString(),n.includes("musl")?ad:n.includes("GNU C Library")?ac:null),Q1e=async()=>{if(Js!==void 0)return Js;Js=null;try{let n=await r2(IO);Js=dAe(n)}catch{}return Js},y1e=()=>{if(Js!==void 0)return Js;Js=null;try{let n=i2(IO);Js=dAe(n)}catch{}return Js},m1e=async()=>{if(js!==void 0)return js;js=null;try{let n=await r2(iAe),t=aAe(n);js=lAe(t)}catch{}return js},S1e=()=>{if(js!==void 0)return js;js=null;try{let n=i2(iAe),t=aAe(n);js=lAe(t)}catch{}return js},pAe=async()=>{let n=null;if(zh()&&(n=await m1e(),!n&&(n=await Q1e(),n||(n=cAe()),!n))){let t=await nAe();n=IAe(t)}return n},hAe=()=>{let n=null;if(zh()&&(n=S1e(),!n&&(n=y1e(),n||(n=cAe()),!n))){let t=sAe();n=IAe(t)}return n},w1e=async()=>zh()&&await pAe()!==ac,D1e=()=>zh()&&hAe()!==ac,O1e=async()=>{if(qs!==void 0)return qs;qs=null;try{let t=(await r2(IO)).match(gAe);t&&(qs=t[1])}catch{}return qs},b1e=()=>{if(qs!==void 0)return qs;qs=null;try{let t=i2(IO).match(gAe);t&&(qs=t[1])}catch{}return qs},EAe=()=>{let n=rAe();return n.header&&n.header.glibcVersionRuntime?n.header.glibcVersionRuntime:null},AAe=n=>n.trim().split(/\s+/)[1],uAe=n=>{let[t,o,a]=n.split(/[\r\n]+/);return t&&t.includes(ac)?AAe(t):o&&a&&o.includes(ad)?AAe(a):null},M1e=async()=>{let n=null;if(zh()&&(n=await O1e(),n||(n=EAe()),!n)){let t=await nAe();n=uAe(t)}return n},_1e=()=>{let n=null;if(zh()&&(n=b1e(),n||(n=EAe()),!n)){let t=sAe();n=uAe(t)}return n};CAe.exports={GLIBC:ac,MUSL:ad,family:pAe,familySync:hAe,isNonGlibcLinux:w1e,isNonGlibcLinuxSync:D1e,version:M1e,versionSync:_1e}});var Vh=ee((JDA,BAe)=>{"use strict";var T1e="2.0.0",N1e=Number.MAX_SAFE_INTEGER||9007199254740991,R1e=16,k1e=250,v1e=["major","premajor","minor","preminor","patch","prepatch","prerelease"];BAe.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:R1e,MAX_SAFE_BUILD_LENGTH:k1e,MAX_SAFE_INTEGER:N1e,RELEASE_TYPES:v1e,SEMVER_SPEC_VERSION:T1e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var sf=ee((qDA,fAe)=>{"use strict";var P1e=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{};fAe.exports=P1e});var Wh=ee((zs,QAe)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:a2,MAX_SAFE_BUILD_LENGTH:G1e,MAX_LENGTH:F1e}=Vh(),L1e=sf();zs=QAe.exports={};var U1e=zs.re=[],H1e=zs.safeRe=[],gA=zs.src=[],K1e=zs.safeSrc=[],cA=zs.t={},x1e=0,o2="[a-zA-Z0-9-]",Y1e=[["\\s",1],["\\d",F1e],[o2,G1e]],j1e=n=>{for(let[t,o]of Y1e)n=n.split(`${t}*`).join(`${t}{0,${o}}`).split(`${t}+`).join(`${t}{1,${o}}`);return n},JA=(n,t,o)=>{let a=j1e(t),e=x1e++;L1e(n,e,t),cA[n]=e,gA[e]=t,K1e[e]=a,U1e[e]=new RegExp(t,o?"g":void 0),H1e[e]=new RegExp(a,o?"g":void 0)};JA("NUMERICIDENTIFIER","0|[1-9]\\d*");JA("NUMERICIDENTIFIERLOOSE","\\d+");JA("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${o2}*`);JA("MAINVERSION",`(${gA[cA.NUMERICIDENTIFIER]})\\.(${gA[cA.NUMERICIDENTIFIER]})\\.(${gA[cA.NUMERICIDENTIFIER]})`);JA("MAINVERSIONLOOSE",`(${gA[cA.NUMERICIDENTIFIERLOOSE]})\\.(${gA[cA.NUMERICIDENTIFIERLOOSE]})\\.(${gA[cA.NUMERICIDENTIFIERLOOSE]})`);JA("PRERELEASEIDENTIFIER",`(?:${gA[cA.NONNUMERICIDENTIFIER]}|${gA[cA.NUMERICIDENTIFIER]})`);JA("PRERELEASEIDENTIFIERLOOSE",`(?:${gA[cA.NONNUMERICIDENTIFIER]}|${gA[cA.NUMERICIDENTIFIERLOOSE]})`);JA("PRERELEASE",`(?:-(${gA[cA.PRERELEASEIDENTIFIER]}(?:\\.${gA[cA.PRERELEASEIDENTIFIER]})*))`);JA("PRERELEASELOOSE",`(?:-?(${gA[cA.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${gA[cA.PRERELEASEIDENTIFIERLOOSE]})*))`);JA("BUILDIDENTIFIER",`${o2}+`);JA("BUILD",`(?:\\+(${gA[cA.BUILDIDENTIFIER]}(?:\\.${gA[cA.BUILDIDENTIFIER]})*))`);JA("FULLPLAIN",`v?${gA[cA.MAINVERSION]}${gA[cA.PRERELEASE]}?${gA[cA.BUILD]}?`);JA("FULL",`^${gA[cA.FULLPLAIN]}$`);JA("LOOSEPLAIN",`[v=\\s]*${gA[cA.MAINVERSIONLOOSE]}${gA[cA.PRERELEASELOOSE]}?${gA[cA.BUILD]}?`);JA("LOOSE",`^${gA[cA.LOOSEPLAIN]}$`);JA("GTLT","((?:<|>)?=?)");JA("XRANGEIDENTIFIERLOOSE",`${gA[cA.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);JA("XRANGEIDENTIFIER",`${gA[cA.NUMERICIDENTIFIER]}|x|X|\\*`);JA("XRANGEPLAIN",`[v=\\s]*(${gA[cA.XRANGEIDENTIFIER]})(?:\\.(${gA[cA.XRANGEIDENTIFIER]})(?:\\.(${gA[cA.XRANGEIDENTIFIER]})(?:${gA[cA.PRERELEASE]})?${gA[cA.BUILD]}?)?)?`);JA("XRANGEPLAINLOOSE",`[v=\\s]*(${gA[cA.XRANGEIDENTIFIERLOOSE]})(?:\\.(${gA[cA.XRANGEIDENTIFIERLOOSE]})(?:\\.(${gA[cA.XRANGEIDENTIFIERLOOSE]})(?:${gA[cA.PRERELEASELOOSE]})?${gA[cA.BUILD]}?)?)?`);JA("XRANGE",`^${gA[cA.GTLT]}\\s*${gA[cA.XRANGEPLAIN]}$`);JA("XRANGELOOSE",`^${gA[cA.GTLT]}\\s*${gA[cA.XRANGEPLAINLOOSE]}$`);JA("COERCEPLAIN",`(^|[^\\d])(\\d{1,${a2}})(?:\\.(\\d{1,${a2}}))?(?:\\.(\\d{1,${a2}}))?`);JA("COERCE",`${gA[cA.COERCEPLAIN]}(?:$|[^\\d])`);JA("COERCEFULL",gA[cA.COERCEPLAIN]+`(?:${gA[cA.PRERELEASE]})?(?:${gA[cA.BUILD]})?(?:$|[^\\d])`);JA("COERCERTL",gA[cA.COERCE],!0);JA("COERCERTLFULL",gA[cA.COERCEFULL],!0);JA("LONETILDE","(?:~>?)");JA("TILDETRIM",`(\\s*)${gA[cA.LONETILDE]}\\s+`,!0);zs.tildeTrimReplace="$1~";JA("TILDE",`^${gA[cA.LONETILDE]}${gA[cA.XRANGEPLAIN]}$`);JA("TILDELOOSE",`^${gA[cA.LONETILDE]}${gA[cA.XRANGEPLAINLOOSE]}$`);JA("LONECARET","(?:\\^)");JA("CARETTRIM",`(\\s*)${gA[cA.LONECARET]}\\s+`,!0);zs.caretTrimReplace="$1^";JA("CARET",`^${gA[cA.LONECARET]}${gA[cA.XRANGEPLAIN]}$`);JA("CARETLOOSE",`^${gA[cA.LONECARET]}${gA[cA.XRANGEPLAINLOOSE]}$`);JA("COMPARATORLOOSE",`^${gA[cA.GTLT]}\\s*(${gA[cA.LOOSEPLAIN]})$|^$`);JA("COMPARATOR",`^${gA[cA.GTLT]}\\s*(${gA[cA.FULLPLAIN]})$|^$`);JA("COMPARATORTRIM",`(\\s*)${gA[cA.GTLT]}\\s*(${gA[cA.LOOSEPLAIN]}|${gA[cA.XRANGEPLAIN]})`,!0);zs.comparatorTrimReplace="$1$2$3";JA("HYPHENRANGE",`^\\s*(${gA[cA.XRANGEPLAIN]})\\s+-\\s+(${gA[cA.XRANGEPLAIN]})\\s*$`);JA("HYPHENRANGELOOSE",`^\\s*(${gA[cA.XRANGEPLAINLOOSE]})\\s+-\\s+(${gA[cA.XRANGEPLAINLOOSE]})\\s*$`);JA("STAR","(<|>)?=?\\s*\\*");JA("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");JA("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var dO=ee((zDA,yAe)=>{"use strict";var J1e=Object.freeze({loose:!0}),q1e=Object.freeze({}),z1e=n=>n?typeof n!="object"?J1e:n:q1e;yAe.exports=z1e});var n2=ee((VDA,wAe)=>{"use strict";var mAe=/^[0-9]+$/,SAe=(n,t)=>{if(typeof n=="number"&&typeof t=="number")return n===t?0:nSAe(t,n);wAe.exports={compareIdentifiers:SAe,rcompareIdentifiers:V1e}});var Li=ee((WDA,OAe)=>{"use strict";var pO=sf(),{MAX_LENGTH:DAe,MAX_SAFE_INTEGER:hO}=Vh(),{safeRe:EO,t:uO}=Wh(),W1e=dO(),{compareIdentifiers:s2}=n2(),Z1e=(n,t)=>{let o=t.split(".");if(o.length>n.length)return!1;for(let a=0;aDAe)throw new TypeError(`version is longer than ${DAe} characters`);pO("SemVer",t,o),this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease;let a=t.trim().match(o.loose?EO[uO.LOOSE]:EO[uO.FULL]);if(!a)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+a[1],this.minor=+a[2],this.patch=+a[3],this.major>hO||this.major<0)throw new TypeError("Invalid major version");if(this.minor>hO||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>hO||this.patch<0)throw new TypeError("Invalid patch version");a[4]?this.prerelease=a[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let i=+e;if(i>=0&&it.major?1:this.minort.minor?1:this.patcht.patch?1:0}comparePre(t){if(t instanceof n||(t=new n(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let o=0;do{let a=this.prerelease[o],e=t.prerelease[o];if(pO("prerelease compare",o,a,e),a===void 0&&e===void 0)return 0;if(e===void 0)return 1;if(a===void 0)return-1;if(a===e)continue;return s2(a,e)}while(++o)}compareBuild(t){t instanceof n||(t=new n(t,this.options));let o=0;do{let a=this.build[o],e=t.build[o];if(pO("build compare",o,a,e),a===void 0&&e===void 0)return 0;if(e===void 0)return 1;if(a===void 0)return-1;if(a===e)continue;return s2(a,e)}while(++o)}inc(t,o,a){if(t.startsWith("pre")){if(!o&&a===!1)throw new Error("invalid increment argument: identifier is empty");if(o){let e=`-${o}`.match(this.options.loose?EO[uO.PRERELEASELOOSE]:EO[uO.PRERELEASE]);if(!e||e[1]!==o)throw new Error(`invalid identifier: ${o}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",o,a);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",o,a);break;case"prepatch":this.prerelease.length=0,this.inc("patch",o,a),this.inc("pre",o,a);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",o,a),this.inc("pre",o,a);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let e=Number(a)?1:0;if(this.prerelease.length===0)this.prerelease=[e];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(o===this.prerelease.join(".")&&a===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(o){let i=[o,e];if(a===!1&&(i=[o]),Z1e(this.prerelease,o)){let A=this.prerelease[o.split(".").length];isNaN(A)&&(this.prerelease=i)}else this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};OAe.exports=g2});var QI=ee((ZDA,MAe)=>{"use strict";var bAe=Li(),X1e=(n,t,o=!1)=>{if(n instanceof bAe)return n;try{return new bAe(n,t)}catch(a){if(!o)return null;throw a}};MAe.exports=X1e});var TAe=ee((XDA,_Ae)=>{"use strict";var $1e=QI(),e3e=(n,t)=>{let o=$1e(n,t);return o?o.version:null};_Ae.exports=e3e});var RAe=ee(($DA,NAe)=>{"use strict";var A3e=QI(),t3e=(n,t)=>{let o=A3e(n.trim().replace(/^[=v]+/,""),t);return o?o.version:null};NAe.exports=t3e});var PAe=ee((eOA,vAe)=>{"use strict";var kAe=Li(),r3e=(n,t,o,a,e)=>{typeof o=="string"&&(e=a,a=o,o=void 0);try{return new kAe(n instanceof kAe?n.version:n,o).inc(t,a,e).version}catch{return null}};vAe.exports=r3e});var LAe=ee((AOA,FAe)=>{"use strict";var GAe=QI(),i3e=(n,t)=>{let o=GAe(n,null,!0),a=GAe(t,null,!0),e=o.compare(a);if(e===0)return null;let i=e>0,A=i?o:a,r=i?a:o,s=!!A.prerelease.length;if(!!r.prerelease.length&&!s){if(!r.patch&&!r.minor)return"major";if(r.compareMain(A)===0)return r.minor&&!r.patch?"minor":"patch"}let c=s?"pre":"";return o.major!==a.major?c+"major":o.minor!==a.minor?c+"minor":o.patch!==a.patch?c+"patch":"prerelease"};FAe.exports=i3e});var HAe=ee((tOA,UAe)=>{"use strict";var a3e=Li(),o3e=(n,t)=>new a3e(n,t).major;UAe.exports=o3e});var xAe=ee((rOA,KAe)=>{"use strict";var n3e=Li(),s3e=(n,t)=>new n3e(n,t).minor;KAe.exports=s3e});var jAe=ee((iOA,YAe)=>{"use strict";var g3e=Li(),c3e=(n,t)=>new g3e(n,t).patch;YAe.exports=c3e});var qAe=ee((aOA,JAe)=>{"use strict";var I3e=QI(),l3e=(n,t)=>{let o=I3e(n,t);return o&&o.prerelease.length?o.prerelease:null};JAe.exports=l3e});var on=ee((oOA,VAe)=>{"use strict";var zAe=Li(),d3e=(n,t,o)=>new zAe(n,o).compare(new zAe(t,o));VAe.exports=d3e});var ZAe=ee((nOA,WAe)=>{"use strict";var p3e=on(),h3e=(n,t,o)=>p3e(t,n,o);WAe.exports=h3e});var $Ae=ee((sOA,XAe)=>{"use strict";var E3e=on(),u3e=(n,t)=>E3e(n,t,!0);XAe.exports=u3e});var CO=ee((gOA,Ate)=>{"use strict";var ete=Li(),C3e=(n,t,o)=>{let a=new ete(n,o),e=new ete(t,o);return a.compare(e)||a.compareBuild(e)};Ate.exports=C3e});var rte=ee((cOA,tte)=>{"use strict";var B3e=CO(),f3e=(n,t)=>n.sort((o,a)=>B3e(o,a,t));tte.exports=f3e});var ate=ee((IOA,ite)=>{"use strict";var Q3e=CO(),y3e=(n,t)=>n.sort((o,a)=>Q3e(a,o,t));ite.exports=y3e});var gf=ee((lOA,ote)=>{"use strict";var m3e=on(),S3e=(n,t,o)=>m3e(n,t,o)>0;ote.exports=S3e});var BO=ee((dOA,nte)=>{"use strict";var w3e=on(),D3e=(n,t,o)=>w3e(n,t,o)<0;nte.exports=D3e});var c2=ee((pOA,ste)=>{"use strict";var O3e=on(),b3e=(n,t,o)=>O3e(n,t,o)===0;ste.exports=b3e});var I2=ee((hOA,gte)=>{"use strict";var M3e=on(),_3e=(n,t,o)=>M3e(n,t,o)!==0;gte.exports=_3e});var fO=ee((EOA,cte)=>{"use strict";var T3e=on(),N3e=(n,t,o)=>T3e(n,t,o)>=0;cte.exports=N3e});var QO=ee((uOA,Ite)=>{"use strict";var R3e=on(),k3e=(n,t,o)=>R3e(n,t,o)<=0;Ite.exports=k3e});var l2=ee((COA,lte)=>{"use strict";var v3e=c2(),P3e=I2(),G3e=gf(),F3e=fO(),L3e=BO(),U3e=QO(),H3e=(n,t,o,a)=>{switch(t){case"===":return typeof n=="object"&&(n=n.version),typeof o=="object"&&(o=o.version),n===o;case"!==":return typeof n=="object"&&(n=n.version),typeof o=="object"&&(o=o.version),n!==o;case"":case"=":case"==":return v3e(n,o,a);case"!=":return P3e(n,o,a);case">":return G3e(n,o,a);case">=":return F3e(n,o,a);case"<":return L3e(n,o,a);case"<=":return U3e(n,o,a);default:throw new TypeError(`Invalid operator: ${t}`)}};lte.exports=H3e});var pte=ee((BOA,dte)=>{"use strict";var K3e=Li(),x3e=QI(),{safeRe:yO,t:mO}=Wh(),Y3e=(n,t)=>{if(n instanceof K3e)return n;if(typeof n=="number"&&(n=String(n)),typeof n!="string")return null;t=t||{};let o=null;if(!t.rtl)o=n.match(t.includePrerelease?yO[mO.COERCEFULL]:yO[mO.COERCE]);else{let s=t.includePrerelease?yO[mO.COERCERTLFULL]:yO[mO.COERCERTL],g;for(;(g=s.exec(n))&&(!o||o.index+o[0].length!==n.length);)(!o||g.index+g[0].length!==o.index+o[0].length)&&(o=g),s.lastIndex=g.index+g[1].length+g[2].length;s.lastIndex=-1}if(o===null)return null;let a=o[2],e=o[3]||"0",i=o[4]||"0",A=t.includePrerelease&&o[5]?`-${o[5]}`:"",r=t.includePrerelease&&o[6]?`+${o[6]}`:"";return x3e(`${a}.${e}.${i}${A}${r}`,t)};dte.exports=Y3e});var Ete=ee((fOA,hte)=>{"use strict";var j3e=QI(),J3e=Vh(),q3e=Li(),z3e=(n,t,o)=>{if(!J3e.RELEASE_TYPES.includes(t))return null;let a=V3e(n,o);return a&&W3e(a,t)},V3e=(n,t)=>{let o=n instanceof q3e?n.version:n;return j3e(o,t)},W3e=(n,t)=>{if(Z3e(t))return n.version;switch(n.prerelease=[],t){case"major":n.minor=0,n.patch=0;break;case"minor":n.patch=0;break}return n.format()},Z3e=n=>n.startsWith("pre");hte.exports=z3e});var Cte=ee((QOA,ute)=>{"use strict";var d2=class{constructor(){this.max=1e3,this.map=new Map}get(t){let o=this.map.get(t);if(o!==void 0)return this.map.delete(t),this.map.set(t,o),o}delete(t){return this.map.delete(t)}set(t,o){if(!this.delete(t)&&o!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(t,o)}return this}};ute.exports=d2});var nn=ee((yOA,yte)=>{"use strict";var X3e=/\s+/g,p2=class n{constructor(t,o){if(o=eje(o),t instanceof n)return t.loose===!!o.loose&&t.includePrerelease===!!o.includePrerelease?t:new n(t.raw,o);if(t instanceof h2)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease,this.raw=t.trim().replace(X3e," "),this.set=this.raw.split("||").map(a=>this.parseRange(a.trim())).filter(a=>a.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let a=this.set[0];if(this.set=this.set.filter(e=>!fte(e[0])),this.set.length===0)this.set=[a];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&gje(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t0&&(this.formatted+="||");let o=this.set[t];for(let a=0;a0&&(this.formatted+=" "),this.formatted+=o[a].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){t=t.replace(sje,"");let a=((this.options.includePrerelease&&oje)|(this.options.loose&&nje))+":"+t,e=Bte.get(a);if(e)return e;let i=this.options.loose,A=i?ma[Ui.HYPHENRANGELOOSE]:ma[Ui.HYPHENRANGE];t=t.replace(A,fje(this.options.includePrerelease)),$t("hyphen replace",t),t=t.replace(ma[Ui.COMPARATORTRIM],rje),$t("comparator trim",t),t=t.replace(ma[Ui.TILDETRIM],ije),$t("tilde trim",t),t=t.replace(ma[Ui.CARETTRIM],aje),$t("caret trim",t);let r=t.split(" ").map(I=>cje(I,this.options)).join(" ").split(/\s+/).map(I=>Bje(I,this.options));i&&(r=r.filter(I=>($t("loose invalid filter",I,this.options),!!I.match(ma[Ui.COMPARATORLOOSE])))),$t("range list",r);let s=new Map,g=r.map(I=>new h2(I,this.options));for(let I of g){if(fte(I))return[I];s.set(I.value,I)}s.size>1&&s.has("")&&s.delete("");let c=[...s.values()];return Bte.set(a,c),c}intersects(t,o){if(!(t instanceof n))throw new TypeError("a Range is required");return this.set.some(a=>Qte(a,o)&&t.set.some(e=>Qte(e,o)&&a.every(i=>e.every(A=>i.intersects(A,o)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new Aje(t,this.options)}catch{return!1}for(let o=0;on.value==="<0.0.0-0",gje=n=>n.value==="",Qte=(n,t)=>{let o=!0,a=n.slice(),e=a.pop();for(;o&&a.length;)o=a.every(i=>e.intersects(i,t)),e=a.pop();return o},cje=(n,t)=>(n=n.replace(ma[Ui.BUILD],""),$t("comp",n,t),n=pje(n,t),$t("caret",n),n=lje(n,t),$t("tildes",n),n=Eje(n,t),$t("xrange",n),n=Cje(n,t),$t("stars",n),n),Xr=n=>!n||n.toLowerCase()==="x"||n==="*",Ije=(n,t,o)=>Xr(n)&&!Xr(t)||Xr(t)&&o&&!Xr(o),lje=(n,t)=>n.trim().split(/\s+/).map(o=>dje(o,t)).join(" "),dje=(n,t)=>{let o=t.loose?ma[Ui.TILDELOOSE]:ma[Ui.TILDE],a=t.includePrerelease?"-0":"";return n.replace(o,(e,i,A,r,s)=>{$t("tilde",n,e,i,A,r,s);let g;return Xr(i)?g="":Xr(A)?g=`>=${i}.0.0${a} <${+i+1}.0.0-0`:Xr(r)?g=`>=${i}.${A}.0${a} <${i}.${+A+1}.0-0`:s?($t("replaceTilde pr",s),g=`>=${i}.${A}.${r}-${s} <${i}.${+A+1}.0-0`):g=`>=${i}.${A}.${r} <${i}.${+A+1}.0-0`,$t("tilde return",g),g})},pje=(n,t)=>n.trim().split(/\s+/).map(o=>hje(o,t)).join(" "),hje=(n,t)=>{$t("caret",n,t);let o=t.loose?ma[Ui.CARETLOOSE]:ma[Ui.CARET],a=t.includePrerelease?"-0":"";return n.replace(o,(e,i,A,r,s)=>{$t("caret",n,e,i,A,r,s);let g;return Xr(i)?g="":Xr(A)?g=`>=${i}.0.0${a} <${+i+1}.0.0-0`:Xr(r)?i==="0"?g=`>=${i}.${A}.0${a} <${i}.${+A+1}.0-0`:g=`>=${i}.${A}.0${a} <${+i+1}.0.0-0`:s?($t("replaceCaret pr",s),i==="0"?A==="0"?g=`>=${i}.${A}.${r}-${s} <${i}.${A}.${+r+1}-0`:g=`>=${i}.${A}.${r}-${s} <${i}.${+A+1}.0-0`:g=`>=${i}.${A}.${r}-${s} <${+i+1}.0.0-0`):($t("no pr"),i==="0"?A==="0"?g=`>=${i}.${A}.${r} <${i}.${A}.${+r+1}-0`:g=`>=${i}.${A}.${r} <${i}.${+A+1}.0-0`:g=`>=${i}.${A}.${r} <${+i+1}.0.0-0`),$t("caret return",g),g})},Eje=(n,t)=>($t("replaceXRanges",n,t),n.split(/\s+/).map(o=>uje(o,t)).join(" ")),uje=(n,t)=>{n=n.trim();let o=t.loose?ma[Ui.XRANGELOOSE]:ma[Ui.XRANGE];return n.replace(o,(a,e,i,A,r,s)=>{if($t("xRange",n,a,e,i,A,r,s),Ije(i,A,r))return n;let g=Xr(i),c=g||Xr(A),I=c||Xr(r),d=I;return e==="="&&d&&(e=""),s=t.includePrerelease?"-0":"",g?e===">"||e==="<"?a="<0.0.0-0":a="*":e&&d?(c&&(A=0),r=0,e===">"?(e=">=",c?(i=+i+1,A=0,r=0):(A=+A+1,r=0)):e==="<="&&(e="<",c?i=+i+1:A=+A+1),e==="<"&&(s="-0"),a=`${e+i}.${A}.${r}${s}`):c?a=`>=${i}.0.0${s} <${+i+1}.0.0-0`:I&&(a=`>=${i}.${A}.0${s} <${i}.${+A+1}.0-0`),$t("xRange return",a),a})},Cje=(n,t)=>($t("replaceStars",n,t),n.trim().replace(ma[Ui.STAR],"")),Bje=(n,t)=>($t("replaceGTE0",n,t),n.trim().replace(ma[t.includePrerelease?Ui.GTE0PRE:Ui.GTE0],"")),fje=n=>(t,o,a,e,i,A,r,s,g,c,I,d)=>(Xr(a)?o="":Xr(e)?o=`>=${a}.0.0${n?"-0":""}`:Xr(i)?o=`>=${a}.${e}.0${n?"-0":""}`:A?o=`>=${o}`:o=`>=${o}${n?"-0":""}`,Xr(g)?s="":Xr(c)?s=`<${+g+1}.0.0-0`:Xr(I)?s=`<${g}.${+c+1}.0-0`:d?s=`<=${g}.${c}.${I}-${d}`:n?s=`<${g}.${c}.${+I+1}-0`:s=`<=${s}`,`${o} ${s}`.trim()),Qje=(n,t,o)=>{for(let a=0;a0){let e=n[a].semver;if(e.major===t.major&&e.minor===t.minor&&e.patch===t.patch)return!0}return!1}return!0}});var cf=ee((mOA,bte)=>{"use strict";var If=Symbol("SemVer ANY"),C2=class n{static get ANY(){return If}constructor(t,o){if(o=mte(o),t instanceof n){if(t.loose===!!o.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),u2("comparator",t,o),this.options=o,this.loose=!!o.loose,this.parse(t),this.semver===If?this.value="":this.value=this.operator+this.semver.version,u2("comp",this)}parse(t){let o=this.options.loose?Ste[wte.COMPARATORLOOSE]:Ste[wte.COMPARATOR],a=t.match(o);if(!a)throw new TypeError(`Invalid comparator: ${t}`);this.operator=a[1]!==void 0?a[1]:"",this.operator==="="&&(this.operator=""),a[2]?this.semver=new Dte(a[2],this.options.loose):this.semver=If}toString(){return this.value}test(t){if(u2("Comparator.test",t,this.options.loose),this.semver===If||t===If)return!0;if(typeof t=="string")try{t=new Dte(t,this.options)}catch{return!1}return E2(t,this.operator,this.semver,this.options)}intersects(t,o){if(!(t instanceof n))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Ote(t.value,o).test(this.value):t.operator===""?t.value===""?!0:new Ote(this.value,o).test(t.semver):(o=mte(o),o.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!o.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||E2(this.semver,"<",t.semver,o)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||E2(this.semver,">",t.semver,o)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};bte.exports=C2;var mte=dO(),{safeRe:Ste,t:wte}=Wh(),E2=l2(),u2=sf(),Dte=Li(),Ote=nn()});var lf=ee((SOA,Mte)=>{"use strict";var yje=nn(),mje=(n,t,o)=>{try{t=new yje(t,o)}catch{return!1}return t.test(n)};Mte.exports=mje});var Tte=ee((wOA,_te)=>{"use strict";var Sje=nn(),wje=(n,t)=>new Sje(n,t).set.map(o=>o.map(a=>a.value).join(" ").trim().split(" "));_te.exports=wje});var Rte=ee((DOA,Nte)=>{"use strict";var Dje=Li(),Oje=nn(),bje=(n,t,o)=>{let a=null,e=null,i=null;try{i=new Oje(t,o)}catch{return null}return n.forEach(A=>{i.test(A)&&(!a||e.compare(A)===-1)&&(a=A,e=new Dje(a,o))}),a};Nte.exports=bje});var vte=ee((OOA,kte)=>{"use strict";var Mje=Li(),_je=nn(),Tje=(n,t,o)=>{let a=null,e=null,i=null;try{i=new _je(t,o)}catch{return null}return n.forEach(A=>{i.test(A)&&(!a||e.compare(A)===1)&&(a=A,e=new Mje(a,o))}),a};kte.exports=Tje});var Fte=ee((bOA,Gte)=>{"use strict";var B2=Li(),Nje=nn(),Pte=gf(),Rje=(n,t)=>{n=new Nje(n,t);let o=new B2("0.0.0");if(n.test(o)||(o=new B2("0.0.0-0"),n.test(o)))return o;o=null;for(let a=0;a{let r=new B2(A.semver.version);switch(A.operator){case">":r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!i||Pte(r,i))&&(i=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${A.operator}`)}}),i&&(!o||Pte(o,i))&&(o=i)}return o&&n.test(o)?o:null};Gte.exports=Rje});var Ute=ee((MOA,Lte)=>{"use strict";var kje=nn(),vje=(n,t)=>{try{return new kje(n,t).range||"*"}catch{return null}};Lte.exports=vje});var SO=ee((_OA,Yte)=>{"use strict";var Pje=Li(),xte=cf(),{ANY:Gje}=xte,Fje=nn(),Lje=lf(),Hte=gf(),Kte=BO(),Uje=QO(),Hje=fO(),Kje=(n,t,o,a)=>{n=new Pje(n,a),t=new Fje(t,a);let e,i,A,r,s;switch(o){case">":e=Hte,i=Uje,A=Kte,r=">",s=">=";break;case"<":e=Kte,i=Hje,A=Hte,r="<",s="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Lje(n,t,a))return!1;for(let g=0;g{B.semver===Gje&&(B=new xte(">=0.0.0")),I=I||B,d=d||B,e(B.semver,I.semver,a)?I=B:A(B.semver,d.semver,a)&&(d=B)}),I.operator===r||I.operator===s||(!d.operator||d.operator===r)&&i(n,d.semver))return!1;if(d.operator===s&&A(n,d.semver))return!1}return!0};Yte.exports=Kje});var Jte=ee((TOA,jte)=>{"use strict";var xje=SO(),Yje=(n,t,o)=>xje(n,t,">",o);jte.exports=Yje});var zte=ee((NOA,qte)=>{"use strict";var jje=SO(),Jje=(n,t,o)=>jje(n,t,"<",o);qte.exports=Jje});var Zte=ee((ROA,Wte)=>{"use strict";var Vte=nn(),qje=(n,t,o)=>(n=new Vte(n,o),t=new Vte(t,o),n.intersects(t,o));Wte.exports=qje});var $te=ee((kOA,Xte)=>{"use strict";var zje=lf(),Vje=on();Xte.exports=(n,t,o)=>{let a=[],e=null,i=null,A=n.sort((c,I)=>Vje(c,I,o));for(let c of A)zje(c,t,o)?(i=c,e||(e=c)):(i&&a.push([e,i]),i=null,e=null);e&&a.push([e,null]);let r=[];for(let[c,I]of a)c===I?r.push(c):!I&&c===A[0]?r.push("*"):I?c===A[0]?r.push(`<=${I}`):r.push(`${c} - ${I}`):r.push(`>=${c}`);let s=r.join(" || "),g=typeof t.raw=="string"?t.raw:String(t);return s.length{"use strict";var ere=nn(),y2=cf(),{ANY:f2}=y2,Q2=lf(),m2=on(),Wje=(n,t,o={})=>{if(n===t)return!0;n=new ere(n,o),t=new ere(t,o);let a=!1;e:for(let e of n.set){for(let i of t.set){let A=Xje(e,i,o);if(a=a||A!==null,A)continue e}if(a)return!1}return!0},Zje=[new y2(">=0.0.0-0")],Are=[new y2(">=0.0.0")],Xje=(n,t,o)=>{if(n===t)return!0;if(n.length===1&&n[0].semver===f2){if(t.length===1&&t[0].semver===f2)return!0;o.includePrerelease?n=Zje:n=Are}if(t.length===1&&t[0].semver===f2){if(o.includePrerelease)return!0;t=Are}let a=new Set,e,i;for(let B of n)B.operator===">"||B.operator===">="?e=tre(e,B,o):B.operator==="<"||B.operator==="<="?i=rre(i,B,o):a.add(B.semver);if(a.size>1)return null;let A;if(e&&i){if(A=m2(e.semver,i.semver,o),A>0)return null;if(A===0&&(e.operator!==">="||i.operator!=="<="))return null}for(let B of a){if(e&&!Q2(B,String(e),o)||i&&!Q2(B,String(i),o))return null;for(let f of t)if(!Q2(B,String(f),o))return!1;return!0}let r,s,g,c,I=i&&!o.includePrerelease&&i.semver.prerelease.length?i.semver:!1,d=e&&!o.includePrerelease&&e.semver.prerelease.length?e.semver:!1;I&&I.prerelease.length===1&&i.operator==="<"&&I.prerelease[0]===0&&(I=!1);for(let B of t){if(c=c||B.operator===">"||B.operator===">=",g=g||B.operator==="<"||B.operator==="<=",e){if(d&&B.semver.prerelease&&B.semver.prerelease.length&&B.semver.major===d.major&&B.semver.minor===d.minor&&B.semver.patch===d.patch&&(d=!1),B.operator===">"||B.operator===">="){if(r=tre(e,B,o),r===B&&r!==e)return!1}else if(e.operator===">="&&!B.test(e.semver))return!1}if(i){if(I&&B.semver.prerelease&&B.semver.prerelease.length&&B.semver.major===I.major&&B.semver.minor===I.minor&&B.semver.patch===I.patch&&(I=!1),B.operator==="<"||B.operator==="<="){if(s=rre(i,B,o),s===B&&s!==i)return!1}else if(i.operator==="<="&&!B.test(i.semver))return!1}if(!B.operator&&(i||e)&&A!==0)return!1}return!(e&&g&&!i&&A!==0||i&&c&&!e&&A!==0||d||I)},tre=(n,t,o)=>{if(!n)return t;let a=m2(n.semver,t.semver,o);return a>0?n:a<0||t.operator===">"&&n.operator===">="?t:n},rre=(n,t,o)=>{if(!n)return t;let a=m2(n.semver,t.semver,o);return a<0?n:a>0||t.operator==="<"&&n.operator==="<="?t:n};ire.exports=Wje});var wO=ee((POA,sre)=>{"use strict";var S2=Wh(),ore=Vh(),$je=Li(),nre=n2(),eJe=QI(),AJe=TAe(),tJe=RAe(),rJe=PAe(),iJe=LAe(),aJe=HAe(),oJe=xAe(),nJe=jAe(),sJe=qAe(),gJe=on(),cJe=ZAe(),IJe=$Ae(),lJe=CO(),dJe=rte(),pJe=ate(),hJe=gf(),EJe=BO(),uJe=c2(),CJe=I2(),BJe=fO(),fJe=QO(),QJe=l2(),yJe=pte(),mJe=Ete(),SJe=cf(),wJe=nn(),DJe=lf(),OJe=Tte(),bJe=Rte(),MJe=vte(),_Je=Fte(),TJe=Ute(),NJe=SO(),RJe=Jte(),kJe=zte(),vJe=Zte(),PJe=$te(),GJe=are();sre.exports={parse:eJe,valid:AJe,clean:tJe,inc:rJe,diff:iJe,major:aJe,minor:oJe,patch:nJe,prerelease:sJe,compare:gJe,rcompare:cJe,compareLoose:IJe,compareBuild:lJe,sort:dJe,rsort:pJe,gt:hJe,lt:EJe,eq:uJe,neq:CJe,gte:BJe,lte:fJe,cmp:QJe,coerce:yJe,truncate:mJe,Comparator:SJe,Range:wJe,satisfies:DJe,toComparators:OJe,maxSatisfying:bJe,minSatisfying:MJe,minVersion:_Je,validRange:TJe,outside:NJe,gtr:RJe,ltr:kJe,intersects:vJe,simplifyRange:PJe,subset:GJe,SemVer:$je,re:S2.re,src:S2.src,tokens:S2.t,SEMVER_SPEC_VERSION:ore.SEMVER_SPEC_VERSION,RELEASE_TYPES:ore.RELEASE_TYPES,compareIdentifiers:nre.compareIdentifiers,rcompareIdentifiers:nre.rcompareIdentifiers}});var oc,DO=ue(()=>{oc={name:"sharp",description:"High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",version:"0.35.3",author:"Lovell Fuller ",homepage:"https://sharp.pixelplumbing.com",contributors:["Pierre Inglebert ","Jonathan Ong ","Chanon Sajjamanochai ","Juliano Julio ","Daniel Gasienica ","Julian Walker ","Amit Pitaru ","Brandon Aaron ","Andreas Lind ","Maurus Cuelenaere ","Linus Unneb\xE4ck ","Victor Mateevitsi ","Alaric Holloway ","Bernhard K. Weisshuhn ","Chris Riley ","David Carley ","John Tobin ","Kenton Gray ","Felix B\xFCnemann ","Samy Al Zahrani ","Chintan Thakkar ","F. Orlando Galashan ","Kleis Auke Wolthuizen ","Matt Hirsch ","Matthias Thoemmes ","Patrick Paskaris ","J\xE9r\xE9my Lal ","Rahul Nanwani ","Alice Monday ","Kristo Jorgenson ","YvesBos ","Guy Maliar ","Nicolas Coden ","Matt Parrish ","Marcel Bretschneider ","Matthew McEachen ","Jarda Kot\u011B\u0161ovec ","Kenric D'Souza ","Oleh Aleinyk ","Marcel Bretschneider ","Andrea Bianco ","Rik Heywood ","Thomas Parisot ","Nathan Graves ","Tom Lokhorst ","Espen Hovlandsdal ","Sylvain Dumont ","Alun Davies ","Aidan Hoolachan ","Axel Eirola ","Freezy ","Daiz ","Julian Aubourg ","Keith Belovay ","Michael B. Klein ","Jordan Prudhomme ","Ilya Ovdin ","Andargor ","Paul Neave ","Brendan Kennedy ","Brychan Bennett-Odlum ","Edward Silverton ","Roman Malieiev ","Tomas Szabo ","Robert O'Rourke ","Guillermo Alfonso Varela Chouci\xF1o ","Christian Flintrup ","Manan Jadhav ","Leon Radley ","alza54 ","Jacob Smith ","Michael Nutt ","Brad Parham ","Taneli Vatanen ","Joris Dugu\xE9 ","Chris Banks ","Ompal Singh ","Brodan ","Ankur Parihar ","Brahim Ait elhaj ","Mart Jansink ","Lachlan Newman ","Dennis Beatty ","Ingvar Stepanyan ","Don Denton ","Dmytro Tiapukhin ","Florian Lefebvre "],scripts:{build:"node install/build.js","build:dist":"node scripts/build.mjs",clean:"rm -rf src/build/ test/fixtures/output.*",test:"npm run lint && npm run test-unit",lint:"npm run lint-cpp && npm run lint-js && npm run lint-types && npm run lint-publish","lint-cpp":"cpplint --quiet src/*.h src/*.cc","lint-js":"biome lint","lint-publish":"publint --strict","lint-types":"tsd --files ./test/types/sharp.test-d.{cts,mts}","test-leak":"./test/leak/leak.sh","test-unit":"node --experimental-test-coverage test/unit.mjs","package-from-local-build":"node npm/from-local-build.js","package-wasm-wrappers":"node npm/wasm-wrappers.js","package-release-notes":"node npm/release-notes.js","docs-build":"node docs/build.mjs","docs-serve":"cd docs && npm start","docs-publish":"cd docs && npm run build && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp"},type:"commonjs",files:["dist","install","lib/index.d.ts","src/*.{cc,h,gyp}"],main:"./dist/index.cjs",module:"./dist/index.mjs",types:"./dist/index.d.mts",exports:{".":{import:{types:"./dist/index.d.mts",default:"./dist/index.mjs"},require:{types:"./dist/index.d.cts",default:"./dist/index.cjs"}}},sideEffects:!0,repository:{type:"git",url:"git+https://github.com/lovell/sharp.git"},keywords:["jpeg","png","webp","avif","tiff","gif","svg","jp2","dzi","image","resize","thumbnail","crop","embed","libvips","vips"],dependencies:{"@img/colour":"^1.1.0","detect-libc":"^2.1.2",semver:"^7.8.5"},optionalDependencies:{"@img/sharp-darwin-arm64":"0.35.3","@img/sharp-darwin-x64":"0.35.3","@img/sharp-freebsd-wasm32":"0.35.3","@img/sharp-libvips-darwin-arm64":"1.3.2","@img/sharp-libvips-darwin-x64":"1.3.2","@img/sharp-libvips-linux-arm":"1.3.2","@img/sharp-libvips-linux-arm64":"1.3.2","@img/sharp-libvips-linux-ppc64":"1.3.2","@img/sharp-libvips-linux-riscv64":"1.3.2","@img/sharp-libvips-linux-s390x":"1.3.2","@img/sharp-libvips-linux-x64":"1.3.2","@img/sharp-libvips-linuxmusl-arm64":"1.3.2","@img/sharp-libvips-linuxmusl-x64":"1.3.2","@img/sharp-linux-arm":"0.35.3","@img/sharp-linux-arm64":"0.35.3","@img/sharp-linux-ppc64":"0.35.3","@img/sharp-linux-riscv64":"0.35.3","@img/sharp-linux-s390x":"0.35.3","@img/sharp-linux-x64":"0.35.3","@img/sharp-linuxmusl-arm64":"0.35.3","@img/sharp-linuxmusl-x64":"0.35.3","@img/sharp-webcontainers-wasm32":"0.35.3","@img/sharp-win32-arm64":"0.35.3","@img/sharp-win32-ia32":"0.35.3","@img/sharp-win32-x64":"0.35.3"},peerDependenciesMeta:{"@types/node":{optional:!0}},devDependencies:{"@biomejs/biome":"^2.5.1","@cpplint/cli":"^0.1.0","@emnapi/runtime":"^1.11.1","@img/sharp-libvips-dev":"1.3.2","@img/sharp-libvips-dev-wasm32":"1.3.2","@img/sharp-libvips-win32-arm64":"1.3.2","@img/sharp-libvips-win32-ia32":"1.3.2","@img/sharp-libvips-win32-x64":"1.3.2","@types/node":"*",emnapi:"^1.11.1","exif-reader":"^2.0.3","extract-zip":"^2.0.1",icc:"^4.0.0","node-addon-api":"^8.9.0","node-gyp":"^12.4.0",publint:"^0.3.21","tar-fs":"^3.1.3",tsd:"^0.33.0"},license:"Apache-2.0",engines:{node:">=20.9.0"},config:{libvips:">=8.18.3"},funding:{url:"https://opencollective.com/libvips"}}});import{spawnSync as df}from"node:child_process";import{createHash as LJe}from"node:crypto";var pf,D2,UJe,cre,HJe,O2,KJe,Ire,xJe,Zh,YJe,jJe,JJe,qJe,lre,zJe,gre,VJe,WJe,dre,ZJe,XJe,pre,w2,$Je,OO,b2=ue(()=>{pf=ze(wO(),1),D2=ze(lO(),1);DO();UJe=process.env.npm_package_config_libvips||oc.config.libvips,cre=pf.default.coerce(UJe).version,HJe=["darwin-arm64","darwin-x64","freebsd-arm64","freebsd-x64","linux-arm","linux-arm64","linux-ppc64","linux-riscv64","linux-s390x","linux-wasm32","linux-x64","linuxmusl-arm64","linuxmusl-x64","win32-arm64","win32-ia32","win32-x64"],O2={encoding:"utf8",shell:!0},KJe=n=>{n instanceof Error?console.error(`sharp: Installation error: ${n.message}`):console.log(`sharp: ${n}`)},Ire=()=>D2.default.isNonGlibcLinuxSync()?D2.default.familySync():"",xJe=()=>`${process.platform}${Ire()}-${process.arch}`,Zh=()=>{if(lre())return"wasm32";let{npm_config_arch:n,npm_config_platform:t,npm_config_libc:o}=process.env,a=typeof o=="string"?o:Ire();return`${t||process.platform}${a}-${n||process.arch}`},YJe=()=>{try{return $e(`@img/sharp-libvips-dev-${Zh()}/include`)}catch{try{return $e("@img/sharp-libvips-dev/include")}catch{}}return""},jJe=()=>{try{return $e("@img/sharp-libvips-dev/cplusplus")}catch{}return""},JJe=()=>{try{return $e(`@img/sharp-libvips-dev-${Zh()}/lib`)}catch{try{return $e(`@img/sharp-libvips-${Zh()}/lib`)}catch{}}return""},qJe=()=>{if(process.release?.name==="node"&&process.versions&&!pf.default.satisfies(process.versions.node,oc.engines.node))return{found:process.versions.node,expected:oc.engines.node}},lre=()=>{let{CC:n}=process.env;return!!n?.endsWith("/emcc")},zJe=()=>process.platform==="darwin"&&process.arch==="x64"?(df("sysctl sysctl.proc_translated",O2).stdout||"").trim()==="sysctl.proc_translated: 1":!1,gre=n=>LJe("sha512").update(n).digest("hex"),VJe=()=>{try{let n=gre(`imgsharp-libvips-${Zh()}`),t=pf.default.coerce(oc.optionalDependencies[`@img/sharp-libvips-${Zh()}`],{includePrerelease:!0}).version;return gre(`${n}npm:${t}`).slice(0,10)}catch{}return""},WJe=()=>df(`node-gyp rebuild --directory=src ${lre()?"--nodedir=emscripten":""}`,{...O2,stdio:"inherit"}).status,dre=()=>process.platform!=="win32"?(df("pkg-config --modversion vips-cpp",{...O2,env:{...process.env,PKG_CONFIG_PATH:pre()}}).stdout||"").trim():"",ZJe=()=>{try{let n=(df("brew",["--prefix"],{encoding:"utf8"}).stdout||"").trim();if(n)return`${n}/lib/pkgconfig`}catch{}},XJe=()=>{try{let n=(df("pkg-config",["--variable","pc_path","pkg-config"],{encoding:"utf8"}).stdout||"").trim();if(n)return n}catch{}},pre=()=>process.platform!=="win32"?[ZJe(),XJe(),process.env.PKG_CONFIG_PATH].filter(Boolean).join(":"):"",w2=(n,t,o)=>(o&&o(`Detected ${t}, skipping search for globally-installed libvips`),n),$Je=n=>{if(process.env.SHARP_IGNORE_GLOBAL_LIBVIPS)return w2(!1,"SHARP_IGNORE_GLOBAL_LIBVIPS",n);if(process.env.SHARP_FORCE_GLOBAL_LIBVIPS)return w2(!0,"SHARP_FORCE_GLOBAL_LIBVIPS",n);if(zJe())return w2(!1,"Rosetta",n);let t=dre();return!!t&&pf.default.gte(t,cre)},OO={minimumLibvipsVersion:cre,prebuiltPlatforms:HJe,buildPlatformArch:Zh,buildSharpLibvipsIncludeDir:YJe,buildSharpLibvipsCPlusPlusDir:jJe,buildSharpLibvipsLibDir:JJe,isUnsupportedNodeRuntime:qJe,runtimePlatformArch:xJe,log:KJe,yarnLocator:VJe,spawnRebuild:WJe,globalLibvipsVersion:dre,pkgConfigPath:pre,useGlobalLibvips:$Je}});import{createRequire as eqe}from"node:module";var bO,$r,Ere,Aqe,hre,tqe,rqe,nc,xt,yI,Ot,hf=ue(()=>{bO=ze(lO(),1);b2();DO();$r=eqe(import.meta.url),{version:Ere}=oc,{runtimePlatformArch:Aqe,isUnsupportedNodeRuntime:hre,prebuiltPlatforms:tqe,minimumLibvipsVersion:rqe}=OO,nc=Aqe(),yI=[];try{xt=$r(`../src/build/Release/sharp-${nc}-${Ere}.node`)}catch(n){yI.push(n)}if(!xt)try{xt=$r(`../src/build/Release/sharp-wasm32-${Ere}.node`)}catch(n){yI.push(n)}if(!xt)try{switch(nc){case"darwin-arm64":xt=$r("@img/sharp-darwin-arm64/sharp.node");break;case"darwin-x64":xt=$r("@img/sharp-darwin-x64/sharp.node");break;case"linux-arm":xt=$r("@img/sharp-linux-arm/sharp.node");break;case"linux-arm64":xt=$r("@img/sharp-linux-arm64/sharp.node");break;case"linux-ppc64":xt=$r("@img/sharp-linux-ppc64/sharp.node");break;case"linux-riscv64":xt=$r("@img/sharp-linux-riscv64/sharp.node");break;case"linux-s390x":xt=$r("@img/sharp-linux-s390x/sharp.node");break;case"linux-x64":xt=$r("@img/sharp-linux-x64/sharp.node");break;case"linuxmusl-arm64":xt=$r("@img/sharp-linuxmusl-arm64/sharp.node");break;case"linuxmusl-x64":xt=$r("@img/sharp-linuxmusl-x64/sharp.node");break;case"win32-arm64":xt=$r("@img/sharp-win32-arm64/sharp.node");break;case"win32-ia32":xt=$r("@img/sharp-win32-ia32/sharp.node");break;case"win32-x64":xt=$r("@img/sharp-win32-x64/sharp.node");break;case"freebsd-arm64":case"freebsd-x64":xt=$r("@img/sharp-freebsd-wasm32/sharp.node");break;case"linux-wasm32":xt=$r("@img/sharp-webcontainers-wasm32/sharp.node");break}if(xt&&["linux-x64","linuxmusl-x64"].includes(nc)&&!xt._isUsingX64V2()){let n=new Error("Prebuilt binaries for Linux x64 require v2 microarchitecture");n.code="Unsupported CPU",yI.push(n),xt=null}xt&&process.versions.electron&&nc.startsWith("linux")&&process.emitWarning("Binaries provided by Electron for use on Linux may be incompatible with sharp - see https://sharp.pixelplumbing.com/install#electron-and-linux",{code:"SharpElectronLinux"})}catch(n){yI.push(n)}if(!xt)try{xt=$r("@img/sharp-wasm32/sharp.node")}catch(n){yI.push(n)}if(!xt){let[n,t,o]=["linux","darwin","win32"].map(i=>nc.startsWith(i)),a=[`Could not load the "sharp" module using the ${nc} runtime`];yI.forEach(i=>{i.code.endsWith("MODULE_NOT_FOUND")||a.push(`${i.code}: ${i.message}`)});let e=yI.map(i=>i.message).join(" ");if(a.push("Possible solutions:"),hre()){let{found:i,expected:A}=hre();a.push("- Please upgrade Node.js:",` Found ${i}`,` Requires ${A}`)}else if(tqe.includes(nc)){let[i,A]=nc.split("-"),r=i.endsWith("musl")?" --libc=musl":"";a.push("- Ensure optional dependencies can be installed:"," npm install --include=optional sharp","- Ensure your package manager supports multi-platform installation:"," See https://sharp.pixelplumbing.com/install#cross-platform","- Add platform-specific dependencies:",` npm install --os=${i.replace("musl","")}${r} --cpu=${A} sharp`)}else a.push(`- Manually install libvips >= ${rqe}`," See https://sharp.pixelplumbing.com/install#building-from-source","- Add WebAssembly-based dependencies:"," npm install sharp @img/sharp-wasm32");if(n&&/(symbol not found|CXXABI_)/i.test(e))try{let{config:i}=$r(`@img/sharp-libvips-${nc}/package`),A=`${(0,bO.familySync)()} ${(0,bO.versionSync)()}`,r=`${i.musl?"musl":"glibc"} ${i.musl||i.glibc}`;a.push("- Update your OS:",` Found ${A}`,` Requires ${r}`)}catch{}throw n&&/\/snap\/core[0-9]{2}/.test(e)&&a.push("- Remove the Node.js Snap, which does not support native modules"," snap remove node"),t&&/Incompatible library version/.test(e)&&a.push("- Update Homebrew:"," brew update && brew upgrade vips"),yI.some(i=>i.code==="ERR_DLOPEN_DISABLED")&&a.push("- Run Node.js without using the --no-addons flag"),o&&/The specified procedure could not be found/.test(e)&&a.push("- Using the canvas package on Windows?"," See https://sharp.pixelplumbing.com/install#canvas-and-windows","- Check for outdated versions of sharp in the dependency tree:"," npm ls sharp"),a.push("- Consult the installation documentation:"," See https://sharp.pixelplumbing.com/install"),new Error(a.join(` +`))}Ot=xt});import iqe from"node:util";import M2 from"node:stream";function nqe(){let n=this.constructor.call(),{debuglog:t,queueListener:o,...a}=this.options;return n.options=structuredClone(a),n.options.debuglog=t,n.options.queueListener=o,this._isStreamInput()&&this.on("finish",()=>{this._flattenBufferIn(),n.options.input.buffer=this.options.input.buffer,n.emit("finish")}),n}var aqe,oqe,od,Vs,ure=ue(()=>{Ys();hf();aqe=iqe.debuglog("sharp"),oqe=n=>{od.queue.emit("change",n)},od=function(n,t){if(arguments.length===1&&!O.defined(n))throw new Error("Invalid input");return this instanceof od?(M2.Duplex.call(this),this.options={topOffsetPre:-1,leftOffsetPre:-1,widthPre:-1,heightPre:-1,topOffsetPost:-1,leftOffsetPost:-1,widthPost:-1,heightPost:-1,width:-1,height:-1,canvas:"crop",position:0,resizeBackground:[0,0,0,255],angle:0,rotationAngle:0,rotationBackground:[0,0,0,255],rotateBefore:!1,orientBefore:!1,flip:!1,flop:!1,extendTop:0,extendBottom:0,extendLeft:0,extendRight:0,extendBackground:[0,0,0,255],extendWith:"background",withoutEnlargement:!1,withoutReduction:!1,affineMatrix:[],affineBackground:[0,0,0,255],affineIdx:0,affineIdy:0,affineOdx:0,affineOdy:0,affineInterpolator:this.constructor.interpolators.bilinear,kernel:"lanczos3",fastShrinkOnLoad:!0,tint:[-1,0,0,0],flatten:!1,flattenBackground:[0,0,0],unflatten:!1,negate:!1,negateAlpha:!0,medianSize:0,blurSigma:0,precision:"integer",minAmpl:.2,sharpenSigma:0,sharpenM1:1,sharpenM2:2,sharpenX1:2,sharpenY2:10,sharpenY3:20,threshold:0,thresholdGrayscale:!0,trimBackground:[],trimThreshold:-1,trimLineArt:!1,trimMargin:0,dilateWidth:0,erodeWidth:0,gamma:0,gammaOut:0,greyscale:!1,normalise:!1,normaliseLower:1,normaliseUpper:99,claheWidth:0,claheHeight:0,claheMaxSlope:3,brightness:1,saturation:1,hue:0,lightness:0,booleanBufferIn:null,booleanFileIn:"",joinChannelIn:[],extractChannel:-1,removeAlpha:!1,ensureAlpha:-1,colourspace:"srgb",colourspacePipeline:"last",composite:[],fileOut:"",formatOut:"input",streamOut:!1,typedArrayOut:!1,keepMetadata:0,withMetadataOrientation:-1,withMetadataDensity:0,withIccProfile:"",withExif:{},withExifMerge:!0,withXmp:"",keepGainMap:!1,withGainMap:!1,resolveWithObject:!1,loop:-1,delay:[],jpegQuality:80,jpegProgressive:!1,jpegChromaSubsampling:"4:2:0",jpegTrellisQuantisation:!1,jpegOvershootDeringing:!1,jpegOptimiseScans:!1,jpegOptimiseCoding:!0,jpegQuantisationTable:0,pngProgressive:!1,pngCompressionLevel:6,pngAdaptiveFiltering:!1,pngPalette:!1,pngQuality:100,pngEffort:7,pngBitdepth:8,pngDither:1,jp2Quality:80,jp2TileHeight:512,jp2TileWidth:512,jp2Lossless:!1,jp2ChromaSubsampling:"4:4:4",webpQuality:80,webpAlphaQuality:100,webpLossless:!1,webpNearLossless:!1,webpSmartSubsample:!1,webpSmartDeblock:!1,webpPreset:"default",webpEffort:4,webpMinSize:!1,webpMixed:!1,webpExact:!1,gifBitdepth:8,gifEffort:7,gifDither:1,gifInterFrameMaxError:0,gifInterPaletteMaxError:3,gifKeepDuplicateFrames:!1,gifReuse:!0,gifProgressive:!1,tiffQuality:80,tiffCompression:"jpeg",tiffBigtiff:!1,tiffPredictor:"horizontal",tiffPyramid:!1,tiffMiniswhite:!1,tiffBitdepth:0,tiffTile:!1,tiffTileHeight:256,tiffTileWidth:256,tiffXres:1,tiffYres:1,tiffResolutionUnit:"inch",heifQuality:50,heifLossless:!1,heifCompression:"av1",heifEffort:4,heifChromaSubsampling:"4:4:4",heifBitdepth:8,heifTune:"auto",jxlDistance:1,jxlDecodingTier:0,jxlEffort:7,jxlLossless:!1,rawDepth:"uchar",tileSize:256,tileOverlap:0,tileContainer:"fs",tileLayout:"dz",tileFormat:"last",tileDepth:"last",tileAngle:0,tileSkipBlanks:-1,tileBackground:[255,255,255,255],tileCentre:!1,tileId:"https://example.com/iiif",tileBasename:"",timeoutSeconds:0,linearA:[],linearB:[],pdfBackground:[255,255,255,255],debuglog:o=>{this.emit("warning",o),aqe(o)},queueListener:oqe},this.options.input=this._createInputDescriptor(n,t,{allowStream:!0}),this):new od(n,t)};Object.setPrototypeOf(od.prototype,M2.Duplex.prototype);Object.setPrototypeOf(od,M2.Duplex);Object.assign(od.prototype,{clone:nqe});Vs=od});function Cre(n){let t=gqe.filter(o=>O.defined(n[o])).map(o=>[o,n[o]]);return t.length?Object.fromEntries(t):void 0}function cqe(n,t,o){let a={autoOrient:!1,failOn:"warning",limitInputPixels:268402689,limitInputChannels:5,ignoreIcc:!1,unlimited:!1,sequentialRead:!0};if(O.string(n))a.file=n;else if(O.buffer(n)){if(n.length===0)throw Error("Input Buffer is empty");a.buffer=n}else if(O.arrayBuffer(n)){if(n.byteLength===0)throw Error("Input bit Array is empty");a.buffer=Buffer.from(n,0,n.byteLength)}else if(O.typedArray(n)){if(n.length===0)throw Error("Input Bit Array is empty");a.buffer=Buffer.from(n.buffer,n.byteOffset,n.byteLength)}else if(O.plainObject(n)&&!O.defined(t))t=n,Cre(t)&&(a.buffer=[]);else if(!O.defined(n)&&!O.defined(t)&&O.object(o)&&o.allowStream)a.buffer=[];else if(Array.isArray(n))if(n.length>1)if(!this.options.joining)this.options.joining=!0,this.options.join=n.map(e=>this._createInputDescriptor(e));else throw new Error("Recursive join is unsupported");else throw new Error("Expected at least two images to join");else throw new Error(`Unsupported input '${n}' of type ${typeof n}${O.defined(t)?` when also providing options of type ${typeof t}`:""}`);if(O.object(t)){if(O.defined(t.failOn))if(O.string(t.failOn)&&O.inArray(t.failOn,["none","truncated","error","warning"]))a.failOn=t.failOn;else throw O.invalidParameterError("failOn","one of: none, truncated, error, warning",t.failOn);if(O.defined(t.autoOrient))if(O.bool(t.autoOrient))a.autoOrient=t.autoOrient;else throw O.invalidParameterError("autoOrient","boolean",t.autoOrient);if(O.defined(t.density))if(O.number(t.density)&&O.inRange(t.density,1,1e5))a.density=t.density;else throw O.invalidParameterError("density","number between 1 and 100000",t.density);if(O.defined(t.ignoreIcc))if(O.bool(t.ignoreIcc))a.ignoreIcc=t.ignoreIcc;else throw O.invalidParameterError("ignoreIcc","boolean",t.ignoreIcc);if(O.defined(t.limitInputPixels))if(O.bool(t.limitInputPixels))a.limitInputPixels=t.limitInputPixels?16383**2:0;else if(O.integer(t.limitInputPixels)&&O.inRange(t.limitInputPixels,0,Number.MAX_SAFE_INTEGER))a.limitInputPixels=t.limitInputPixels;else throw O.invalidParameterError("limitInputPixels","positive integer",t.limitInputPixels);if(O.defined(t.limitInputChannels))if(O.bool(t.limitInputChannels))a.limitInputChannels=t.limitInputChannels?5:0;else if(O.integer(t.limitInputChannels)&&O.inRange(t.limitInputChannels,0,Number.MAX_SAFE_INTEGER))a.limitInputChannels=t.limitInputChannels;else throw O.invalidParameterError("limitInputChannels","positive integer",t.limitInputChannels);if(O.defined(t.unlimited))if(O.bool(t.unlimited))a.unlimited=t.unlimited;else throw O.invalidParameterError("unlimited","boolean",t.unlimited);if(O.defined(t.sequentialRead))if(O.bool(t.sequentialRead))a.sequentialRead=t.sequentialRead;else throw O.invalidParameterError("sequentialRead","boolean",t.sequentialRead);if(O.defined(t.raw)){if(O.object(t.raw)&&O.integer(t.raw.width)&&O.inRange(t.raw.width,1,1e8)&&O.integer(t.raw.height)&&O.inRange(t.raw.height,1,1e8)&&O.integer(t.raw.channels)&&O.inRange(t.raw.channels,1,4))switch(a.rawWidth=t.raw.width,a.rawHeight=t.raw.height,a.rawChannels=t.raw.channels,n.constructor){case Uint8Array:case Uint8ClampedArray:a.rawDepth="uchar";break;case Int8Array:a.rawDepth="char";break;case Uint16Array:a.rawDepth="ushort";break;case Int16Array:a.rawDepth="short";break;case Uint32Array:a.rawDepth="uint";break;case Int32Array:a.rawDepth="int";break;case Float32Array:a.rawDepth="float";break;case Float64Array:a.rawDepth="double";break;default:a.rawDepth="uchar";break}else throw new Error("Expected width, height and channels for raw pixel input");if(a.rawPremultiplied=!1,O.defined(t.raw.premultiplied))if(O.bool(t.raw.premultiplied))a.rawPremultiplied=t.raw.premultiplied;else throw O.invalidParameterError("raw.premultiplied","boolean",t.raw.premultiplied);if(a.rawPageHeight=0,O.defined(t.raw.pageHeight))if(O.integer(t.raw.pageHeight)&&t.raw.pageHeight>0&&t.raw.pageHeight<=t.raw.height){if(t.raw.height%t.raw.pageHeight!==0)throw new Error(`Expected raw.height ${t.raw.height} to be a multiple of raw.pageHeight ${t.raw.pageHeight}`);a.rawPageHeight=t.raw.pageHeight}else throw O.invalidParameterError("raw.pageHeight","positive integer",t.raw.pageHeight)}if(O.defined(t.animated))if(O.bool(t.animated))a.pages=t.animated?-1:1;else throw O.invalidParameterError("animated","boolean",t.animated);if(O.defined(t.pages))if(O.integer(t.pages)&&O.inRange(t.pages,-1,1e5))a.pages=t.pages;else throw O.invalidParameterError("pages","integer between -1 and 100000",t.pages);if(O.defined(t.page))if(O.integer(t.page)&&O.inRange(t.page,0,1e5))a.page=t.page;else throw O.invalidParameterError("page","integer between 0 and 100000",t.page);if(O.object(t.openSlide)&&O.defined(t.openSlide.level))if(O.integer(t.openSlide.level)&&O.inRange(t.openSlide.level,0,256))a.openSlideLevel=t.openSlide.level;else throw O.invalidParameterError("openSlide.level","integer between 0 and 256",t.openSlide.level);else if(O.defined(t.level))if(O.integer(t.level)&&O.inRange(t.level,0,256))a.openSlideLevel=t.level;else throw O.invalidParameterError("level","integer between 0 and 256",t.level);if(O.object(t.tiff)&&O.defined(t.tiff.subifd))if(O.integer(t.tiff.subifd)&&O.inRange(t.tiff.subifd,-1,1e5))a.tiffSubifd=t.tiff.subifd;else throw O.invalidParameterError("tiff.subifd","integer between -1 and 100000",t.tiff.subifd);else if(O.defined(t.subifd))if(O.integer(t.subifd)&&O.inRange(t.subifd,-1,1e5))a.tiffSubifd=t.subifd;else throw O.invalidParameterError("subifd","integer between -1 and 100000",t.subifd);if(O.object(t.svg)){if(O.defined(t.svg.stylesheet))if(O.string(t.svg.stylesheet))a.svgStylesheet=t.svg.stylesheet;else throw O.invalidParameterError("svg.stylesheet","string",t.svg.stylesheet);if(O.defined(t.svg.highBitdepth))if(O.bool(t.svg.highBitdepth))a.svgHighBitdepth=t.svg.highBitdepth;else throw O.invalidParameterError("svg.highBitdepth","boolean",t.svg.highBitdepth)}if(O.object(t.pdf)&&O.defined(t.pdf.background)?a.pdfBackground=this._getBackgroundColourOption(t.pdf.background):O.defined(t.pdfBackground)&&(a.pdfBackground=this._getBackgroundColourOption(t.pdfBackground)),O.object(t.jp2)&&O.defined(t.jp2.oneshot))if(O.bool(t.jp2.oneshot))a.jp2Oneshot=t.jp2.oneshot;else throw O.invalidParameterError("jp2.oneshot","boolean",t.jp2.oneshot);if(O.defined(t.create))if(O.object(t.create)&&O.integer(t.create.width)&&O.inRange(t.create.width,1,1e8)&&O.integer(t.create.height)&&O.inRange(t.create.height,1,1e8)&&O.integer(t.create.channels)){if(a.createWidth=t.create.width,a.createHeight=t.create.height,a.createChannels=t.create.channels,a.createPageHeight=0,O.defined(t.create.pageHeight))if(O.integer(t.create.pageHeight)&&t.create.pageHeight>0&&t.create.pageHeight<=t.create.height){if(t.create.height%t.create.pageHeight!==0)throw new Error(`Expected create.height ${t.create.height} to be a multiple of create.pageHeight ${t.create.pageHeight}`);a.createPageHeight=t.create.pageHeight}else throw O.invalidParameterError("create.pageHeight","positive integer",t.create.pageHeight);if(O.defined(t.create.noise)){if(!O.object(t.create.noise))throw new Error("Expected noise to be an object");if(t.create.noise.type!=="gaussian")throw new Error("Only gaussian noise is supported at the moment");if(a.createNoiseType=t.create.noise.type,!O.inRange(t.create.channels,1,4))throw O.invalidParameterError("create.channels","number between 1 and 4",t.create.channels);if(a.createNoiseMean=128,O.defined(t.create.noise.mean))if(O.number(t.create.noise.mean)&&O.inRange(t.create.noise.mean,0,1e4))a.createNoiseMean=t.create.noise.mean;else throw O.invalidParameterError("create.noise.mean","number between 0 and 10000",t.create.noise.mean);if(a.createNoiseSigma=30,O.defined(t.create.noise.sigma))if(O.number(t.create.noise.sigma)&&O.inRange(t.create.noise.sigma,0,1e4))a.createNoiseSigma=t.create.noise.sigma;else throw O.invalidParameterError("create.noise.sigma","number between 0 and 10000",t.create.noise.sigma)}else if(O.defined(t.create.background)){if(!O.inRange(t.create.channels,3,4))throw O.invalidParameterError("create.channels","number between 3 and 4",t.create.channels);a.createBackground=this._getBackgroundColourOption(t.create.background)}else throw new Error("Expected valid noise or background to create a new input image");delete a.buffer}else throw new Error("Expected valid width, height and channels to create a new input image");if(O.defined(t.text))if(O.object(t.text)&&O.string(t.text.text)){if(a.textValue=t.text.text,O.defined(t.text.height)&&O.defined(t.text.dpi))throw new Error("Expected only one of dpi or height");if(O.defined(t.text.font))if(O.string(t.text.font))a.textFont=t.text.font;else throw O.invalidParameterError("text.font","string",t.text.font);if(O.defined(t.text.fontfile))if(O.string(t.text.fontfile))a.textFontfile=t.text.fontfile;else throw O.invalidParameterError("text.fontfile","string",t.text.fontfile);if(O.defined(t.text.width))if(O.integer(t.text.width)&&O.inRange(t.text.width,1,1e6))a.textWidth=t.text.width;else throw O.invalidParameterError("text.width","integer between 1 and 1000000",t.text.width);if(O.defined(t.text.height))if(O.integer(t.text.height)&&O.inRange(t.text.height,1,1e6))a.textHeight=t.text.height;else throw O.invalidParameterError("text.height","integer between 1 and 1000000",t.text.height);if(O.defined(t.text.align))if(O.string(t.text.align)&&O.string(this.constructor.align[t.text.align]))a.textAlign=this.constructor.align[t.text.align];else throw O.invalidParameterError("text.align","valid alignment",t.text.align);if(O.defined(t.text.justify))if(O.bool(t.text.justify))a.textJustify=t.text.justify;else throw O.invalidParameterError("text.justify","boolean",t.text.justify);if(O.defined(t.text.dpi))if(O.integer(t.text.dpi)&&O.inRange(t.text.dpi,1,1e6))a.textDpi=t.text.dpi;else throw O.invalidParameterError("text.dpi","integer between 1 and 1000000",t.text.dpi);if(O.defined(t.text.rgba))if(O.bool(t.text.rgba))a.textRgba=t.text.rgba;else throw O.invalidParameterError("text.rgba","bool",t.text.rgba);if(O.defined(t.text.spacing))if(O.integer(t.text.spacing)&&O.inRange(t.text.spacing,-1e6,1e6))a.textSpacing=t.text.spacing;else throw O.invalidParameterError("text.spacing","integer between -1000000 and 1000000",t.text.spacing);if(O.defined(t.text.wrap))if(O.string(t.text.wrap)&&O.inArray(t.text.wrap,["word","char","word-char","none"]))a.textWrap=t.text.wrap;else throw O.invalidParameterError("text.wrap","one of: word, char, word-char, none",t.text.wrap);delete a.buffer}else throw new Error("Expected a valid string to create an image with text.");if(O.defined(t.join))if(O.defined(this.options.join)){if(O.defined(t.join.animated))if(O.bool(t.join.animated))a.joinAnimated=t.join.animated;else throw O.invalidParameterError("join.animated","boolean",t.join.animated);if(O.defined(t.join.across))if(O.integer(t.join.across)&&O.inRange(t.join.across,1,1e6))a.joinAcross=t.join.across;else throw O.invalidParameterError("join.across","integer between 1 and 100000",t.join.across);if(O.defined(t.join.shim))if(O.integer(t.join.shim)&&O.inRange(t.join.shim,0,1e6))a.joinShim=t.join.shim;else throw O.invalidParameterError("join.shim","integer between 0 and 100000",t.join.shim);if(O.defined(t.join.background)&&(a.joinBackground=this._getBackgroundColourOption(t.join.background)),O.defined(t.join.halign))if(O.string(t.join.halign)&&O.string(this.constructor.align[t.join.halign]))a.joinHalign=this.constructor.align[t.join.halign];else throw O.invalidParameterError("join.halign","valid alignment",t.join.halign);if(O.defined(t.join.valign))if(O.string(t.join.valign)&&O.string(this.constructor.align[t.join.valign]))a.joinValign=this.constructor.align[t.join.valign];else throw O.invalidParameterError("join.valign","valid alignment",t.join.valign)}else throw new Error("Expected input to be an array of images to join")}else if(O.defined(t))throw new Error(`Invalid input options ${t}`);return a}function Iqe(n,t,o){Array.isArray(this.options.input.buffer)?O.buffer(n)?(this.options.input.buffer.length===0&&this.on("finish",()=>{this.streamInFinished=!0}),this.options.input.buffer.push(n),o()):o(new Error("Non-Buffer data on Writable Stream")):o(new Error("Unexpected data on Writable Stream"))}function lqe(){this._isStreamInput()&&(this.options.input.buffer=Buffer.concat(this.options.input.buffer))}function dqe(){return Array.isArray(this.options.input.buffer)}function pqe(n){let t=Error();return O.fn(n)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),Ot.metadata(this.options,(o,a)=>{o?n(O.nativeError(o,t)):n(null,a)})}):Ot.metadata(this.options,(o,a)=>{o?n(O.nativeError(o,t)):n(null,a)}),this):this._isStreamInput()?new Promise((o,a)=>{let e=()=>{this._flattenBufferIn(),Ot.metadata(this.options,(i,A)=>{i?a(O.nativeError(i,t)):o(A)})};this.writableFinished?e():this.once("finish",e)}):new Promise((o,a)=>{Ot.metadata(this.options,(e,i)=>{e?a(O.nativeError(e,t)):o(i)})})}function hqe(n){let t=Error();return O.fn(n)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),Ot.stats(this.options,(o,a)=>{o?n(O.nativeError(o,t)):n(null,a)})}):Ot.stats(this.options,(o,a)=>{o?n(O.nativeError(o,t)):n(null,a)}),this):this._isStreamInput()?new Promise((o,a)=>{this.on("finish",function(){this._flattenBufferIn(),Ot.stats(this.options,(e,i)=>{e?a(O.nativeError(e,t)):o(i)})})}):new Promise((o,a)=>{Ot.stats(this.options,(e,i)=>{e?a(O.nativeError(e,t)):o(i)})})}var sqe,gqe,Bre,fre=ue(()=>{Ys();hf();sqe={left:"low",top:"low",low:"low",center:"centre",centre:"centre",right:"high",bottom:"high",high:"high"},gqe=["failOn","limitInputPixels","limitInputChannels","unlimited","animated","autoOrient","density","ignoreIcc","page","pages","sequentialRead","jp2","openSlide","pdf","raw","svg","tiff","openSlideLevel","pdfBackground","tiffSubifd"];Bre=n=>{Object.assign(n.prototype,{_inputOptionsFromObject:Cre,_createInputDescriptor:cqe,_write:Iqe,_flattenBufferIn:lqe,_isStreamInput:dqe,metadata:pqe,stats:hqe}),n.align=sqe}});function T2(n){return n.angle%360!==0||n.rotationAngle!==0}function MO(n){return n.width!==-1||n.height!==-1}function Cqe(n,t,o){if(MO(this.options)&&this.options.debuglog("ignoring previous resize options"),this.options.widthPost!==-1&&this.options.debuglog("operation order will be: extract, resize, extract"),O.defined(n))if(O.object(n)&&!O.defined(o))o=n;else if(O.integer(n)&&n>0)this.options.width=n;else throw O.invalidParameterError("width","positive integer",n);else this.options.width=-1;if(O.defined(t))if(O.integer(t)&&t>0)this.options.height=t;else throw O.invalidParameterError("height","positive integer",t);else this.options.height=-1;if(O.object(o)){if(O.defined(o.width))if(O.integer(o.width)&&o.width>0)this.options.width=o.width;else throw O.invalidParameterError("width","positive integer",o.width);if(O.defined(o.height))if(O.integer(o.height)&&o.height>0)this.options.height=o.height;else throw O.invalidParameterError("height","positive integer",o.height);if(O.defined(o.fit)){let a=uqe[o.fit];if(O.string(a))this.options.canvas=a;else throw O.invalidParameterError("fit","valid fit",o.fit)}if(O.defined(o.position)){let a=O.integer(o.position)?o.position:Sre[o.position]||mre[o.position]||yre[o.position];if(O.integer(a)&&(O.inRange(a,0,8)||O.inRange(a,16,17)))this.options.position=a;else throw O.invalidParameterError("position","valid position/gravity/strategy",o.position)}if(this._setBackgroundColourOption("resizeBackground",o.background),O.defined(o.kernel))if(O.string(_2[o.kernel]))this.options.kernel=_2[o.kernel];else throw O.invalidParameterError("kernel","valid kernel name",o.kernel);O.defined(o.withoutEnlargement)&&this._setBooleanOption("withoutEnlargement",o.withoutEnlargement),O.defined(o.withoutReduction)&&this._setBooleanOption("withoutReduction",o.withoutReduction),O.defined(o.fastShrinkOnLoad)&&this._setBooleanOption("fastShrinkOnLoad",o.fastShrinkOnLoad)}return T2(this.options)&&MO(this.options)&&(this.options.rotateBefore=!0),this}function Bqe(n){if(O.integer(n))if(O.inRange(n,1,1e4))this.options.extendTop=n,this.options.extendBottom=n,this.options.extendLeft=n,this.options.extendRight=n;else throw O.invalidParameterError("extend","integer between 1 and 10000",n);else if(O.object(n)){if(O.defined(n.top))if(O.integer(n.top)&&O.inRange(n.top,0,1e4))this.options.extendTop=n.top;else throw O.invalidParameterError("top","integer between 0 and 10000",n.top);if(O.defined(n.bottom))if(O.integer(n.bottom)&&O.inRange(n.bottom,0,1e4))this.options.extendBottom=n.bottom;else throw O.invalidParameterError("bottom","integer between 0 and 10000",n.bottom);if(O.defined(n.left))if(O.integer(n.left)&&O.inRange(n.left,0,1e4))this.options.extendLeft=n.left;else throw O.invalidParameterError("left","integer between 0 and 10000",n.left);if(O.defined(n.right))if(O.integer(n.right)&&O.inRange(n.right,0,1e4))this.options.extendRight=n.right;else throw O.invalidParameterError("right","integer between 0 and 10000",n.right);if(this._setBackgroundColourOption("extendBackground",n.background),O.defined(n.extendWith))if(O.string(Qre[n.extendWith]))this.options.extendWith=Qre[n.extendWith];else throw O.invalidParameterError("extendWith","one of: background, copy, repeat, mirror",n.extendWith)}else throw O.invalidParameterError("extend","integer or object",n);return this}function fqe(n){let t=MO(this.options)||this.options.widthPre!==-1?"Post":"Pre";return this.options[`width${t}`]!==-1&&this.options.debuglog("ignoring previous extract options"),["left","top","width","height"].forEach(function(o){let a=n[o];if(O.integer(a)&&O.inRange(a,0,1e8))this.options[o+(o==="left"||o==="top"?"Offset":"")+t]=a;else throw O.invalidParameterError(o,"integer between 0 and 100000000",a)},this),T2(this.options)&&!MO(this.options)&&(this.options.widthPre===-1||this.options.widthPost===-1)&&(this.options.rotateBefore=!0),this.options.input.autoOrient&&(this.options.orientBefore=!0),this}function Qqe(n){if(this.options.trimThreshold=10,O.defined(n))if(O.object(n)){if(O.defined(n.background)&&this._setBackgroundColourOption("trimBackground",n.background),O.defined(n.threshold))if(O.number(n.threshold)&&n.threshold>=0)this.options.trimThreshold=n.threshold;else throw O.invalidParameterError("threshold","positive number",n.threshold);if(O.defined(n.lineArt)&&this._setBooleanOption("trimLineArt",n.lineArt),O.defined(n.margin))if(O.integer(n.margin)&&O.inRange(n.margin,0,1e7))this.options.trimMargin=n.margin;else throw O.invalidParameterError("margin","integer between 0 and 10000000",n.margin)}else throw O.invalidParameterError("trim","object",n);return T2(this.options)&&(this.options.rotateBefore=!0),this}var yre,mre,Qre,Sre,_2,Eqe,uqe,wre,Dre=ue(()=>{Ys();yre={center:0,centre:0,north:1,east:2,south:3,west:4,northeast:5,southeast:6,southwest:7,northwest:8},mre={top:1,right:2,bottom:3,left:4,"right top":5,"right bottom":6,"left bottom":7,"left top":8},Qre={background:"background",copy:"copy",repeat:"repeat",mirror:"mirror"},Sre={entropy:16,attention:17},_2={nearest:"nearest",linear:"linear",cubic:"cubic",mitchell:"mitchell",lanczos2:"lanczos2",lanczos3:"lanczos3",mks2013:"mks2013",mks2021:"mks2021"},Eqe={contain:"contain",cover:"cover",fill:"fill",inside:"inside",outside:"outside"},uqe={contain:"embed",cover:"crop",fill:"ignore_aspect",inside:"max",outside:"min"};wre=n=>{Object.assign(n.prototype,{resize:Cqe,extend:Bqe,extract:fqe,trim:Qqe}),n.gravity=yre,n.strategy=Sre,n.kernel=_2,n.fit=Eqe,n.position=mre}});function yqe(n){if(!Array.isArray(n))throw O.invalidParameterError("images to composite","array",n);return this.options.composite=n.map(t=>{if(!O.object(t))throw O.invalidParameterError("image to composite","object",t);let o=this._inputOptionsFromObject(t),a={input:this._createInputDescriptor(t.input,o,{allowStream:!1}),blend:"over",tile:!1,left:0,top:0,hasOffset:!1,gravity:0,premultiplied:!1};if(O.defined(t.blend))if(O.string(N2[t.blend]))a.blend=N2[t.blend];else throw O.invalidParameterError("blend","valid blend name",t.blend);if(O.defined(t.tile))if(O.bool(t.tile))a.tile=t.tile;else throw O.invalidParameterError("tile","boolean",t.tile);if(O.defined(t.left))if(O.integer(t.left))a.left=t.left;else throw O.invalidParameterError("left","integer",t.left);if(O.defined(t.top))if(O.integer(t.top))a.top=t.top;else throw O.invalidParameterError("top","integer",t.top);if(O.defined(t.top)!==O.defined(t.left))throw new Error("Expected both left and top to be set");if(a.hasOffset=O.integer(t.top)&&O.integer(t.left),O.defined(t.gravity))if(O.integer(t.gravity)&&O.inRange(t.gravity,0,8))a.gravity=t.gravity;else if(O.string(t.gravity)&&O.integer(this.constructor.gravity[t.gravity]))a.gravity=this.constructor.gravity[t.gravity];else throw O.invalidParameterError("gravity","valid gravity",t.gravity);if(O.defined(t.premultiplied))if(O.bool(t.premultiplied))a.premultiplied=t.premultiplied;else throw O.invalidParameterError("premultiplied","boolean",t.premultiplied);return a}),this}var N2,Ore,bre=ue(()=>{Ys();N2={clear:"clear",source:"source",over:"over",in:"in",out:"out",atop:"atop",dest:"dest","dest-over":"dest-over","dest-in":"dest-in","dest-out":"dest-out","dest-atop":"dest-atop",xor:"xor",add:"add",saturate:"saturate",multiply:"multiply",screen:"screen",overlay:"overlay",darken:"darken",lighten:"lighten","colour-dodge":"colour-dodge","color-dodge":"colour-dodge","colour-burn":"colour-burn","color-burn":"colour-burn","hard-light":"hard-light","soft-light":"soft-light",difference:"difference",exclusion:"exclusion"};Ore=n=>{n.prototype.composite=yqe,n.blend=N2}});function mqe(n,t){if(!O.defined(n))return this.autoOrient();if((this.options.angle||this.options.rotationAngle)&&(this.options.debuglog("ignoring previous rotate options"),this.options.angle=0,this.options.rotationAngle=0),O.integer(n)&&!(n%90))this.options.angle=n;else if(O.number(n))this.options.rotationAngle=n,O.object(t)&&t.background&&this._setBackgroundColourOption("rotationBackground",t.background);else throw O.invalidParameterError("angle","numeric",n);return this}function Sqe(){return this.options.input.autoOrient=!0,this}function wqe(n){return this.options.flip=O.bool(n)?n:!0,this}function Dqe(n){return this.options.flop=O.bool(n)?n:!0,this}function Oqe(n,t){let a=Array.isArray(n)&&(n.length===4&&n.every(O.number)||n.length===2&&n.every(e=>Array.isArray(e)&&e.length===2))?n.flat():[];if(a.length===4&&a.every(O.number))this.options.affineMatrix=a;else throw O.invalidParameterError("matrix","1x4 or 2x2 array",n);if(O.defined(t))if(O.object(t)){if(this._setBackgroundColourOption("affineBackground",t.background),O.defined(t.idx))if(O.number(t.idx))this.options.affineIdx=t.idx;else throw O.invalidParameterError("options.idx","number",t.idx);if(O.defined(t.idy))if(O.number(t.idy))this.options.affineIdy=t.idy;else throw O.invalidParameterError("options.idy","number",t.idy);if(O.defined(t.odx))if(O.number(t.odx))this.options.affineOdx=t.odx;else throw O.invalidParameterError("options.odx","number",t.odx);if(O.defined(t.ody))if(O.number(t.ody))this.options.affineOdy=t.ody;else throw O.invalidParameterError("options.ody","number",t.ody);if(O.defined(t.interpolator))if(O.inArray(t.interpolator,Object.values(this.constructor.interpolators)))this.options.affineInterpolator=t.interpolator;else throw O.invalidParameterError("options.interpolator","valid interpolator name",t.interpolator)}else throw O.invalidParameterError("options","object",t);return this}function bqe(n){if(O.plainObject(n)){if(O.number(n.sigma)&&O.inRange(n.sigma,1e-6,10))this.options.sharpenSigma=n.sigma;else throw O.invalidParameterError("options.sigma","number between 0.000001 and 10",n.sigma);if(O.defined(n.m1))if(O.number(n.m1)&&O.inRange(n.m1,0,1e6))this.options.sharpenM1=n.m1;else throw O.invalidParameterError("options.m1","number between 0 and 1000000",n.m1);if(O.defined(n.m2))if(O.number(n.m2)&&O.inRange(n.m2,0,1e6))this.options.sharpenM2=n.m2;else throw O.invalidParameterError("options.m2","number between 0 and 1000000",n.m2);if(O.defined(n.x1))if(O.number(n.x1)&&O.inRange(n.x1,0,1e6))this.options.sharpenX1=n.x1;else throw O.invalidParameterError("options.x1","number between 0 and 1000000",n.x1);if(O.defined(n.y2))if(O.number(n.y2)&&O.inRange(n.y2,0,1e6))this.options.sharpenY2=n.y2;else throw O.invalidParameterError("options.y2","number between 0 and 1000000",n.y2);if(O.defined(n.y3))if(O.number(n.y3)&&O.inRange(n.y3,0,1e6))this.options.sharpenY3=n.y3;else throw O.invalidParameterError("options.y3","number between 0 and 1000000",n.y3)}else this.options.sharpenSigma=-1;return this}function Mqe(n){if(!O.defined(n))this.options.medianSize=3;else if(O.integer(n)&&O.inRange(n,1,1e3))this.options.medianSize=n;else throw O.invalidParameterError("size","integer between 1 and 1000",n);return this}function _qe(n){let t;if(O.number(n))t=n;else if(O.plainObject(n)){if(!O.number(n.sigma))throw O.invalidParameterError("options.sigma","number between 0.3 and 1000",t);if(t=n.sigma,"precision"in n)if(O.string(Mre[n.precision]))this.options.precision=Mre[n.precision];else throw O.invalidParameterError("precision","one of: integer, float, approximate",n.precision);if("minAmplitude"in n)if(O.number(n.minAmplitude)&&O.inRange(n.minAmplitude,.001,1))this.options.minAmpl=n.minAmplitude;else throw O.invalidParameterError("minAmplitude","number between 0.001 and 1",n.minAmplitude)}if(!O.defined(n))this.options.blurSigma=-1;else if(O.bool(n))this.options.blurSigma=n?-1:0;else if(O.number(t)&&O.inRange(t,.3,1e3))this.options.blurSigma=t;else throw O.invalidParameterError("sigma","number between 0.3 and 1000",t);return this}function Tqe(n){if(!O.defined(n))this.options.dilateWidth=1;else if(O.integer(n)&&O.inRange(n,1,65536))this.options.dilateWidth=n;else throw O.invalidParameterError("width","integer between 1 and 65536",n);return this}function Nqe(n){if(!O.defined(n))this.options.erodeWidth=1;else if(O.integer(n)&&O.inRange(n,1,65536))this.options.erodeWidth=n;else throw O.invalidParameterError("width","integer between 1 and 65536",n);return this}function Rqe(n){return this.options.flatten=O.bool(n)?n:!0,O.object(n)&&this._setBackgroundColourOption("flattenBackground",n.background),this}function kqe(){return this.options.unflatten=!0,this}function vqe(n,t){if(!O.defined(n))this.options.gamma=2.2;else if(O.number(n)&&O.inRange(n,1,3))this.options.gamma=n;else throw O.invalidParameterError("gamma","number between 1.0 and 3.0",n);if(!O.defined(t))this.options.gammaOut=this.options.gamma;else if(O.number(t)&&O.inRange(t,1,3))this.options.gammaOut=t;else throw O.invalidParameterError("gammaOut","number between 1.0 and 3.0",t);return this}function Pqe(n){if(this.options.negate=O.bool(n)?n:!0,O.plainObject(n)&&"alpha"in n)if(O.bool(n.alpha))this.options.negateAlpha=n.alpha;else throw O.invalidParameterError("alpha","should be boolean value",n.alpha);return this}function Gqe(n){if(O.plainObject(n)){if(O.defined(n.lower))if(O.number(n.lower)&&O.inRange(n.lower,0,99))this.options.normaliseLower=n.lower;else throw O.invalidParameterError("lower","number between 0 and 99",n.lower);if(O.defined(n.upper))if(O.number(n.upper)&&O.inRange(n.upper,1,100))this.options.normaliseUpper=n.upper;else throw O.invalidParameterError("upper","number between 1 and 100",n.upper)}if(this.options.normaliseLower>=this.options.normaliseUpper)throw O.invalidParameterError("range","lower to be less than upper",`${this.options.normaliseLower} >= ${this.options.normaliseUpper}`);return this.options.normalise=!0,this}function Fqe(n){return this.normalise(n)}function Lqe(n){if(O.plainObject(n)){if(O.integer(n.width)&&O.inRange(n.width,1,65536))this.options.claheWidth=n.width;else throw O.invalidParameterError("width","integer between 1 and 65536",n.width);if(O.integer(n.height)&&O.inRange(n.height,1,65536))this.options.claheHeight=n.height;else throw O.invalidParameterError("height","integer between 1 and 65536",n.height);if(O.defined(n.maxSlope))if(O.integer(n.maxSlope)&&O.inRange(n.maxSlope,0,100))this.options.claheMaxSlope=n.maxSlope;else throw O.invalidParameterError("maxSlope","integer between 0 and 100",n.maxSlope)}else throw O.invalidParameterError("options","plain object",n);return this}function Uqe(n){if(!O.object(n)||!Array.isArray(n.kernel)||!O.integer(n.width)||!O.integer(n.height)||!O.inRange(n.width,3,1001)||!O.inRange(n.height,3,1001)||n.height*n.width!==n.kernel.length||!n.kernel.every(O.number))throw new Error("Invalid convolution kernel");return O.integer(n.scale)||(n.scale=n.kernel.reduce((t,o)=>t+o,0)),n.scale<1&&(n.scale=1),O.integer(n.offset)||(n.offset=0),this.options.convKernel=n,this}function Hqe(n,t){if(!O.defined(n))this.options.threshold=128;else if(O.bool(n))this.options.threshold=n?128:0;else if(O.integer(n)&&O.inRange(n,0,255))this.options.threshold=n;else throw O.invalidParameterError("threshold","integer between 0 and 255",n);return!O.object(t)||t.greyscale===!0||t.grayscale===!0?this.options.thresholdGrayscale=!0:this.options.thresholdGrayscale=!1,this}function Kqe(n,t,o){if(this.options.boolean=this._createInputDescriptor(n,o),O.string(t)&&O.inArray(t,["and","or","eor"]))this.options.booleanOp=t;else throw O.invalidParameterError("operator","one of: and, or, eor",t);return this}function xqe(n,t){if(!O.defined(n)&&O.number(t)?n=1:O.number(n)&&!O.defined(t)&&(t=0),!O.defined(n))this.options.linearA=[];else if(O.number(n))this.options.linearA=[n];else if(Array.isArray(n)&&n.length&&n.every(O.number))this.options.linearA=n;else throw O.invalidParameterError("a","number or array of numbers",n);if(!O.defined(t))this.options.linearB=[];else if(O.number(t))this.options.linearB=[t];else if(Array.isArray(t)&&t.length&&t.every(O.number))this.options.linearB=t;else throw O.invalidParameterError("b","number or array of numbers",t);if(this.options.linearA.length!==this.options.linearB.length)throw new Error("Expected a and b to be arrays of the same length");return this}function Yqe(n){if(!Array.isArray(n))throw O.invalidParameterError("inputMatrix","array",n);let t=n.length;if(t!==3&&t!==4)throw O.invalidParameterError("inputMatrix","3x3 or 4x4 array",t);if(!n.every(a=>Array.isArray(a)&&a.length===t))throw O.invalidParameterError("inputMatrix",`array of ${t} arrays of length ${t}`,n);let o=n.flat();if(!o.every(O.number))throw O.invalidParameterError("inputMatrix","array of numbers",o);return this.options.recombMatrix=o,this}function jqe(n){if(!O.plainObject(n))throw O.invalidParameterError("options","plain object",n);if("brightness"in n)if(O.number(n.brightness)&&n.brightness>=0)this.options.brightness=n.brightness;else throw O.invalidParameterError("brightness","number above zero",n.brightness);if("saturation"in n)if(O.number(n.saturation)&&n.saturation>=0)this.options.saturation=n.saturation;else throw O.invalidParameterError("saturation","number above zero",n.saturation);if("hue"in n)if(O.integer(n.hue))this.options.hue=n.hue%360;else throw O.invalidParameterError("hue","number",n.hue);if("lightness"in n)if(O.number(n.lightness))this.options.lightness=n.lightness;else throw O.invalidParameterError("lightness","number",n.lightness);return this}var Mre,_re,Tre=ue(()=>{Ys();Mre={integer:"integer",float:"float",approximate:"approximate"};_re=n=>{Object.assign(n.prototype,{autoOrient:Sqe,rotate:mqe,flip:wqe,flop:Dqe,affine:Oqe,sharpen:bqe,erode:Nqe,dilate:Tqe,median:Mqe,blur:_qe,flatten:Rqe,unflatten:kqe,gamma:vqe,negate:Pqe,normalise:Gqe,normalize:Fqe,clahe:Lqe,convolve:Uqe,threshold:Hqe,boolean:Kqe,linear:xqe,recomb:Yqe,modulate:jqe})}});var Gre=ee((nbA,Pre)=>{var G2=Object.defineProperty,Jqe=Object.getOwnPropertyDescriptor,qqe=Object.getOwnPropertyNames,zqe=Object.prototype.hasOwnProperty,Vqe=(n,t)=>{for(var o in t)G2(n,o,{get:t[o],enumerable:!0})},Wqe=(n,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of qqe(t))!zqe.call(n,e)&&e!==o&&G2(n,e,{get:()=>t[e],enumerable:!(a=Jqe(t,e))||a.enumerable});return n},Zqe=n=>Wqe(G2({},"__esModule",{value:!0}),n),Nre={};Vqe(Nre,{default:()=>I4e});Pre.exports=Zqe(Nre);var R2={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(let n in R2)Object.freeze(R2[n]);var Ws=Object.freeze(R2),Rre=Object.create(null);for(let n in Ws)Object.hasOwn(Ws,n)&&(Rre[Ws[n]]=n);var Ao={to:{},get:{}};Ao.get=function(n){let t=n.slice(0,3).toLowerCase(),o,a;switch(t){case"hsl":{o=Ao.get.hsl(n),a="hsl";break}case"hwb":{o=Ao.get.hwb(n),a="hwb";break}default:{o=Ao.get.rgb(n),a="rgb";break}}return o?{model:a,value:o}:null};Ao.get.rgb=function(n){if(!n)return null;let t=/^#([a-f\d]{3,4})$/i,o=/^#([a-f\d]{6})([a-f\d]{2})?$/i,a=/^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i,e=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i,i=/^(\w+)$/,A=[0,0,0,1],r,s,g;if(r=n.match(o)){for(g=r[2],r=r[1],s=0;s<3;s++){let c=s*2;A[s]=Number.parseInt(r.slice(c,c+2),16)}g&&(A[3]=Number.parseInt(g,16)/255)}else if(r=n.match(t)){for(r=r[1],g=r[3],s=0;s<3;s++)A[s]=Number.parseInt(r[s]+r[s],16);g&&(A[3]=Number.parseInt(g+g,16)/255)}else if(r=n.match(a)){for(s=0;s<3;s++)A[s]=Number.parseFloat(r[s+1]);r[4]&&(A[3]=r[5]?Number.parseFloat(r[4])*.01:Number.parseFloat(r[4]))}else if(r=n.match(e)){for(s=0;s<3;s++)A[s]=Math.round(Number.parseFloat(r[s+1])*2.55);r[4]&&(A[3]=r[5]?Number.parseFloat(r[4])*.01:Number.parseFloat(r[4]))}else return(r=n.toLowerCase().match(i))?r[1]==="transparent"?[0,0,0,0]:Object.hasOwn(Ws,r[1])?(A=Ws[r[1]].slice(),A[3]=1,A):null:null;for(s=0;s<3;s++)A[s]=mI(A[s],0,255);return A[3]=mI(A[3],0,1),A};Ao.get.hsl=function(n){if(!n)return null;let t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,o=n.match(t);if(o){let a=Number.parseFloat(o[4]),e=(Number.parseFloat(o[1])%360+360)%360,i=mI(Number.parseFloat(o[2]),0,100),A=mI(Number.parseFloat(o[3]),0,100),r=mI(Number.isNaN(a)?1:a,0,1);return[e,i,A,r]}return null};Ao.get.hwb=function(n){if(!n)return null;let t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,o=n.match(t);if(o){let a=Number.parseFloat(o[4]),e=(Number.parseFloat(o[1])%360+360)%360,i=mI(Number.parseFloat(o[2]),0,100),A=mI(Number.parseFloat(o[3]),0,100),r=mI(Number.isNaN(a)?1:a,0,1);return[e,i,A,r]}return null};Ao.to.hex=function(...n){return"#"+_O(n[0])+_O(n[1])+_O(n[2])+(n[3]<1?_O(Math.round(n[3]*255)):"")};Ao.to.rgb=function(...n){return n.length<4||n[3]===1?"rgb("+Math.round(n[0])+", "+Math.round(n[1])+", "+Math.round(n[2])+")":"rgba("+Math.round(n[0])+", "+Math.round(n[1])+", "+Math.round(n[2])+", "+n[3]+")"};Ao.to.rgb.percent=function(...n){let t=Math.round(n[0]/255*100),o=Math.round(n[1]/255*100),a=Math.round(n[2]/255*100);return n.length<4||n[3]===1?"rgb("+t+"%, "+o+"%, "+a+"%)":"rgba("+t+"%, "+o+"%, "+a+"%, "+n[3]+")"};Ao.to.hsl=function(...n){return n.length<4||n[3]===1?"hsl("+n[0]+", "+n[1]+"%, "+n[2]+"%)":"hsla("+n[0]+", "+n[1]+"%, "+n[2]+"%, "+n[3]+")"};Ao.to.hwb=function(...n){let t="";return n.length>=4&&n[3]!==1&&(t=", "+n[3]),"hwb("+n[0]+", "+n[1]+"%, "+n[2]+"%"+t+")"};Ao.to.keyword=function(...n){return Rre[n.slice(0,3)]};function mI(n,t,o){return Math.min(Math.max(t,n),o)}function _O(n){let t=Math.round(n).toString(16).toUpperCase();return t.length<2?"0"+t:t}var Xh=Ao,kre={};for(let n of Object.keys(Ws))kre[Ws[n]]=n;var sA={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},nd=sA,sc=(6/29)**3;function eE(n){let t=n>.0031308?1.055*n**.4166666666666667-.055:n*12.92;return Math.min(Math.max(0,t),1)}function AE(n){return n>.04045?((n+.055)/1.055)**2.4:n/12.92}for(let n of Object.keys(sA)){if(!("channels"in sA[n]))throw new Error("missing channels property: "+n);if(!("labels"in sA[n]))throw new Error("missing channel labels property: "+n);if(sA[n].labels.length!==sA[n].channels)throw new Error("channel and label counts mismatch: "+n);let{channels:t,labels:o}=sA[n];delete sA[n].channels,delete sA[n].labels,Object.defineProperty(sA[n],"channels",{value:t}),Object.defineProperty(sA[n],"labels",{value:o})}sA.rgb.hsl=function(n){let t=n[0]/255,o=n[1]/255,a=n[2]/255,e=Math.min(t,o,a),i=Math.max(t,o,a),A=i-e,r,s;switch(i){case e:{r=0;break}case t:{r=(o-a)/A;break}case o:{r=2+(a-t)/A;break}case a:{r=4+(t-o)/A;break}}r=Math.min(r*60,360),r<0&&(r+=360);let g=(e+i)/2;return i===e?s=0:g<=.5?s=A/(i+e):s=A/(2-i-e),[r,s*100,g*100]};sA.rgb.hsv=function(n){let t,o,a,e,i,A=n[0]/255,r=n[1]/255,s=n[2]/255,g=Math.max(A,r,s),c=g-Math.min(A,r,s),I=function(d){return(g-d)/6/c+1/2};if(c===0)e=0,i=0;else{switch(i=c/g,t=I(A),o=I(r),a=I(s),g){case A:{e=a-o;break}case r:{e=1/3+t-a;break}case s:{e=2/3+o-t;break}}e<0?e+=1:e>1&&(e-=1)}return[e*360,i*100,g*100]};sA.rgb.hwb=function(n){let t=n[0],o=n[1],a=n[2],e=sA.rgb.hsl(n)[0],i=1/255*Math.min(t,Math.min(o,a));return a=1-1/255*Math.max(t,Math.max(o,a)),[e,i*100,a*100]};sA.rgb.oklab=function(n){let t=AE(n[0]/255),o=AE(n[1]/255),a=AE(n[2]/255),e=Math.cbrt(.4122214708*t+.5363325363*o+.0514459929*a),i=Math.cbrt(.2119034982*t+.6806995451*o+.1073969566*a),A=Math.cbrt(.0883024619*t+.2817188376*o+.6299787005*a),r=.2104542553*e+.793617785*i-.0040720468*A,s=1.9779984951*e-2.428592205*i+.4505937099*A,g=.0259040371*e+.7827717662*i-.808675766*A;return[r*100,s*100,g*100]};sA.rgb.cmyk=function(n){let t=n[0]/255,o=n[1]/255,a=n[2]/255,e=Math.min(1-t,1-o,1-a),i=(1-t-e)/(1-e)||0,A=(1-o-e)/(1-e)||0,r=(1-a-e)/(1-e)||0;return[i*100,A*100,r*100,e*100]};function Xqe(n,t){return(n[0]-t[0])**2+(n[1]-t[1])**2+(n[2]-t[2])**2}sA.rgb.keyword=function(n){let t=kre[n];if(t)return t;let o=Number.POSITIVE_INFINITY,a;for(let e of Object.keys(Ws)){let i=Ws[e],A=Xqe(n,i);Asc?o**(1/3):7.787*o+16/116,a=a>sc?a**(1/3):7.787*a+16/116,e=e>sc?e**(1/3):7.787*e+16/116;let i=116*a-16,A=500*(o-a),r=200*(a-e);return[i,A,r]};sA.hsl.rgb=function(n){let t=n[0]/360,o=n[1]/100,a=n[2]/100,e,i;if(o===0)return i=a*255,[i,i,i];let A=a<.5?a*(1+o):a+o-a*o,r=2*a-A,s=[0,0,0];for(let g=0;g<3;g++)e=t+1/3*-(g-1),e<0&&e++,e>1&&e--,6*e<1?i=r+(A-r)*6*e:2*e<1?i=A:3*e<2?i=r+(A-r)*(2/3-e)*6:i=r,s[g]=i*255;return s};sA.hsl.hsv=function(n){let t=n[0],o=n[1]/100,a=n[2]/100,e=o,i=Math.max(a,.01);a*=2,o*=a<=1?a:2-a,e*=i<=1?i:2-i;let A=(a+o)/2,r=a===0?2*e/(i+e):2*o/(a+o);return[t,r*100,A*100]};sA.hsv.rgb=function(n){let t=n[0]/60,o=n[1]/100,a=n[2]/100,e=Math.floor(t)%6,i=t-Math.floor(t),A=255*a*(1-o),r=255*a*(1-o*i),s=255*a*(1-o*(1-i));switch(a*=255,e){case 0:return[a,s,A];case 1:return[r,a,A];case 2:return[A,a,s];case 3:return[A,r,a];case 4:return[s,A,a];case 5:return[a,A,r]}};sA.hsv.hsl=function(n){let t=n[0],o=n[1]/100,a=n[2]/100,e=Math.max(a,.01),i,A;A=(2-o)*a;let r=(2-o)*e;return i=o*e,i/=r<=1?r:2-r,i=i||0,A/=2,[t,i*100,A*100]};sA.hwb.rgb=function(n){let t=n[0]/360,o=n[1]/100,a=n[2]/100,e=o+a,i;e>1&&(o/=e,a/=e);let A=Math.floor(6*t),r=1-a;i=6*t-A,(A&1)!==0&&(i=1-i);let s=o+i*(r-o),g,c,I;switch(A){default:case 6:case 0:{g=r,c=s,I=o;break}case 1:{g=s,c=r,I=o;break}case 2:{g=o,c=r,I=s;break}case 3:{g=o,c=s,I=r;break}case 4:{g=s,c=o,I=r;break}case 5:{g=r,c=o,I=s;break}}return[g*255,c*255,I*255]};sA.cmyk.rgb=function(n){let t=n[0]/100,o=n[1]/100,a=n[2]/100,e=n[3]/100,i=1-Math.min(1,t*(1-e)+e),A=1-Math.min(1,o*(1-e)+e),r=1-Math.min(1,a*(1-e)+e);return[i*255,A*255,r*255]};sA.xyz.rgb=function(n){let t=n[0]/100,o=n[1]/100,a=n[2]/100,e,i,A;return e=t*3.2404542+o*-1.5371385+a*-.4985314,i=t*-.969266+o*1.8760108+a*.041556,A=t*.0556434+o*-.2040259+a*1.0572252,e=eE(e),i=eE(i),A=eE(A),[e*255,i*255,A*255]};sA.xyz.lab=function(n){let t=n[0],o=n[1],a=n[2];t/=95.047,o/=100,a/=108.883,t=t>sc?t**(1/3):7.787*t+16/116,o=o>sc?o**(1/3):7.787*o+16/116,a=a>sc?a**(1/3):7.787*a+16/116;let e=116*o-16,i=500*(t-o),A=200*(o-a);return[e,i,A]};sA.xyz.oklab=function(n){let t=n[0]/100,o=n[1]/100,a=n[2]/100,e=Math.cbrt(.8189330101*t+.3618667424*o-.1288597137*a),i=Math.cbrt(.0329845436*t+.9293118715*o+.0361456387*a),A=Math.cbrt(.0482003018*t+.2643662691*o+.633851707*a),r=.2104542553*e+.793617785*i-.0040720468*A,s=1.9779984951*e-2.428592205*i+.4505937099*A,g=.0259040371*e+.7827717662*i-.808675766*A;return[r*100,s*100,g*100]};sA.oklab.oklch=function(n){return sA.lab.lch(n)};sA.oklab.xyz=function(n){let t=n[0]/100,o=n[1]/100,a=n[2]/100,e=(.999999998*t+.396337792*o+.215803758*a)**3,i=(1.000000008*t-.105561342*o-.063854175*a)**3,A=(1.000000055*t-.089484182*o-1.291485538*a)**3,r=1.227013851*e-.55779998*i+.281256149*A,s=-.040580178*e+1.11225687*i-.071676679*A,g=-.076381285*e-.421481978*i+1.58616322*A;return[r*100,s*100,g*100]};sA.oklab.rgb=function(n){let t=n[0]/100,o=n[1]/100,a=n[2]/100,e=(t+.3963377774*o+.2158037573*a)**3,i=(t-.1055613458*o-.0638541728*a)**3,A=(t-.0894841775*o-1.291485548*a)**3,r=eE(4.0767416621*e-3.3077115913*i+.2309699292*A),s=eE(-1.2684380046*e+2.6097574011*i-.3413193965*A),g=eE(-.0041960863*e-.7034186147*i+1.707614701*A);return[r*255,s*255,g*255]};sA.oklch.oklab=function(n){return sA.lch.lab(n)};sA.lab.xyz=function(n){let t=n[0],o=n[1],a=n[2],e,i,A;i=(t+16)/116,e=o/500+i,A=i-a/200;let r=i**3,s=e**3,g=A**3;return i=r>sc?r:(i-16/116)/7.787,e=s>sc?s:(e-16/116)/7.787,A=g>sc?g:(A-16/116)/7.787,e*=95.047,i*=100,A*=108.883,[e,i,A]};sA.lab.lch=function(n){let t=n[0],o=n[1],a=n[2],e;e=Math.atan2(a,o)*360/2/Math.PI,e<0&&(e+=360);let A=Math.sqrt(o*o+a*a);return[t,A,e]};sA.lch.lab=function(n){let t=n[0],o=n[1],e=n[2]/360*2*Math.PI,i=o*Math.cos(e),A=o*Math.sin(e);return[t,i,A]};sA.rgb.ansi16=function(n,t=null){let[o,a,e]=n,i=t===null?sA.rgb.hsv(n)[2]:t;if(i=Math.round(i/50),i===0)return 30;let A=30+(Math.round(e/255)<<2|Math.round(a/255)<<1|Math.round(o/255));return i===2&&(A+=60),A};sA.hsv.ansi16=function(n){return sA.rgb.ansi16(sA.hsv.rgb(n),n[2])};sA.rgb.ansi256=function(n){let t=n[0],o=n[1],a=n[2];return t>>4===o>>4&&o>>4===a>>4?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(o/255*5)+Math.round(a/255*5)};sA.ansi16.rgb=function(n){n=n[0];let t=n%10;if(t===0||t===7)return n>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let o=(Math.trunc(n>50)+1)*.5,a=(t&1)*o*255,e=(t>>1&1)*o*255,i=(t>>2&1)*o*255;return[a,e,i]};sA.ansi256.rgb=function(n){if(n=n[0],n>=232){let i=(n-232)*10+8;return[i,i,i]}n-=16;let t,o=Math.floor(n/36)/5*255,a=Math.floor((t=n%36)/6)/5*255,e=t%6/5*255;return[o,a,e]};sA.rgb.hex=function(n){let o=(((Math.round(n[0])&255)<<16)+((Math.round(n[1])&255)<<8)+(Math.round(n[2])&255)).toString(16).toUpperCase();return"000000".slice(o.length)+o};sA.hex.rgb=function(n){let t=n.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!t)return[0,0,0];let o=t[0];t[0].length===3&&(o=[...o].map(r=>r+r).join(""));let a=Number.parseInt(o,16),e=a>>16&255,i=a>>8&255,A=a&255;return[e,i,A]};sA.rgb.hcg=function(n){let t=n[0]/255,o=n[1]/255,a=n[2]/255,e=Math.max(Math.max(t,o),a),i=Math.min(Math.min(t,o),a),A=e-i,r,s=A<1?i/(1-A):0;return A<=0?r=0:e===t?r=(o-a)/A%6:e===o?r=2+(a-t)/A:r=4+(t-o)/A,r/=6,r%=1,[r*360,A*100,s*100]};sA.hsl.hcg=function(n){let t=n[1]/100,o=n[2]/100,a=o<.5?2*t*o:2*t*(1-o),e=0;return a<1&&(e=(o-.5*a)/(1-a)),[n[0],a*100,e*100]};sA.hsv.hcg=function(n){let t=n[1]/100,o=n[2]/100,a=t*o,e=0;return a<1&&(e=(o-a)/(1-a)),[n[0],a*100,e*100]};sA.hcg.rgb=function(n){let t=n[0]/360,o=n[1]/100,a=n[2]/100;if(o===0)return[a*255,a*255,a*255];let e=[0,0,0],i=t%1*6,A=i%1,r=1-A,s=0;switch(Math.floor(i)){case 0:{e[0]=1,e[1]=A,e[2]=0;break}case 1:{e[0]=r,e[1]=1,e[2]=0;break}case 2:{e[0]=0,e[1]=1,e[2]=A;break}case 3:{e[0]=0,e[1]=r,e[2]=1;break}case 4:{e[0]=A,e[1]=0,e[2]=1;break}default:e[0]=1,e[1]=0,e[2]=r}return s=(1-o)*a,[(o*e[0]+s)*255,(o*e[1]+s)*255,(o*e[2]+s)*255]};sA.hcg.hsv=function(n){let t=n[1]/100,o=n[2]/100,a=t+o*(1-t),e=0;return a>0&&(e=t/a),[n[0],e*100,a*100]};sA.hcg.hsl=function(n){let t=n[1]/100,a=n[2]/100*(1-t)+.5*t,e=0;return a>0&&a<.5?e=t/(2*a):a>=.5&&a<1&&(e=t/(2*(1-a))),[n[0],e*100,a*100]};sA.hcg.hwb=function(n){let t=n[1]/100,o=n[2]/100,a=t+o*(1-t);return[n[0],(a-t)*100,(1-a)*100]};sA.hwb.hcg=function(n){let t=n[1]/100,a=1-n[2]/100,e=a-t,i=0;return e<1&&(i=(a-e)/(1-e)),[n[0],e*100,i*100]};sA.apple.rgb=function(n){return[n[0]/65535*255,n[1]/65535*255,n[2]/65535*255]};sA.rgb.apple=function(n){return[n[0]/255*65535,n[1]/255*65535,n[2]/255*65535]};sA.gray.rgb=function(n){return[n[0]/100*255,n[0]/100*255,n[0]/100*255]};sA.gray.hsl=function(n){return[0,0,n[0]]};sA.gray.hsv=sA.gray.hsl;sA.gray.hwb=function(n){return[0,100,n[0]]};sA.gray.cmyk=function(n){return[0,0,0,n[0]]};sA.gray.lab=function(n){return[n[0],0,0]};sA.gray.hex=function(n){let t=Math.round(n[0]/100*255)&255,a=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".slice(a.length)+a};sA.rgb.gray=function(n){return[(n[0]+n[1]+n[2])/3/255*100]};function $qe(){let n={},t=Object.keys(nd);for(let{length:o}=t,a=0;a0;){let a=o.pop(),e=Object.keys(nd[a]);for(let{length:i}=e,A=0;A1&&(o=a),n(o))};return"conversion"in n&&(t.conversion=n.conversion),t}function n4e(n){let t=function(...o){let a=o[0];if(a==null)return a;a.length>1&&(o=a);let e=n(o);if(typeof e=="object")for(let{length:i}=e,A=0;A0){this.model=t||"rgb",a=mo[this.model].channels;let e=Array.prototype.slice.call(n,0,a);this.color=P2(e,a),this.valpha=typeof n[a]=="number"?n[a]:1}else if(typeof n=="number")this.model="rgb",this.color=[n>>16&255,n>>8&255,n&255],this.valpha=1;else{this.valpha=1;let e=Object.keys(n);"alpha"in n&&(e.splice(e.indexOf("alpha"),1),this.valpha=typeof n.alpha=="number"?n.alpha:0);let i=e.sort().join("");if(!(i in k2))throw new Error("Unable to parse color from object: "+JSON.stringify(n));this.model=k2[i];let{labels:A}=mo[this.model],r=[];for(o=0;o(n%360+360)%360),saturationl:Mr("hsl",1,ei(100)),lightness:Mr("hsl",2,ei(100)),saturationv:Mr("hsv",1,ei(100)),value:Mr("hsv",2,ei(100)),chroma:Mr("hcg",1,ei(100)),gray:Mr("hcg",2,ei(100)),white:Mr("hwb",1,ei(100)),wblack:Mr("hwb",2,ei(100)),cyan:Mr("cmyk",0,ei(100)),magenta:Mr("cmyk",1,ei(100)),yellow:Mr("cmyk",2,ei(100)),black:Mr("cmyk",3,ei(100)),x:Mr("xyz",0,ei(95.047)),y:Mr("xyz",1,ei(100)),z:Mr("xyz",2,ei(108.833)),l:Mr("lab",0,ei(100)),a:Mr("lab",1),b:Mr("lab",2),keyword(n){return n!==void 0?new Qi(n):mo[this.model].keyword(this.color)},hex(n){return n!==void 0?new Qi(n):Xh.to.hex(...this.rgb().round().color)},hexa(n){if(n!==void 0)return new Qi(n);let t=this.rgb().round().color,o=Math.round(this.valpha*255).toString(16).toUpperCase();return o.length===1&&(o="0"+o),Xh.to.hex(...t)+o},rgbNumber(){let n=this.rgb().color;return(n[0]&255)<<16|(n[1]&255)<<8|n[2]&255},luminosity(){let n=this.rgb().color,t=[];for(let[o,a]of n.entries()){let e=a/255;t[o]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(n){let t=this.luminosity(),o=n.luminosity();return t>o?(t+.05)/(o+.05):(o+.05)/(t+.05)},level(n){let t=this.contrast(n);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){let n=this.rgb().color;return(n[0]*2126+n[1]*7152+n[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let n=this.rgb();for(let t=0;t<3;t++)n.color[t]=255-n.color[t];return n},lighten(n){let t=this.hsl();return t.color[2]+=t.color[2]*n,t},darken(n){let t=this.hsl();return t.color[2]-=t.color[2]*n,t},saturate(n){let t=this.hsl();return t.color[1]+=t.color[1]*n,t},desaturate(n){let t=this.hsl();return t.color[1]-=t.color[1]*n,t},whiten(n){let t=this.hwb();return t.color[1]+=t.color[1]*n,t},blacken(n){let t=this.hwb();return t.color[2]+=t.color[2]*n,t},grayscale(){let n=this.rgb().color,t=n[0]*.3+n[1]*.59+n[2]*.11;return Qi.rgb(t,t,t)},fade(n){return this.alpha(this.valpha-this.valpha*n)},opaquer(n){return this.alpha(this.valpha+this.valpha*n)},rotate(n){let t=this.hsl(),o=t.color[0];return o=(o+n)%360,o=o<0?360+o:o,t.color[0]=o,t},mix(n,t){if(!n||!n.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof n);let o=n.rgb(),a=this.rgb(),e=t===void 0?.5:t,i=2*e-1,A=o.alpha()-a.alpha(),r=((i*A===-1?i:(i+A)/(1+i*A))+1)/2,s=1-r;return Qi.rgb(r*o.red()+s*a.red(),r*o.green()+s*a.green(),r*o.blue()+s*a.blue(),o.alpha()*e+a.alpha()*(1-e))}};for(let n of Object.keys(mo)){if(vre.includes(n))continue;let{channels:t}=mo[n];Qi.prototype[n]=function(...o){return this.model===n?new Qi(this):o.length>0?new Qi(o,n):new Qi([...c4e(mo[this.model][n].raw(this.color)),this.valpha],n)},Qi[n]=function(...o){let a=o[0];return typeof a=="number"&&(a=P2(o,t)),new Qi(a,n)}}function s4e(n,t){return Number(n.toFixed(t))}function g4e(n){return function(t){return s4e(t,n)}}function Mr(n,t,o){n=Array.isArray(n)?n:[n];for(let a of n)(v2[a]||=[])[t]=o;return n=n[0],function(a){let e;return a!==void 0?(o&&(a=o(a)),e=this[n](),e.color[t]=a,e):(e=this[n]().color[t],o&&(e=o(e)),e)}}function ei(n){return function(t){return Math.max(0,Math.min(n,t))}}function c4e(n){return Array.isArray(n)?n:[n]}function P2(n,t){for(let o=0;o{Fre.exports=Gre().default});function l4e(n){return this._setBackgroundColourOption("tint",n),this}function d4e(n){return this.options.greyscale=O.bool(n)?n:!0,this}function p4e(n){return this.greyscale(n)}function h4e(n){if(!O.string(n))throw O.invalidParameterError("colourspace","string",n);return this.options.colourspacePipeline=n,this}function E4e(n){return this.pipelineColourspace(n)}function u4e(n){if(!O.string(n))throw O.invalidParameterError("colourspace","string",n);return this.options.colourspace=n,this}function C4e(n){return this.toColourspace(n)}function Kre(n){if(O.object(n)||O.string(n)&&n.length>=3&&n.length<=200){let t=(0,Hre.default)(n),o=t.red(),a=t.green(),e=t.blue(),i=Math.round(t.alpha()*255);for(let[A,r]of[["red",o],["green",a],["blue",e],["alpha",i]])if(!O.number(r))throw O.invalidParameterError(`background.${A}`,"number",r);return[o,a,e,i]}else throw O.invalidParameterError("background","object or string",n)}function B4e(n,t){O.defined(t)&&(this.options[n]=Kre(t))}var Hre,Ure,xre,Yre=ue(()=>{Hre=ze(Lre(),1);Ys();Ure={multiband:"multiband","b-w":"b-w",bw:"b-w",cmyk:"cmyk",srgb:"srgb"};xre=n=>{Object.assign(n.prototype,{tint:l4e,greyscale:d4e,grayscale:p4e,pipelineColourspace:h4e,pipelineColorspace:E4e,toColourspace:u4e,toColorspace:C4e,_getBackgroundColourOption:Kre,_setBackgroundColourOption:B4e}),n.colourspace=Ure,n.colorspace=Ure}});function Q4e(){return this.options.removeAlpha=!0,this}function y4e(n){if(O.defined(n))if(O.number(n)&&O.inRange(n,0,1))this.options.ensureAlpha=n;else throw O.invalidParameterError("alpha","number between 0 and 1",n);else this.options.ensureAlpha=1;return this}function m4e(n){let t={red:0,green:1,blue:2,alpha:3};if(Object.keys(t).includes(n)&&(n=t[n]),O.integer(n)&&O.inRange(n,0,4))this.options.extractChannel=n;else throw O.invalidParameterError("channel","integer or one of: red, green, blue, alpha",n);return this}function S4e(n,t){return Array.isArray(n)?n.forEach(function(o){this.options.joinChannelIn.push(this._createInputDescriptor(o,t))},this):this.options.joinChannelIn.push(this._createInputDescriptor(n,t)),this}function w4e(n){if(O.string(n)&&O.inArray(n,["and","or","eor"]))this.options.bandBoolOp=n;else throw O.invalidParameterError("boolOp","one of: and, or, eor",n);return this}var f4e,jre,Jre=ue(()=>{Ys();f4e={and:"and",or:"or",eor:"eor"};jre=n=>{Object.assign(n.prototype,{removeAlpha:Q4e,ensureAlpha:y4e,extractChannel:m4e,joinChannel:S4e,bandbool:w4e}),n.bool=f4e}});import F2 from"node:path";function O4e(n,t){let o;if(O.string(n)?O.string(this.options.input.file)&&F2.resolve(this.options.input.file)===F2.resolve(n)?o=new Error("Cannot use same file for input and output"):D4e.test(F2.extname(n))&&!this.constructor.format.jp2.output.file&&(o=zre()):o=new Error("Missing output file path"),o)if(O.fn(t))t(o);else return Promise.reject(o);else{this.options.fileOut=n;let a=Error();return this._pipeline(t,a)}return this}function b4e(n,t){O.object(n)?this._setBooleanOption("resolveWithObject",n.resolveWithObject):this.options.resolveWithObject&&(this.options.resolveWithObject=!1),this.options.fileOut="";let o=Error();return this._pipeline(O.fn(n)?n:t,o)}function M4e(){this.options.resolveWithObject=!0,this.options.typedArrayOut=!0;let n=Error();return this._pipeline(null,n)}function _4e(n){if(O.number(n)&&n>0)this.options.withMetadataDensity=n;else throw O.invalidParameterError("density","positive number",n);return this.keepExif()}function T4e(){return this.options.keepMetadata|=1,this}function N4e(n){if(O.object(n))for(let[t,o]of Object.entries(n))if(O.object(o))for(let[a,e]of Object.entries(o))if(O.string(e))this.options.withExif[`exif-${t.toLowerCase()}-${a}`]=e;else throw O.invalidParameterError(`${t}.${a}`,"string",e);else throw O.invalidParameterError(t,"object",o);else throw O.invalidParameterError("exif","object",n);return this.options.withExifMerge=!1,this.keepExif()}function R4e(n){return this.withExif(n),this.options.withExifMerge=!0,this}function k4e(){return this.options.keepMetadata|=8,this}function v4e(n,t){if(O.string(n))this.options.withIccProfile=n;else throw O.invalidParameterError("icc","string",n);if(this.keepIccProfile(),O.object(t)&&O.defined(t.attach))if(O.bool(t.attach))t.attach||(this.options.keepMetadata&=-9);else throw O.invalidParameterError("attach","boolean",t.attach);return this}function P4e(){return this.options.keepGainMap=!0,this.options.withGainMap=!1,this.options.keepMetadata|=32,this}function G4e(){return this.options.withGainMap=!0,this.options.keepGainMap=!1,this.options.colourspace="scrgb",this}function F4e(){return this.options.keepMetadata|=2,this}function L4e(n){if(O.string(n)&&n.length>0)this.options.withXmp=n,this.options.keepMetadata|=2;else throw O.invalidParameterError("xmp","non-empty string",n);return this}function U4e(){return this.options.keepMetadata|=31,this}function H4e(n){if(this.keepMetadata(),this.withIccProfile("srgb"),O.object(n)){if(O.defined(n.orientation))if(O.integer(n.orientation)&&O.inRange(n.orientation,1,8))this.options.withMetadataOrientation=n.orientation;else throw O.invalidParameterError("orientation","integer between 1 and 8",n.orientation);if(O.defined(n.density))if(O.number(n.density)&&n.density>0)this.options.withMetadataDensity=n.density;else throw O.invalidParameterError("density","positive number",n.density);O.defined(n.icc)&&this.withIccProfile(n.icc),O.defined(n.exif)&&this.withExifMerge(n.exif)}return this}function K4e(n,t){let o=qre.get((O.object(n)&&O.string(n.id)?n.id:n).toLowerCase());if(!o)throw O.invalidParameterError("format",`one of: ${[...qre.keys()].join(", ")}`,n);return this[o](t)}function x4e(n){if(O.object(n)){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.jpegQuality=n.quality;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);if(O.defined(n.progressive)&&this._setBooleanOption("jpegProgressive",n.progressive),O.defined(n.chromaSubsampling))if(O.string(n.chromaSubsampling)&&O.inArray(n.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jpegChromaSubsampling=n.chromaSubsampling;else throw O.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",n.chromaSubsampling);let t=O.bool(n.optimizeCoding)?n.optimizeCoding:n.optimiseCoding;if(O.defined(t)&&this._setBooleanOption("jpegOptimiseCoding",t),O.defined(n.mozjpeg))if(O.bool(n.mozjpeg))n.mozjpeg&&(this.options.jpegTrellisQuantisation=!0,this.options.jpegOvershootDeringing=!0,this.options.jpegOptimiseScans=!0,this.options.jpegProgressive=!0,this.options.jpegQuantisationTable=3);else throw O.invalidParameterError("mozjpeg","boolean",n.mozjpeg);let o=O.bool(n.trellisQuantization)?n.trellisQuantization:n.trellisQuantisation;O.defined(o)&&this._setBooleanOption("jpegTrellisQuantisation",o),O.defined(n.overshootDeringing)&&this._setBooleanOption("jpegOvershootDeringing",n.overshootDeringing);let a=O.bool(n.optimizeScans)?n.optimizeScans:n.optimiseScans;O.defined(a)&&(this._setBooleanOption("jpegOptimiseScans",a),a&&(this.options.jpegProgressive=!0));let e=O.number(n.quantizationTable)?n.quantizationTable:n.quantisationTable;if(O.defined(e))if(O.integer(e)&&O.inRange(e,0,8))this.options.jpegQuantisationTable=e;else throw O.invalidParameterError("quantisationTable","integer between 0 and 8",e)}return this._updateFormatOut("jpeg",n)}function Y4e(n){if(O.object(n)){if(O.defined(n.progressive)&&this._setBooleanOption("pngProgressive",n.progressive),O.defined(n.compressionLevel))if(O.integer(n.compressionLevel)&&O.inRange(n.compressionLevel,0,9))this.options.pngCompressionLevel=n.compressionLevel;else throw O.invalidParameterError("compressionLevel","integer between 0 and 9",n.compressionLevel);O.defined(n.adaptiveFiltering)&&this._setBooleanOption("pngAdaptiveFiltering",n.adaptiveFiltering);let t=n.colours||n.colors;if(O.defined(t))if(O.integer(t)&&O.inRange(t,2,256))this.options.pngBitdepth=Vre(t);else throw O.invalidParameterError("colours","integer between 2 and 256",t);if(O.defined(n.palette)?this._setBooleanOption("pngPalette",n.palette):[n.quality,n.effort,n.colours,n.colors,n.dither].some(O.defined)&&this._setBooleanOption("pngPalette",!0),this.options.pngPalette){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,0,100))this.options.pngQuality=n.quality;else throw O.invalidParameterError("quality","integer between 0 and 100",n.quality);if(O.defined(n.effort))if(O.integer(n.effort)&&O.inRange(n.effort,1,10))this.options.pngEffort=n.effort;else throw O.invalidParameterError("effort","integer between 1 and 10",n.effort);if(O.defined(n.dither))if(O.number(n.dither)&&O.inRange(n.dither,0,1))this.options.pngDither=n.dither;else throw O.invalidParameterError("dither","number between 0.0 and 1.0",n.dither)}}return this._updateFormatOut("png",n)}function j4e(n){if(O.object(n)){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.webpQuality=n.quality;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);if(O.defined(n.alphaQuality))if(O.integer(n.alphaQuality)&&O.inRange(n.alphaQuality,0,100))this.options.webpAlphaQuality=n.alphaQuality;else throw O.invalidParameterError("alphaQuality","integer between 0 and 100",n.alphaQuality);if(O.defined(n.lossless)&&this._setBooleanOption("webpLossless",n.lossless),O.defined(n.nearLossless)&&this._setBooleanOption("webpNearLossless",n.nearLossless),O.defined(n.smartSubsample)&&this._setBooleanOption("webpSmartSubsample",n.smartSubsample),O.defined(n.smartDeblock)&&this._setBooleanOption("webpSmartDeblock",n.smartDeblock),O.defined(n.preset))if(O.string(n.preset)&&O.inArray(n.preset,["default","photo","picture","drawing","icon","text"]))this.options.webpPreset=n.preset;else throw O.invalidParameterError("preset","one of: default, photo, picture, drawing, icon, text",n.preset);if(O.defined(n.effort))if(O.integer(n.effort)&&O.inRange(n.effort,0,6))this.options.webpEffort=n.effort;else throw O.invalidParameterError("effort","integer between 0 and 6",n.effort);O.defined(n.minSize)&&this._setBooleanOption("webpMinSize",n.minSize),O.defined(n.mixed)&&this._setBooleanOption("webpMixed",n.mixed),O.defined(n.exact)&&this._setBooleanOption("webpExact",n.exact)}return L2(n,this.options),this._updateFormatOut("webp",n)}function J4e(n){if(O.object(n)){O.defined(n.reuse)&&this._setBooleanOption("gifReuse",n.reuse),O.defined(n.progressive)&&this._setBooleanOption("gifProgressive",n.progressive);let t=n.colours||n.colors;if(O.defined(t))if(O.integer(t)&&O.inRange(t,2,256))this.options.gifBitdepth=Vre(t);else throw O.invalidParameterError("colours","integer between 2 and 256",t);if(O.defined(n.effort))if(O.integer(n.effort)&&O.inRange(n.effort,1,10))this.options.gifEffort=n.effort;else throw O.invalidParameterError("effort","integer between 1 and 10",n.effort);if(O.defined(n.dither))if(O.number(n.dither)&&O.inRange(n.dither,0,1))this.options.gifDither=n.dither;else throw O.invalidParameterError("dither","number between 0.0 and 1.0",n.dither);if(O.defined(n.interFrameMaxError))if(O.number(n.interFrameMaxError)&&O.inRange(n.interFrameMaxError,0,32))this.options.gifInterFrameMaxError=n.interFrameMaxError;else throw O.invalidParameterError("interFrameMaxError","number between 0.0 and 32.0",n.interFrameMaxError);if(O.defined(n.interPaletteMaxError))if(O.number(n.interPaletteMaxError)&&O.inRange(n.interPaletteMaxError,0,256))this.options.gifInterPaletteMaxError=n.interPaletteMaxError;else throw O.invalidParameterError("interPaletteMaxError","number between 0.0 and 256.0",n.interPaletteMaxError);if(O.defined(n.keepDuplicateFrames))if(O.bool(n.keepDuplicateFrames))this._setBooleanOption("gifKeepDuplicateFrames",n.keepDuplicateFrames);else throw O.invalidParameterError("keepDuplicateFrames","boolean",n.keepDuplicateFrames)}return L2(n,this.options),this._updateFormatOut("gif",n)}function q4e(n){if(!this.constructor.format.jp2.output.buffer)throw zre();if(O.object(n)){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.jp2Quality=n.quality;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);if(O.defined(n.lossless))if(O.bool(n.lossless))this.options.jp2Lossless=n.lossless;else throw O.invalidParameterError("lossless","boolean",n.lossless);if(O.defined(n.tileWidth))if(O.integer(n.tileWidth)&&O.inRange(n.tileWidth,1,32768))this.options.jp2TileWidth=n.tileWidth;else throw O.invalidParameterError("tileWidth","integer between 1 and 32768",n.tileWidth);if(O.defined(n.tileHeight))if(O.integer(n.tileHeight)&&O.inRange(n.tileHeight,1,32768))this.options.jp2TileHeight=n.tileHeight;else throw O.invalidParameterError("tileHeight","integer between 1 and 32768",n.tileHeight);if(O.defined(n.chromaSubsampling))if(O.string(n.chromaSubsampling)&&O.inArray(n.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jp2ChromaSubsampling=n.chromaSubsampling;else throw O.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",n.chromaSubsampling)}return this._updateFormatOut("jp2",n)}function L2(n,t){if(O.object(n)&&O.defined(n.loop))if(O.integer(n.loop)&&O.inRange(n.loop,0,65535))t.loop=n.loop;else throw O.invalidParameterError("loop","integer between 0 and 65535",n.loop);if(O.object(n)&&O.defined(n.delay))if(O.integer(n.delay)&&O.inRange(n.delay,0,65535))t.delay=[n.delay];else if(Array.isArray(n.delay)&&n.delay.every(O.integer)&&n.delay.every(o=>O.inRange(o,0,65535)))t.delay=n.delay;else throw O.invalidParameterError("delay","integer or an array of integers between 0 and 65535",n.delay)}function z4e(n){if(O.object(n)){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.tiffQuality=n.quality;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);if(O.defined(n.bitdepth))if(O.integer(n.bitdepth)&&O.inArray(n.bitdepth,[1,2,4]))this.options.tiffBitdepth=n.bitdepth;else throw O.invalidParameterError("bitdepth","1, 2 or 4",n.bitdepth);if(O.defined(n.tile)&&this._setBooleanOption("tiffTile",n.tile),O.defined(n.tileWidth))if(O.integer(n.tileWidth)&&O.inRange(n.tileWidth,1,32768))this.options.tiffTileWidth=n.tileWidth;else throw O.invalidParameterError("tileWidth","integer between 1 and 32768",n.tileWidth);if(O.defined(n.tileHeight))if(O.integer(n.tileHeight)&&O.inRange(n.tileHeight,1,32768))this.options.tiffTileHeight=n.tileHeight;else throw O.invalidParameterError("tileHeight","integer between 1 and 32768",n.tileHeight);if(O.defined(n.miniswhite)&&this._setBooleanOption("tiffMiniswhite",n.miniswhite),O.defined(n.pyramid)&&this._setBooleanOption("tiffPyramid",n.pyramid),O.defined(n.xres))if(O.number(n.xres)&&O.inRange(n.xres,.001,1e6))this.options.tiffXres=n.xres;else throw O.invalidParameterError("xres","number between 0.001 and 1000000",n.xres);if(O.defined(n.yres))if(O.number(n.yres)&&O.inRange(n.yres,.001,1e6))this.options.tiffYres=n.yres;else throw O.invalidParameterError("yres","number between 0.001 and 1000000",n.yres);if(O.defined(n.compression))if(O.string(n.compression)&&O.inArray(n.compression,["none","jpeg","deflate","packbits","ccittfax4","lzw","webp","zstd","jp2k"]))this.options.tiffCompression=n.compression;else throw O.invalidParameterError("compression","one of: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k",n.compression);if(O.defined(n.bigtiff)&&this._setBooleanOption("tiffBigtiff",n.bigtiff),O.defined(n.predictor))if(O.string(n.predictor)&&O.inArray(n.predictor,["none","horizontal","float"]))this.options.tiffPredictor=n.predictor;else throw O.invalidParameterError("predictor","one of: none, horizontal, float",n.predictor);if(O.defined(n.resolutionUnit))if(O.string(n.resolutionUnit)&&O.inArray(n.resolutionUnit,["inch","cm"]))this.options.tiffResolutionUnit=n.resolutionUnit;else throw O.invalidParameterError("resolutionUnit","one of: inch, cm",n.resolutionUnit)}return this._updateFormatOut("tiff",n)}function V4e(n){return this.heif({...n,compression:"av1"})}function W4e(n){if(O.object(n)){if(O.string(n.compression)&&O.inArray(n.compression,["av1","hevc"]))this.options.heifCompression=n.compression;else throw O.invalidParameterError("compression","one of: av1, hevc",n.compression);if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.heifQuality=n.quality;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);if(O.defined(n.lossless))if(O.bool(n.lossless))this.options.heifLossless=n.lossless;else throw O.invalidParameterError("lossless","boolean",n.lossless);if(O.defined(n.effort))if(O.integer(n.effort)&&O.inRange(n.effort,0,9))this.options.heifEffort=n.effort;else throw O.invalidParameterError("effort","integer between 0 and 9",n.effort);if(O.defined(n.chromaSubsampling))if(O.string(n.chromaSubsampling)&&O.inArray(n.chromaSubsampling,["4:2:0","4:4:4"]))this.options.heifChromaSubsampling=n.chromaSubsampling;else throw O.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",n.chromaSubsampling);if(O.defined(n.bitdepth))if(O.integer(n.bitdepth)&&O.inArray(n.bitdepth,[8,10,12]))this.options.heifBitdepth=n.bitdepth;else throw O.invalidParameterError("bitdepth","8, 10 or 12",n.bitdepth);if(O.defined(n.tune))if(O.string(n.tune)&&O.inArray(n.tune,["auto","iq","psnr","ssim"]))this.options.heifLossless&&n.tune==="iq"?this.options.heifTune="ssim":this.options.heifTune=n.tune;else throw O.invalidParameterError("tune","one of: auto, iq, psnr, ssim",n.tune)}else throw O.invalidParameterError("options","Object",n);return this._updateFormatOut("heif",n)}function Z4e(n){if(O.object(n)){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.jxlDistance=n.quality>=30?.1+(100-n.quality)*.09:53/3e3*n.quality*n.quality-23/20*n.quality+25;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);else if(O.defined(n.distance))if(O.number(n.distance)&&O.inRange(n.distance,0,15))this.options.jxlDistance=n.distance;else throw O.invalidParameterError("distance","number between 0.0 and 15.0",n.distance);if(O.defined(n.decodingTier))if(O.integer(n.decodingTier)&&O.inRange(n.decodingTier,0,4))this.options.jxlDecodingTier=n.decodingTier;else throw O.invalidParameterError("decodingTier","integer between 0 and 4",n.decodingTier);if(O.defined(n.lossless))if(O.bool(n.lossless))this.options.jxlLossless=n.lossless;else throw O.invalidParameterError("lossless","boolean",n.lossless);if(O.defined(n.effort))if(O.integer(n.effort)&&O.inRange(n.effort,1,9))this.options.jxlEffort=n.effort;else throw O.invalidParameterError("effort","integer between 1 and 9",n.effort)}return L2(n,this.options),this._updateFormatOut("jxl",n)}function X4e(n){if(O.object(n)&&O.defined(n.depth))if(O.string(n.depth)&&O.inArray(n.depth,["char","uchar","short","ushort","int","uint","float","complex","double","dpcomplex"]))this.options.rawDepth=n.depth;else throw O.invalidParameterError("depth","one of: char, uchar, short, ushort, int, uint, float, complex, double, dpcomplex",n.depth);return this._updateFormatOut("raw")}function $4e(n){if(O.object(n)){if(O.defined(n.size))if(O.integer(n.size)&&O.inRange(n.size,1,8192))this.options.tileSize=n.size;else throw O.invalidParameterError("size","integer between 1 and 8192",n.size);if(O.defined(n.overlap))if(O.integer(n.overlap)&&O.inRange(n.overlap,0,8192)){if(n.overlap>this.options.tileSize)throw O.invalidParameterError("overlap",`<= size (${this.options.tileSize})`,n.overlap);this.options.tileOverlap=n.overlap}else throw O.invalidParameterError("overlap","integer between 0 and 8192",n.overlap);if(O.defined(n.container))if(O.string(n.container)&&O.inArray(n.container,["fs","zip"]))this.options.tileContainer=n.container;else throw O.invalidParameterError("container","one of: fs, zip",n.container);if(O.defined(n.layout))if(O.string(n.layout)&&O.inArray(n.layout,["dz","google","iiif","iiif3","zoomify"]))this.options.tileLayout=n.layout;else throw O.invalidParameterError("layout","one of: dz, google, iiif, iiif3, zoomify",n.layout);if(O.defined(n.angle))if(O.integer(n.angle)&&!(n.angle%90))this.options.tileAngle=n.angle;else throw O.invalidParameterError("angle","positive/negative multiple of 90",n.angle);if(this._setBackgroundColourOption("tileBackground",n.background),O.defined(n.depth))if(O.string(n.depth)&&O.inArray(n.depth,["onepixel","onetile","one"]))this.options.tileDepth=n.depth;else throw O.invalidParameterError("depth","one of: onepixel, onetile, one",n.depth);if(O.defined(n.skipBlanks))if(O.integer(n.skipBlanks)&&O.inRange(n.skipBlanks,-1,65535))this.options.tileSkipBlanks=n.skipBlanks;else throw O.invalidParameterError("skipBlanks","integer between -1 and 255/65535",n.skipBlanks);else O.defined(n.layout)&&n.layout==="google"&&(this.options.tileSkipBlanks=5);let t=O.bool(n.center)?n.center:n.centre;if(O.defined(t)&&this._setBooleanOption("tileCentre",t),O.defined(n.id))if(O.string(n.id))this.options.tileId=n.id;else throw O.invalidParameterError("id","string",n.id);if(O.defined(n.basename))if(O.string(n.basename))this.options.tileBasename=n.basename;else throw O.invalidParameterError("basename","string",n.basename)}if(O.inArray(this.options.formatOut,["jpeg","png","webp"]))this.options.tileFormat=this.options.formatOut;else if(this.options.formatOut!=="input")throw O.invalidParameterError("format","one of: jpeg, png, webp",this.options.formatOut);return this._updateFormatOut("dz")}function e8e(n){if(!O.plainObject(n))throw O.invalidParameterError("options","object",n);if(O.integer(n.seconds)&&O.inRange(n.seconds,0,3600))this.options.timeoutSeconds=n.seconds;else throw O.invalidParameterError("seconds","integer between 0 and 3600",n.seconds);return this}function A8e(n,t){return O.object(t)&&t.force===!1||(this.options.formatOut=n),this}function t8e(n,t){if(O.bool(t))this.options[n]=t;else throw O.invalidParameterError(n,"boolean",t)}function r8e(){if(!this.options.streamOut){this.options.streamOut=!0;let n=Error();this._pipeline(void 0,n)}}function i8e(n,t){return typeof n=="function"?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),Ot.pipeline(this.options,(o,a,e)=>{o?n(O.nativeError(o,t)):n(null,a,e)})}):Ot.pipeline(this.options,(o,a,e)=>{o?n(O.nativeError(o,t)):n(null,a,e)}),this):this.options.streamOut?(this._isStreamInput()?(this.once("finish",()=>{this._flattenBufferIn(),Ot.pipeline(this.options,(o,a,e)=>{o?this.emit("error",O.nativeError(o,t)):(this.emit("info",e),this.push(a)),this.push(null),this.on("end",()=>this.emit("close"))})}),this.streamInFinished&&this.emit("finish")):Ot.pipeline(this.options,(o,a,e)=>{o?this.emit("error",O.nativeError(o,t)):(this.emit("info",e),this.push(a)),this.push(null),this.on("end",()=>this.emit("close"))}),this):this._isStreamInput()?new Promise((o,a)=>{this.once("finish",()=>{this._flattenBufferIn(),Ot.pipeline(this.options,(e,i,A)=>{e?a(O.nativeError(e,t)):this.options.resolveWithObject?o({data:i,info:A}):o(i)})})}):new Promise((o,a)=>{Ot.pipeline(this.options,(e,i,A)=>{e?a(O.nativeError(e,t)):this.options.resolveWithObject?o({data:i,info:A}):o(i)})})}var qre,D4e,zre,Vre,Wre,Zre=ue(()=>{Ys();hf();qre=new Map([["heic","heif"],["heif","heif"],["avif","avif"],["jpeg","jpeg"],["jpg","jpeg"],["jpe","jpeg"],["tile","tile"],["dz","tile"],["png","png"],["raw","raw"],["tiff","tiff"],["tif","tiff"],["webp","webp"],["gif","gif"],["jp2","jp2"],["jpx","jp2"],["j2k","jp2"],["j2c","jp2"],["jxl","jxl"]]),D4e=/\.(jp[2x]|j2[kc])$/i,zre=()=>new Error("JP2 output requires libvips with support for OpenJPEG"),Vre=n=>1<<31-Math.clz32(Math.ceil(Math.log2(n)));Wre=n=>{Object.assign(n.prototype,{toFile:O4e,toBuffer:b4e,toUint8Array:M4e,withDensity:_4e,keepExif:T4e,withExif:N4e,withExifMerge:R4e,keepIccProfile:k4e,withIccProfile:v4e,keepGainMap:P4e,withGainMap:G4e,keepXmp:F4e,withXmp:L4e,keepMetadata:U4e,withMetadata:H4e,toFormat:K4e,jpeg:x4e,jp2:q4e,png:Y4e,webp:j4e,tiff:z4e,avif:V4e,heif:W4e,jxl:Z4e,gif:J4e,raw:X4e,tile:$4e,timeout:e8e,_updateFormatOut:A8e,_setBooleanOption:t8e,_read:r8e,_pipeline:i8e})}});import a8e from"node:events";import{createRequire as o8e}from"node:module";import{availableParallelism as n8e}from"node:os";function $re(n){if(O.bool(n))return n?Ot.cache(50,20,100):Ot.cache(0,0,0);if(O.object(n)){for(let t of["memory","files","items"]){let o=n[t];if(O.defined(o)&&!(O.integer(o)&&o>=0))throw O.invalidParameterError(t,"a positive integer",o)}return Ot.cache(n.memory,n.files,n.items)}else return Ot.cache()}function g8e(n){return Ot.concurrency(O.integer(n)?n:null)}function I8e(){return Ot.counters()}function l8e(n){return Ot.simd(O.bool(n)?n:null)}function d8e(n){if(O.object(n))if(Array.isArray(n.operation)&&n.operation.every(O.string))Ot.block(n.operation,!0);else throw O.invalidParameterError("operation","Array",n.operation);else throw O.invalidParameterError("options","object",n)}function p8e(n){if(O.object(n))if(Array.isArray(n.operation)&&n.operation.every(O.string))Ot.block(n.operation,!1);else throw O.invalidParameterError("operation","Array",n.operation);else throw O.invalidParameterError("options","object",n)}var Ef,U2,Xre,H2,SI,s8e,tE,c8e,eie,Aie=ue(()=>{Ef=ze(lO(),1);Ys();b2();hf();DO();U2=o8e(import.meta.url),Xre=OO.runtimePlatformArch(),H2=Ot.libvipsVersion(),SI=Ot.format();SI.heif.output.alias=["avif","heic"];SI.jpeg.output.alias=["jpe","jpg"];SI.tiff.output.alias=["tif"];SI.jp2.output.alias=["j2c","j2k","jp2","jpx"];s8e={nearest:"nearest",bilinear:"bilinear",bicubic:"bicubic",locallyBoundedBicubic:"lbb",nohalo:"nohalo",vertexSplitQuadraticBasisSpline:"vsqbs"},tE={vips:H2.semver};if(!H2.isGlobal)if(H2.isWasm)try{tE=U2("@img/sharp-wasm32/versions")}catch{}else try{tE=U2(`@img/sharp-${Xre}/versions`)}catch{try{tE=U2(`@img/sharp-libvips-${Xre}/versions`)}catch{}}tE.sharp=oc.version;tE.heif&&SI.heif&&(SI.heif.input.fileSuffix=[".avif"],SI.heif.output.alias=["avif"]);$re(!0);!process.env.MALLOC_ARENA_MAX&&Ef.default.familySync()===Ef.default.GLIBC&&!Ot._isUsingJemalloc()?Ot.concurrency(1):Ef.default.familySync()===Ef.default.MUSL&&Ot.concurrency()===1024&&Ot.concurrency(n8e());c8e=new a8e.EventEmitter;eie=n=>{n.cache=$re,n.concurrency=g8e,n.counters=I8e,n.simd=l8e,n.format=SI,n.interpolators=s8e,n.versions=tE,n.queue=c8e,n.block=d8e,n.unblock=p8e}});var tie={};Ur(tie,{default:()=>h8e});var h8e,rie=ue(()=>{ure();fre();Dre();bre();Tre();Yre();Jre();Zre();Aie();Bre(Vs);wre(Vs);Ore(Vs);_re(Vs);xre(Vs);jre(Vs);Wre(Vs);eie(Vs);h8e=Vs});var E8e,kA,wI,uf=ue(()=>{E8e="End-Of-Stream",kA=class extends Error{constructor(){super(E8e),this.name="EndOfStreamError"}},wI=class extends Error{constructor(t="The operation was aborted"){super(t),this.name="AbortError"}}});var TO,iie=ue(()=>{TO=class{constructor(){this.resolve=()=>null,this.reject=()=>null,this.promise=new Promise((t,o)=>{this.reject=o,this.resolve=t})}}});var DI,NO=ue(()=>{uf();DI=class{constructor(){this.endOfStream=!1,this.interrupted=!1,this.peekQueue=[]}async peek(t,o=!1){let a=await this.read(t,o);return this.peekQueue.push(t.subarray(0,a)),a}async read(t,o=!1){if(t.length===0)return 0;let a=this.readFromPeekBuffer(t);if(this.endOfStream||(a+=await this.readRemainderFromStream(t.subarray(a),o)),a===0&&!o)throw new kA;return a}readFromPeekBuffer(t){let o=t.length,a=0;for(;this.peekQueue.length>0&&o>0;){let e=this.peekQueue.pop();if(!e)throw new Error("peekData should be defined");let i=Math.min(e.length,o);t.set(e.subarray(0,i),a),a+=i,o-=i,i{uf();iie();NO();Cf=class extends DI{constructor(t){if(super(),this.s=t,this.deferred=null,!t.read||!t.once)throw new Error("Expected an instance of stream.Readable");this.s.once("end",()=>{this.endOfStream=!0,this.deferred&&this.deferred.resolve(0)}),this.s.once("error",o=>this.reject(o)),this.s.once("close",()=>this.abort())}async readFromStream(t,o){if(t.length===0)return 0;let a=this.s.read(t.length);if(a)return t.set(a),a.length;let e={buffer:t,mayBeLess:o,deferred:new TO};return this.deferred=e.deferred,this.s.once("readable",()=>{this.readDeferred(e)}),e.deferred.promise}readDeferred(t){let o=this.s.read(t.buffer.length);o?(t.buffer.set(o),t.deferred.resolve(o.length),this.deferred=null):this.s.once("readable",()=>{this.readDeferred(t)})}reject(t){this.interrupted=!0,this.deferred&&(this.deferred.reject(t),this.deferred=null)}async abort(){this.reject(new wI)}async close(){return this.abort()}}});var RO,oie=ue(()=>{NO();RO=class extends DI{constructor(t){super(),this.reader=t}async abort(){return this.close()}async close(){this.reader.releaseLock()}}});var Bf,K2=ue(()=>{oie();Bf=class extends RO{async readFromStream(t,o){if(t.length===0)return 0;let a=await this.reader.read(new Uint8Array(t.length),{min:o?void 0:t.length});return a.done&&(this.endOfStream=a.done),a.value?(t.set(a.value),a.value.length):0}}});var rE,x2=ue(()=>{uf();NO();rE=class extends DI{constructor(t){super(),this.reader=t,this.buffer=null}writeChunk(t,o){let a=Math.min(o.length,t.length);return t.set(o.subarray(0,a)),a{K2();x2()});var OI=ue(()=>{uf();aie();K2();x2();nie()});var es,iE=ue(()=>{OI();es=class{constructor(t){this.numBuffer=new Uint8Array(8),this.position=0,this.onClose=t?.onClose,t?.abortSignal&&t.abortSignal.addEventListener("abort",()=>{this.abort()})}async readToken(t,o=this.position){let a=new Uint8Array(t.len);if(await this.readBuffer(a,{position:o})o)return this.position+=o,o}return this.position+=t,t}async close(){await this.abort(),await this.onClose?.()}normalizeOptions(t,o){if(!this.supportsRandomAccess()&&o&&o.position!==void 0&&o.position{iE();OI();u8e=256e3,ff=class extends es{constructor(t,o){super(o),this.streamReader=t,this.fileInfo=o?.fileInfo??{}}async readBuffer(t,o){let a=this.normalizeOptions(t,o),e=a.position-this.position;if(e>0)return await this.ignore(e),this.readBuffer(t,o);if(e<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(a.length===0)return 0;let i=await this.streamReader.read(t.subarray(0,a.length),a.mayBeLess);if(this.position+=i,(!o||!o.mayBeLess)&&i0){let A=new Uint8Array(a.length+i);return e=await this.peekBuffer(A,{mayBeLess:a.mayBeLess}),t.set(A.subarray(i)),e-i}if(i<0)throw new Error("Cannot peek from a negative offset in a stream")}if(a.length>0){try{e=await this.streamReader.peek(t.subarray(0,a.length),a.mayBeLess)}catch(i){if(o?.mayBeLess&&i instanceof kA)return 0;throw i}if(!a.mayBeLess&&e{OI();iE();kO=class extends es{constructor(t,o){super(o),this.uint8Array=t,this.fileInfo={...o?.fileInfo??{},size:t.length}}async readBuffer(t,o){o?.position&&(this.position=o.position);let a=await this.peekBuffer(t,o);return this.position+=a,a}async peekBuffer(t,o){let a=this.normalizeOptions(t,o),e=Math.min(this.uint8Array.length-a.position,a.length);if(!a.mayBeLess&&e{OI();iE();vO=class extends es{constructor(t,o){super(o),this.blob=t,this.fileInfo={...o?.fileInfo??{},size:t.size,mimeType:t.type}}async readBuffer(t,o){o?.position&&(this.position=o.position);let a=await this.peekBuffer(t,o);return this.position+=a,a}async peekBuffer(t,o){let a=this.normalizeOptions(t,o),e=Math.min(this.blob.size-a.position,a.length);if(!a.mayBeLess&&e{if(await o.close(),e)return e()},new ff(o,a)}function PO(n,t){let o=Y2(n),a=t??{},e=a.onClose;return a.onClose=async()=>{if(await o.close(),e)return e()},new ff(o,a)}function So(n,t){return new kO(n,t)}function GO(n,t){return new vO(n,t)}var FO=ue(()=>{OI();sie();gie();cie();OI();iE()});import{open as B8e}from"node:fs/promises";var aE,j2=ue(()=>{iE();OI();aE=class n extends es{static async fromFile(t){let o=await B8e(t,"r"),a=await o.stat();return new n(o,{fileInfo:{path:t,size:a.size}})}constructor(t,o){super(o),this.fileHandle=t,this.fileInfo=o.fileInfo}async readBuffer(t,o){let a=this.normalizeOptions(t,o);if(this.position=a.position,a.length===0)return 0;let e=await this.fileHandle.read(t,0,a.length,a.position);if(this.position+=e.bytesRead,e.bytesRead{FO();j2();j2();FO();lie=aE.fromFile});var die=ee(q2=>{q2.read=function(n,t,o,a,e){var i,A,r=e*8-a-1,s=(1<>1,c=-7,I=o?e-1:0,d=o?-1:1,B=n[t+I];for(I+=d,i=B&(1<<-c)-1,B>>=-c,c+=r;c>0;i=i*256+n[t+I],I+=d,c-=8);for(A=i&(1<<-c)-1,i>>=-c,c+=a;c>0;A=A*256+n[t+I],I+=d,c-=8);if(i===0)i=1-g;else{if(i===s)return A?NaN:(B?-1:1)*(1/0);A=A+Math.pow(2,a),i=i-g}return(B?-1:1)*A*Math.pow(2,i-a)};q2.write=function(n,t,o,a,e,i){var A,r,s,g=i*8-e-1,c=(1<>1,d=e===23?Math.pow(2,-24)-Math.pow(2,-77):0,B=a?0:i-1,f=a?1:-1,Q=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(r=isNaN(t)?1:0,A=c):(A=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-A))<1&&(A--,s*=2),A+I>=1?t+=d/s:t+=d*Math.pow(2,1-I),t*s>=2&&(A++,s/=2),A+I>=c?(r=0,A=c):A+I>=1?(r=(t*s-1)*Math.pow(2,e),A=A+I):(r=t*Math.pow(2,I-1)*Math.pow(2,e),A=0));e>=8;n[o+B]=r&255,B+=f,r/=256,e-=8);for(A=A<0;n[o+B]=A&255,B+=f,A/=256,g-=8);n[o+B-f]|=Q*128}});function Q8e(){if(!(typeof globalThis.TextDecoder>"u"))return LO??(LO=new globalThis.TextDecoder("utf-8"))}function y8e(){if(!(typeof globalThis.TextEncoder>"u"))return UO??(UO=new globalThis.TextEncoder)}function Tr(n,t="utf-8"){switch(t.toLowerCase()){case"utf-8":case"utf8":{let o=Q8e();return o?o.decode(n):S8e(n)}case"utf-16le":return w8e(n);case"us-ascii":case"ascii":return D8e(n);case"latin1":case"iso-8859-1":return O8e(n);case"windows-1252":return b8e(n);default:throw new RangeError(`Encoding '${t}' not supported`)}}function hie(n="",t="utf-8"){switch(t.toLowerCase()){case"utf-8":case"utf8":{let o=y8e();return o?o.encode(n):M8e(n)}case"utf-16le":return _8e(n);case"us-ascii":case"ascii":return T8e(n);case"latin1":case"iso-8859-1":return N8e(n);case"windows-1252":return R8e(n);default:throw new RangeError(`Encoding '${t}' not supported`)}}function V2(n,t){t.length!==0&&(n.push(String.fromCharCode.apply(null,t)),t.length=0)}function Gr(n,t,o){t.push(o),t.length>=oE&&V2(n,t)}function m8e(n,t,o){if(o<=65535){Gr(n,t,o);return}o-=65536,Gr(n,t,55296+(o>>10)),Gr(n,t,56320+(o&1023))}function S8e(n){let t=[],o=[],a=0;for(n.length>=3&&n[0]===239&&n[1]===187&&n[2]===191&&(a=3);a244){Gr(t,o,Hi),a++;continue}if(e<=223){if(a+1>=n.length){Gr(t,o,Hi),a++;continue}let c=n[a+1];if((c&192)!==128){Gr(t,o,Hi),a++;continue}let I=(e&31)<<6|c&63;Gr(t,o,I),a+=2;continue}if(e<=239){if(a+2>=n.length){Gr(t,o,Hi),a++;continue}let c=n[a+1],I=n[a+2];if(!((c&192)===128&&(I&192)===128&&!(e===224&&c<160)&&!(e===237&&c>=160))){Gr(t,o,Hi),a++;continue}let B=(e&15)<<12|(c&63)<<6|I&63;Gr(t,o,B),a+=3;continue}if(a+3>=n.length){Gr(t,o,Hi),a++;continue}let i=n[a+1],A=n[a+2],r=n[a+3];if(!((i&192)===128&&(A&192)===128&&(r&192)===128&&!(e===240&&i<144)&&!(e===244&&i>143))){Gr(t,o,Hi),a++;continue}let g=(e&7)<<18|(i&63)<<12|(A&63)<<6|r&63;m8e(t,o,g),a+=4}return V2(t,o),t.join("")}function w8e(n){let t=[],o=[],a=n.length,e=0;for(;e+1=55296&&i<=56319){if(e+1=56320&&A<=57343?(Gr(t,o,i),Gr(t,o,A),e+=2):Gr(t,o,Hi)}else Gr(t,o,Hi);continue}if(i>=56320&&i<=57343){Gr(t,o,Hi);continue}Gr(t,o,i)}return e=128&&e<=159?pie[e]:void 0;o+=i??String.fromCharCode(e),o.length>=oE&&(t.push(o),o="")}return o&&t.push(o),t.join("")}function M8e(n){let t=[];for(let o=0;o=55296&&a<=56319)if(o+1=56320&&e<=57343?(a=65536+(a-55296<<10)+(e-56320),o++):a=Hi}else a=Hi;else a>=56320&&a<=57343&&(a=Hi);a<128?t.push(a):a<2048?t.push(192|a>>6,128|a&63):a<65536?t.push(224|a>>12,128|a>>6&63,128|a&63):t.push(240|a>>18,128|a>>12&63,128|a>>6&63,128|a&63)}return new Uint8Array(t)}function _8e(n){let t=[];for(let a=0;a=55296&&e<=56319){if(a+1=56320&&i<=57343?(t.push(e,i),a++):t.push(Hi)}else t.push(Hi);continue}if(e>=56320&&e<=57343){t.push(Hi);continue}t.push(e)}let o=new Uint8Array(t.length*2);for(let a=0;a>>8}return o}function T8e(n){let t=new Uint8Array(n.length);for(let o=0;o=0&&e<=127||e>=160&&e<=255){t[o]=e;continue}t[o]=63}return t}var pie,z2,LO,UO,oE,Hi,Zs=ue(()=>{pie={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"},z2={};for(let[n,t]of Object.entries(pie))z2[t]=Number.parseInt(n,10);oE=32*1024,Hi=65533});var VA={};Ur(VA,{AnsiStringType:()=>Z2,Float16_BE:()=>P8e,Float16_LE:()=>G8e,Float32_BE:()=>$2,Float32_LE:()=>F8e,Float64_BE:()=>KO,Float64_LE:()=>L8e,Float80_BE:()=>U8e,Float80_LE:()=>H8e,INT16_BE:()=>gn,INT16_LE:()=>k8e,INT24_BE:()=>HO,INT24_LE:()=>v8e,INT32_BE:()=>Sa,INT32_LE:()=>Cr,INT64_BE:()=>X2,INT64_LE:()=>mf,INT8:()=>$s,IgnoreType:()=>W2,StringType:()=>We,UINT16_BE:()=>LA,UINT16_LE:()=>SA,UINT24_BE:()=>Fr,UINT24_LE:()=>yf,UINT32_BE:()=>xe,UINT32_LE:()=>Le,UINT64_BE:()=>eg,UINT64_LE:()=>Lr,UINT8:()=>QA,Uint8ArrayType:()=>_t});function zA(n){return new DataView(n.buffer,n.byteOffset)}var Xs,QA,SA,LA,yf,Fr,Le,xe,$s,gn,k8e,v8e,HO,Sa,Cr,Lr,mf,eg,X2,P8e,G8e,$2,F8e,KO,L8e,U8e,H8e,W2,_t,We,Z2,DA=ue(()=>{Xs=ze(die(),1);Zs();QA={len:1,get(n,t){return zA(n).getUint8(t)},put(n,t,o){return zA(n).setUint8(t,o),t+1}},SA={len:2,get(n,t){return zA(n).getUint16(t,!0)},put(n,t,o){return zA(n).setUint16(t,o,!0),t+2}},LA={len:2,get(n,t){return zA(n).getUint16(t)},put(n,t,o){return zA(n).setUint16(t,o),t+2}},yf={len:3,get(n,t){let o=zA(n);return o.getUint8(t)+(o.getUint16(t+1,!0)<<8)},put(n,t,o){let a=zA(n);return a.setUint8(t,o&255),a.setUint16(t+1,o>>8,!0),t+3}},Fr={len:3,get(n,t){let o=zA(n);return(o.getUint16(t)<<8)+o.getUint8(t+2)},put(n,t,o){let a=zA(n);return a.setUint16(t,o>>8),a.setUint8(t+2,o&255),t+3}},Le={len:4,get(n,t){return zA(n).getUint32(t,!0)},put(n,t,o){return zA(n).setUint32(t,o,!0),t+4}},xe={len:4,get(n,t){return zA(n).getUint32(t)},put(n,t,o){return zA(n).setUint32(t,o),t+4}},$s={len:1,get(n,t){return zA(n).getInt8(t)},put(n,t,o){return zA(n).setInt8(t,o),t+1}},gn={len:2,get(n,t){return zA(n).getInt16(t)},put(n,t,o){return zA(n).setInt16(t,o),t+2}},k8e={len:2,get(n,t){return zA(n).getInt16(t,!0)},put(n,t,o){return zA(n).setInt16(t,o,!0),t+2}},v8e={len:3,get(n,t){let o=yf.get(n,t);return o>8388607?o-16777216:o},put(n,t,o){let a=zA(n);return a.setUint8(t,o&255),a.setUint16(t+1,o>>8,!0),t+3}},HO={len:3,get(n,t){let o=Fr.get(n,t);return o>8388607?o-16777216:o},put(n,t,o){let a=zA(n);return a.setUint16(t,o>>8),a.setUint8(t+2,o&255),t+3}},Sa={len:4,get(n,t){return zA(n).getInt32(t)},put(n,t,o){return zA(n).setInt32(t,o),t+4}},Cr={len:4,get(n,t){return zA(n).getInt32(t,!0)},put(n,t,o){return zA(n).setInt32(t,o,!0),t+4}},Lr={len:8,get(n,t){return zA(n).getBigUint64(t,!0)},put(n,t,o){return zA(n).setBigUint64(t,o,!0),t+8}},mf={len:8,get(n,t){return zA(n).getBigInt64(t,!0)},put(n,t,o){return zA(n).setBigInt64(t,o,!0),t+8}},eg={len:8,get(n,t){return zA(n).getBigUint64(t)},put(n,t,o){return zA(n).setBigUint64(t,o),t+8}},X2={len:8,get(n,t){return zA(n).getBigInt64(t)},put(n,t,o){return zA(n).setBigInt64(t,o),t+8}},P8e={len:2,get(n,t){return Xs.read(n,t,!1,10,this.len)},put(n,t,o){return Xs.write(n,o,t,!1,10,this.len),t+this.len}},G8e={len:2,get(n,t){return Xs.read(n,t,!0,10,this.len)},put(n,t,o){return Xs.write(n,o,t,!0,10,this.len),t+this.len}},$2={len:4,get(n,t){return zA(n).getFloat32(t)},put(n,t,o){return zA(n).setFloat32(t,o),t+4}},F8e={len:4,get(n,t){return zA(n).getFloat32(t,!0)},put(n,t,o){return zA(n).setFloat32(t,o,!0),t+4}},KO={len:8,get(n,t){return zA(n).getFloat64(t)},put(n,t,o){return zA(n).setFloat64(t,o),t+8}},L8e={len:8,get(n,t){return zA(n).getFloat64(t,!0)},put(n,t,o){return zA(n).setFloat64(t,o,!0),t+8}},U8e={len:10,get(n,t){return Xs.read(n,t,!1,63,this.len)},put(n,t,o){return Xs.write(n,o,t,!1,63,this.len),t+this.len}},H8e={len:10,get(n,t){return Xs.read(n,t,!0,63,this.len)},put(n,t,o){return Xs.write(n,o,t,!0,63,this.len),t+this.len}},W2=class{constructor(t){this.len=t}get(t,o){}},_t=class{constructor(t){this.len=t}get(t,o){return t.subarray(o,o+this.len)}},We=class{constructor(t,o){this.len=t,this.encoding=o}get(t,o=0){let a=t.subarray(o,o+this.len);return Tr(a,this.encoding)}},Z2=class extends We{constructor(t){super(t,"windows-1252")}}});var sd,eU,Eie,uie,Cie,Bie=ue(()=>{DA();sd={LocalFileHeader:67324752,DataDescriptor:134695760,CentralFileHeader:33639248,EndOfCentralDirectory:101010256},eU={get(n){return{signature:Le.get(n,0),compressedSize:Le.get(n,8),uncompressedSize:Le.get(n,12)}},len:16},Eie={get(n){let t=SA.get(n,6);return{signature:Le.get(n,0),minVersion:SA.get(n,4),dataDescriptor:!!(t&8),compressedMethod:SA.get(n,8),compressedSize:Le.get(n,18),uncompressedSize:Le.get(n,22),filenameLength:SA.get(n,26),extraFieldLength:SA.get(n,28),filename:null}},len:30},uie={get(n){return{signature:Le.get(n,0),nrOfThisDisk:SA.get(n,4),nrOfThisDiskWithTheStart:SA.get(n,6),nrOfEntriesOnThisDisk:SA.get(n,8),nrOfEntriesOfSize:SA.get(n,10),sizeOfCd:Le.get(n,12),offsetOfStartOfCd:Le.get(n,16),zipFileCommentLength:SA.get(n,20)}},len:22},Cie={get(n){let t=SA.get(n,8);return{signature:Le.get(n,0),minVersion:SA.get(n,6),dataDescriptor:!!(t&8),compressedMethod:SA.get(n,10),compressedSize:Le.get(n,20),uncompressedSize:Le.get(n,24),filenameLength:SA.get(n,28),extraFieldLength:SA.get(n,30),fileCommentLength:SA.get(n,32),relativeOffsetOfLocalHeader:Le.get(n,42),filename:null}},len:46}});function Qie(n){let t=new Uint8Array(Le.len);return Le.put(t,0,n),t}function x8e(n,t){let o=n.length,a=t.length;if(a>o)return-1;for(let e=0;e<=o-a;e++){let i=!0;for(let A=0;Ae+i.length,0),o=new Uint8Array(t),a=0;for(let e of n)o.set(e,a),a+=e.length;return o}var fie,Ag,AU,K8e,xO,gd,yie=ue(()=>{DA();fie=ze(lt(),1);Bie();Ag=(0,fie.default)("tokenizer:inflate"),AU=256*1024,K8e=Qie(sd.DataDescriptor),xO=Qie(sd.EndOfCentralDirectory),gd=class n{constructor(t){this.tokenizer=t,this.syncBuffer=new Uint8Array(AU)}async isZip(){return await this.peekSignature()===sd.LocalFileHeader}peekSignature(){return this.tokenizer.peekToken(Le)}async findEndOfCentralDirectoryLocator(){let t=this.tokenizer,o=Math.min(16*1024,t.fileInfo.size),a=this.syncBuffer.subarray(0,o);await this.tokenizer.readBuffer(a,{position:t.fileInfo.size-o});for(let e=a.length-4;e>=0;e--)if(a[e]===xO[0]&&a[e+1]===xO[1]&&a[e+2]===xO[2]&&a[e+3]===xO[3])return t.fileInfo.size-o+e;return-1}async readCentralDirectory(){if(!this.tokenizer.supportsRandomAccess()){Ag("Cannot reading central-directory without random-read support");return}Ag("Reading central-directory...");let t=this.tokenizer.position,o=await this.findEndOfCentralDirectoryLocator();if(o>0){Ag("Central-directory 32-bit signature found");let a=await this.tokenizer.readToken(uie,o),e=[];this.tokenizer.setPosition(a.offsetOfStartOfCd);for(let i=0;i=0?g:s;if(i.handler){let I=new Uint8Array(c);await this.tokenizer.readBuffer(I),r.push(I)}else await this.tokenizer.ignore(c)}Ag(`Found data-descriptor-signature at pos=${this.tokenizer.position}`),i.handler&&await this.inflate(e,Y8e(r),i.handler)}else i.handler?(Ag(`Reading compressed-file-data: ${e.compressedSize} bytes`),A=new Uint8Array(e.compressedSize),await this.tokenizer.readBuffer(A),await this.inflate(e,A,i.handler)):(Ag(`Ignoring compressed-file-data: ${e.compressedSize} bytes`),await this.tokenizer.ignore(e.compressedSize));if(Ag(`Reading data-descriptor at pos=${this.tokenizer.position}`),e.dataDescriptor&&(await this.tokenizer.readToken(eU)).signature!==134695760)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-eU.len}`)}while(!a)}async iterateOverCentralDirectory(t,o){for(let a of t){let e=o(a);if(e.handler){this.tokenizer.setPosition(a.relativeOffsetOfLocalHeader);let i=await this.readLocalFileHeader();if(i){await this.tokenizer.ignore(i.extraFieldLength);let A=new Uint8Array(a.compressedSize);await this.tokenizer.readBuffer(A),await this.inflate(i,A,e.handler)}}if(e.stop)break}}async inflate(t,o,a){if(t.compressedMethod===0)return a(o);if(t.compressedMethod!==8)throw new Error(`Unsupported ZIP compression method: ${t.compressedMethod}`);Ag(`Decompress filename=${t.filename}, compressed-size=${o.length}`);let e=await n.decompressDeflateRaw(o);return a(e)}static async decompressDeflateRaw(t){let o=new ReadableStream({start(i){i.enqueue(t),i.close()}}),a=new DecompressionStream("deflate-raw"),e=o.pipeThrough(a);try{let A=await new Response(e).arrayBuffer();return new Uint8Array(A)}catch(i){let A=i instanceof Error?`Failed to deflate ZIP entry: ${i.message}`:"Unknown decompression error in ZIP entry";throw new TypeError(A)}}async readLocalFileHeader(){let t=await this.tokenizer.peekToken(Le);if(t===sd.LocalFileHeader){let o=await this.tokenizer.readToken(Eie);return o.filename=await this.tokenizer.readToken(new We(o.filenameLength,"utf-8")),o}if(t===sd.CentralFileHeader)return!1;throw t===3759263696?new Error("Encrypted ZIP"):new Error("Unexpected signature")}}});var Sf,mie=ue(()=>{Sf=class{constructor(t){this.tokenizer=t}inflate(){let t=this.tokenizer;return new ReadableStream({async pull(o){let a=new Uint8Array(1024),e=await t.readBuffer(a,{mayBeLess:!0});if(e===0){o.close();return}o.enqueue(a.subarray(0,e))}}).pipeThrough(new DecompressionStream("gzip"))}}});var Sie=ue(()=>{yie();mie()});function q8e(n,t,o){return n?n.constructor===t?!0:j8e.call(n)===o:!1}function z8e(n){return q8e(n,Uint8Array,J8e)}function V8e(n){if(!z8e(n))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof n}\``)}function YO(n){V8e(n);let t="";for(let o=0;o{j8e=Object.prototype.toString,J8e="[object Uint8Array]";KMA={utf8:new globalThis.TextDecoder("utf8")},xMA=new globalThis.TextEncoder,W8e=Array.from({length:256},(n,t)=>t.toString(16).padStart(2,"0"))});function wie(n,t){if(t==="utf-16le"){let o=[];for(let a=0;a>8&255)}return o}if(t==="utf-16be"){let o=[];for(let a=0;a>8&255,e&255)}return o}return[...n].map(o=>o.charCodeAt(0))}function Die(n,t=0){let o=Number.parseInt(new We(6).get(n,148).replace(/\0.*$/,"").trim(),8);if(Number.isNaN(o))return!1;let a=256;for(let e=t;e{DA();Oie={get:(n,t)=>n[t+3]&127|n[t+2]<<7|n[t+1]<<14|n[t]<<21,len:4}});var Mie,_ie,Tie=ue(()=>{Mie=["jpg","png","apng","gif","webp","flif","xcf","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","elf","macho","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ttc","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","j2c","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","skp","avif","eps","lzh","pgp","asar","stl","chm","3mf","zst","jxl","vcf","jls","pst","dwg","parquet","class","arj","cpio","ace","avro","icc","fbx","vsdx","vtt","apk","drc","lz4","potx","xltx","dotx","xltm","ott","ots","otp","odg","otg","xlsm","docm","dotm","potm","pptm","jar","jmp","rm","sav","ppsm","ppsx","tar.gz","reg","dat"],_ie=["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-xcf","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.ms-powerpoint.slideshow.macroenabled.12","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/vnd.apache.arrow.file","video/mp4","audio/midi","video/matroska","video/webm","video/quicktime","video/vnd.avi","audio/wav","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","video/ogg","audio/ogg","audio/ogg; codecs=opus","application/ogg","audio/flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-elf","application/x-mach-binary","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","font/collection","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-cfb","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/j2c","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","text/vcard","text/vtt","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar","model/stl","application/vnd.ms-htmlhelp","model/3mf","image/jxl","application/zstd","image/jls","application/vnd.ms-outlook","image/vnd.dwg","application/vnd.apache.parquet","application/java-vm","application/x-arj","application/x-cpio","application/x-ace-compressed","application/avro","application/vnd.iccprofile","application/x.autodesk.fbx","application/vnd.visio","application/vnd.android.package-archive","application/vnd.google.draco","application/x-lz4","application/vnd.openxmlformats-officedocument.presentationml.template","application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/vnd.ms-excel.template.macroenabled.12","application/vnd.oasis.opendocument.text-template","application/vnd.oasis.opendocument.spreadsheet-template","application/vnd.oasis.opendocument.presentation-template","application/vnd.oasis.opendocument.graphics","application/vnd.oasis.opendocument.graphics-template","application/vnd.ms-excel.sheet.macroenabled.12","application/vnd.ms-word.document.macroenabled.12","application/vnd.ms-word.template.macroenabled.12","application/vnd.ms-powerpoint.template.macroenabled.12","application/vnd.ms-powerpoint.presentation.macroenabled.12","application/java-archive","application/vnd.rn-realmedia","application/x-spss-sav","application/x-ms-regedit","application/x-ft-windows-registry-hive","application/x-jmp-data"]});function cze(n){let t=n?.streamReader;if(t?.constructor?.name!=="WebStreamByobReader")return n;let{reader:o}=t,a=async()=>{await o.cancel(),o.releaseLock()};return t.close=a,t.abort=async()=>{t.interrupted=!0,await a()},n}function aU(n,t,o){if(!Number.isFinite(n)||n<0||n>t)throw new gc(`${o} has invalid size ${n} (maximum ${t} bytes)`);return n}async function bI(n,t,{maximumLength:o=cn,reason:a="skip"}={}){let e=aU(t,o,a);await n.ignore(e)}async function rU(n,t,o,{maximumLength:a=t.length,reason:e="read"}={}){let i=o?.length??t.length,A=aU(i,a,e);return n.readBuffer(t,{...o,length:A})}async function Ize(n,{maximumLength:t=rg}={}){let e=new ReadableStream({start(g){g.enqueue(n),g.close()}}).pipeThrough(new DecompressionStream("deflate-raw")).getReader(),i=[],A=0;try{for(;;){let{done:g,value:c}=await e.read();if(g)break;if(A+=c.length,A>t)throw await e.cancel(),new Error(`ZIP entry decompressed data exceeds ${t} bytes`);i.push(c)}}finally{e.releaseLock()}let r=new Uint8Array(A),s=0;for(let g of i)r.set(g,s),s+=g.length;return r}function dze(n,t){if(n.length=0?0:r===e?Math.min(lze,r-1):0,c=s>=0?s:r-g;if(c===0)break;if(A+=c,A>o)throw new Error(`ZIP entry compressed data exceeds ${o} bytes`);if(t){let I=new Uint8Array(c);await n.tokenizer.readBuffer(I),i.push(I)}else await n.tokenizer.ignore(c);if(s>=0)break}if(wa(n.tokenizer)||(n.knownSizeDescriptorScannedBytes+=A),!!t)return hze(i,A)}function uze(n,t){return wa(n.tokenizer)?Math.max(0,cn-(n.tokenizer.position-t)):Math.max(0,rg-n.knownSizeDescriptorScannedBytes)}async function Cze(n,t,{shouldBuffer:o,maximumDescriptorLength:a=rg}={}){if(t.dataDescriptor&&t.compressedSize===0)return Eze(n,{shouldBuffer:o,maximumLength:a});if(!o){await bI(n.tokenizer,t.compressedSize,{maximumLength:wa(n.tokenizer)?rg:n.tokenizer.fileInfo.size,reason:"ZIP entry compressed data"});return}let e=Sze(n.tokenizer);if(!Number.isFinite(t.compressedSize)||t.compressedSize<0||t.compressedSize>e)throw new Error(`ZIP entry compressed data exceeds ${e} bytes`);let i=new Uint8Array(t.compressedSize);return await n.tokenizer.readBuffer(i),i}function Bze(n,t){let o=n.getReader(),a=0,e=!1,i=!1,A=async r=>{e||i||(i=!0,await o.cancel(r))};return new ReadableStream({async pull(r){if(a>=t){r.close(),await A();return}let{done:s,value:g}=await o.read();if(s||!g){e=!0,r.close();return}let c=t-a;if(g.length>c){r.enqueue(g.subarray(0,c)),a+=c,r.close(),await A();return}r.enqueue(g),a+=g.length},async cancel(r){await A(r)}})}async function Mf(n,t){return new iU(t).fromBuffer(n)}function Hie(n){switch(n=n.toLowerCase(),n){case"application/epub+zip":return{ext:"epub",mime:n};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:n};case"application/vnd.oasis.opendocument.text-template":return{ext:"ott",mime:n};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:n};case"application/vnd.oasis.opendocument.spreadsheet-template":return{ext:"ots",mime:n};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:n};case"application/vnd.oasis.opendocument.presentation-template":return{ext:"otp",mime:n};case"application/vnd.oasis.opendocument.graphics":return{ext:"odg",mime:n};case"application/vnd.oasis.opendocument.graphics-template":return{ext:"otg",mime:n};case"application/vnd.openxmlformats-officedocument.presentationml.slideshow":return{ext:"ppsx",mime:n};case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return{ext:"xlsx",mime:n};case"application/vnd.ms-excel.sheet.macroenabled":return{ext:"xlsm",mime:"application/vnd.ms-excel.sheet.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.spreadsheetml.template":return{ext:"xltx",mime:n};case"application/vnd.ms-excel.template.macroenabled":return{ext:"xltm",mime:"application/vnd.ms-excel.template.macroenabled.12"};case"application/vnd.ms-powerpoint.slideshow.macroenabled":return{ext:"ppsm",mime:"application/vnd.ms-powerpoint.slideshow.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return{ext:"docx",mime:n};case"application/vnd.ms-word.document.macroenabled":return{ext:"docm",mime:"application/vnd.ms-word.document.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.template":return{ext:"dotx",mime:n};case"application/vnd.ms-word.template.macroenabledtemplate":return{ext:"dotm",mime:"application/vnd.ms-word.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.template":return{ext:"potx",mime:n};case"application/vnd.ms-powerpoint.template.macroenabled":return{ext:"potm",mime:"application/vnd.ms-powerpoint.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.presentation":return{ext:"pptx",mime:n};case"application/vnd.ms-powerpoint.presentation.macroenabled":return{ext:"pptm",mime:"application/vnd.ms-powerpoint.presentation.macroenabled.12"};case"application/vnd.ms-visio.drawing":return{ext:"vsdx",mime:"application/vnd.visio"};case"application/vnd.ms-package.3dmanufacturing-3dmodel+xml":return{ext:"3mf",mime:"model/3mf"};default:}}function tg(n,t,o){o={offset:0,...o};for(let[a,e]of t.entries())if(o.mask){if(e!==(o.mask[a]&n[a+o.offset]))return!1}else if(e!==n[a+o.offset])return!1;return!0}function fze(n){return Number.isFinite(n)?Math.max(1,Math.trunc(n)):Of}function Qze(n,t,o){return o===void 0?n.read(t):(o.throwIfAborted(),new Promise((a,e)=>{let i=()=>{o.removeEventListener("abort",A)},A=()=>{let r=o.reason;i(),(async()=>{try{await n.cancel(r)}catch{}})(),e(r)};o.addEventListener("abort",A,{once:!0}),(async()=>{try{let r=await n.read(t);i(),a(r)}catch(r){i(),e(r)}})()}))}function yze(n){return Number.isFinite(n)?Math.max(0,Math.min(Z8e,Math.trunc(n))):0}function mze(n){return Number.isFinite(n)?Math.max(0,n):Number.MAX_SAFE_INTEGER}function wa(n){let t=n.fileInfo.size;return!Number.isFinite(t)||t===Number.MAX_SAFE_INTEGER}function bf(n,t,o){return wa(n)&&n.position-t>o}function Sze(n){let t=n.fileInfo.size,o=Number.isFinite(t)?Math.max(0,t-n.position):Number.MAX_SAFE_INTEGER;return Math.min(o,X8e)}function wze(n){if(n instanceof kA||n instanceof gc)return!0;if(!(n instanceof Error))return!1;if(nze.has(n.message)||gze.has(n.code))return!0;for(let t of sze)if(n.message.startsWith(t))return!0;return!1}function Kie(n,t=rg){let o=[n.compressedSize,n.uncompressedSize];for(let a of o)if(!Number.isFinite(a)||a<0||a>t)return!1;return!0}function Dze(){return{hasContentTypesEntry:!1,hasParsedContentTypesEntry:!1,isParsingContentTypes:!1,hasUnparseableContentTypes:!1,hasWordDirectory:!1,hasPresentationDirectory:!1,hasSpreadsheetDirectory:!1,hasThreeDimensionalModelEntry:!1}}function Oze(n,t){t.startsWith("word/")&&(n.hasWordDirectory=!0),t.startsWith("ppt/")&&(n.hasPresentationDirectory=!0),t.startsWith("xl/")&&(n.hasSpreadsheetDirectory=!0),t.startsWith("3D/")&&t.endsWith(".model")&&(n.hasThreeDimensionalModelEntry=!0)}function xie(n){if(!(!n.hasContentTypesEntry||n.hasUnparseableContentTypes||n.isParsingContentTypes||n.hasParsedContentTypesEntry)){if(n.hasWordDirectory)return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};if(n.hasPresentationDirectory)return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};if(n.hasSpreadsheetDirectory)return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};if(n.hasThreeDimensionalModelEntry)return{ext:"3mf",mime:"model/3mf"}}}function bze(n){let t=n.indexOf('.main+xml"');if(t===-1){let e="application/vnd.ms-package.3dmanufacturing-3dmodel+xml";return n.includes(`ContentType="${e}"`)?e:void 0}let o=n.slice(0,t),a=o.lastIndexOf('"');return o.slice(a+1)}var Of,Z8e,rg,Nie,X8e,cn,JO,Rie,$8e,eze,kie,tU,vie,Pie,Aze,tze,rze,ize,aze,Gie,Fie,Lie,oze,Uie,nze,sze,gze,gc,Yie,jO,lze,iU,Mze,_ze,jie=ue(()=>{DA();FO();Sie();Df();bie();Tie();Of=4100,Z8e=Of-2,rg=1024*1024,Nie=1024,X8e=2**31-1,cn=16*1024*1024,JO=rg,Rie=rg,$8e=cn,eze=1,kie=100,tU=cn,vie=64,Pie=JO,Aze=256,tze=512,rze=cn,ize=512,aze=512,Gie=256,Fie=JO,Lie=JO,oze=JO,Uie=cn,nze=new Set(["Unexpected signature","Encrypted ZIP","Expected Central-File-Header signature"]),sze=["ZIP entry count exceeds ","Unsupported ZIP compression method:","ZIP entry compressed data exceeds ","ZIP entry decompressed data exceeds ","Expected data-descriptor-signature at position "],gze=new Set(["Z_BUF_ERROR","Z_DATA_ERROR","ERR_INVALID_STATE"]),gc=class extends Error{};Yie=134695760,jO=16,lze=jO-1;gd.prototype.inflate=async function(n,t,o){if(n.compressedMethod===0)return o(t);if(n.compressedMethod!==8)throw new Error(`Unsupported ZIP compression method: ${n.compressedMethod}`);let a=await Ize(t,{maximumLength:rg});return o(a)};gd.prototype.unzip=async function(n){let t=!1,o=0,a=this.tokenizer.position;this.knownSizeDescriptorScannedBytes=0;do{if(bf(this.tokenizer,a,cn))throw new gc(`ZIP stream probing exceeds ${cn} bytes`);let e=await this.readLocalFileHeader();if(!e)break;if(o++,o>Nie)throw new Error(`ZIP entry count exceeds ${Nie}`);let i=n(e);t=!!i.stop,await this.tokenizer.ignore(e.extraFieldLength);let A=await Cze(this,e,{shouldBuffer:!!i.handler,maximumDescriptorLength:Math.min(rg,uze(this,a))});if(i.handler&&await this.inflate(e,A,i.handler),e.dataDescriptor){let r=new Uint8Array(jO);if(await this.tokenizer.readBuffer(r),Le.get(r,0)!==Yie)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-r.length}`)}if(bf(this.tokenizer,a,cn))throw new gc(`ZIP stream probing exceeds ${cn} bytes`)}while(!t)};iU=class n{constructor(t){let o=yze(t?.mpegOffsetTolerance);this.options={...t,mpegOffsetTolerance:o},this.detectors=[...this.options.customDetectors??[],{id:"core",detect:this.detectConfident},{id:"core.imprecise",detect:this.detectImprecise}],this.tokenizerOptions={abortSignal:this.options.signal},this.gzipProbeDepth=0}getTokenizerOptions(){return{...this.tokenizerOptions}}createTokenizerFromWebStream(t){return cze(PO(t,this.getTokenizerOptions()))}async parseTokenizer(t,o=0){this.detectionReentryCount=o;let a=t.position;for(let e of this.detectors){let i;try{i=await e.detect(t)}catch(A){if(A instanceof kA||A instanceof gc)return;throw A}if(i)return i;if(a!==t.position)return}}async fromTokenizer(t){try{return await this.parseTokenizer(t)}finally{await t.close()}}async fromBuffer(t){if(!(t instanceof Uint8Array||t instanceof ArrayBuffer))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof t}\``);let o=t instanceof Uint8Array?t:new Uint8Array(t);if(o?.length>1)return this.fromTokenizer(So(o,this.getTokenizerOptions()))}async fromBlob(t){this.options.signal?.throwIfAborted();let o=GO(t,this.getTokenizerOptions());return this.fromTokenizer(o)}async fromStream(t){this.options.signal?.throwIfAborted();let o=this.createTokenizerFromWebStream(t);return this.fromTokenizer(o)}async toDetectionStream(t,o){let a=fze(o?.sampleSize??Of),e,i,A=t.getReader({mode:"byob"});try{let{value:g,done:c}=await Qze(A,new Uint8Array(a),this.options.signal);if(i=g,!c&&g)try{e=await this.fromBuffer(g.subarray(0,a))}catch(I){if(!(I instanceof kA))throw I;e=void 0}i=g}finally{A.releaseLock()}let r=new TransformStream({async start(g){g.enqueue(i)},transform(g,c){c.enqueue(g)}}),s=t.pipeThrough(r);return s.fileType=e,s}async detectGzip(t){if(this.gzipProbeDepth>=eze)return{ext:"gz",mime:"application/gzip"};let o=new Sf(t),a=Bze(o.inflate(),$8e),e=wa(t),i,A,r,s;if(e){let g=new AbortController;i=setTimeout(()=>{g.abort(new DOMException(`Operation timed out after ${kie} ms`,"TimeoutError"))},kie),A=this.options.signal===void 0?g.signal:AbortSignal.any([this.options.signal,g.signal]),r=new n({...this.options,signal:A}),r.gzipProbeDepth=this.gzipProbeDepth+1}else this.gzipProbeDepth++;try{s=await(r??this).fromStream(a)}catch(g){if(g?.name==="AbortError"&&A?.reason?.name!=="TimeoutError")throw g}finally{clearTimeout(i),e||this.gzipProbeDepth--}return s?.ext==="tar"?{ext:"tar.gz",mime:"application/gzip"}:{ext:"gz",mime:"application/gzip"}}check(t,o){return tg(this.buffer,t,o)}checkString(t,o){return this.check(wie(t,o?.encoding),o)}detectConfident=async t=>{if(this.buffer=new Uint8Array(Of),t.fileInfo.size===void 0&&(t.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=t,wa(t)&&(await t.peekBuffer(this.buffer,{length:3,mayBeLess:!0}),this.check([31,139,8])))return this.detectGzip(t);if(await t.peekBuffer(this.buffer,{length:32,mayBeLess:!0}),this.check([66,77]))return{ext:"bmp",mime:"image/bmp"};if(this.check([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(this.check([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(this.check([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(this.check([37,33]))return await t.peekBuffer(this.buffer,{length:24,mayBeLess:!0}),this.checkString("PS-Adobe-",{offset:2})&&this.checkString(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(this.check([31,160])||this.check([31,157]))return{ext:"Z",mime:"application/x-compress"};if(this.check([199,113]))return{ext:"cpio",mime:"application/x-cpio"};if(this.check([96,234]))return{ext:"arj",mime:"application/x-arj"};if(this.check([239,187,191]))return this.detectionReentryCount>=Gie?void 0:(this.detectionReentryCount++,await this.tokenizer.ignore(3),this.detectConfident(t));if(this.check([71,73,70]))return{ext:"gif",mime:"image/gif"};if(this.check([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(this.check([31,139,8]))return this.detectGzip(t);if(this.check([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(this.checkString("ID3")){await bI(t,6,{maximumLength:6,reason:"ID3 header prefix"});let o=await t.readToken(Oie),a=wa(t);if(!Number.isFinite(o)||o<0||a&&(o>tU||t.position+o>tU))return;if(t.position+o>t.fileInfo.size)return a?void 0:{ext:"mp3",mime:"audio/mpeg"};try{await bI(t,o,{maximumLength:a?tU:t.fileInfo.size,reason:"ID3 payload"})}catch(e){if(e instanceof kA)return;throw e}return this.detectionReentryCount>=Gie?void 0:(this.detectionReentryCount++,this.parseTokenizer(t,this.detectionReentryCount))}if(this.checkString("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((this.buffer[0]===67||this.buffer[0]===70)&&this.check([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(this.check([255,216,255]))return this.check([247],{offset:3})?{ext:"jls",mime:"image/jls"}:{ext:"jpg",mime:"image/jpeg"};if(this.check([79,98,106,1]))return{ext:"avro",mime:"application/avro"};if(this.checkString("FLIF"))return{ext:"flif",mime:"image/flif"};if(this.checkString("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(this.checkString("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(this.checkString("FORM"))return{ext:"aif",mime:"audio/aiff"};if(this.checkString("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(this.check([80,75,3,4])){let o,a=Dze();try{await new gd(t).unzip(e=>{Oze(a,e.filename);let i=e.filename==="[Content_Types].xml",A=xie(a);if(!i&&A)return o=A,{stop:!0};switch(e.filename){case"META-INF/mozilla.rsa":return o={ext:"xpi",mime:"application/x-xpinstall"},{stop:!0};case"META-INF/MANIFEST.MF":return o={ext:"jar",mime:"application/java-archive"},{stop:!0};case"mimetype":return Kie(e,Rie)?{async handler(r){let s=new TextDecoder("utf-8").decode(r).trim();o=Hie(s)},stop:!0}:{};case"[Content_Types].xml":return a.hasContentTypesEntry=!0,Kie(e,Rie)?(a.isParsingContentTypes=!0,{async handler(r){let s=new TextDecoder("utf-8").decode(r),g=bze(s);g&&(o=Hie(g)),a.hasParsedContentTypesEntry=!0,a.isParsingContentTypes=!1},stop:!0}):(a.hasUnparseableContentTypes=!0,{});default:return/classes\d*\.dex/.test(e.filename)?(o={ext:"apk",mime:"application/vnd.android.package-archive"},{stop:!0}):{}}})}catch(e){if(!wze(e))throw e;a.isParsingContentTypes&&(a.isParsingContentTypes=!1,a.hasUnparseableContentTypes=!0)}return o??xie(a)??{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await t.ignore(28);let o=new Uint8Array(8);return await t.readBuffer(o),tg(o,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:tg(o,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:tg(o,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:tg(o,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:tg(o,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:tg(o,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(this.buffer[2]===3||this.buffer[2]===5||this.buffer[2]===7)&&(this.buffer[3]===4||this.buffer[3]===6||this.buffer[3]===8))return{ext:"zip",mime:"application/zip"};if(this.checkString("MThd"))return{ext:"mid",mime:"audio/midi"};if(this.checkString("wOFF")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(this.checkString("wOF2")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(this.check([212,195,178,161])||this.check([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(this.checkString("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(this.checkString("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(this.checkString("fLaC"))return{ext:"flac",mime:"audio/flac"};if(this.check([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(this.checkString("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(this.checkString("%PDF"))return{ext:"pdf",mime:"application/pdf"};if(this.check([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(this.check([73,73])){let o=await this.readTiffHeader(!1);if(o)return o}if(this.check([77,77])){let o=await this.readTiffHeader(!0);if(o)return o}if(this.checkString("MAC "))return{ext:"ape",mime:"audio/ape"};if(this.check([26,69,223,163])){async function o(){let s=await t.peekNumber(QA),g=128,c=0;for(;(s&g)===0&&g!==0;)++c,g>>=1;let I=new Uint8Array(c+1);return await rU(t,I,void 0,{maximumLength:I.length,reason:"EBML field"}),I}async function a(){let s=await o(),g=await o();g[0]^=128>>g.length-1;let c=Math.min(6,g.length),I=new DataView(s.buffer),d=new DataView(g.buffer,g.length-c,c);return{id:wf(I),len:wf(d)}}async function e(s){let g=0;for(;s>0;){if(g++,g>Aze||bf(t,A,cn))return;let c=t.position,I=await a();if(I.id===17026){if(I.len>vie)return;let d=aU(I.len,vie,"EBML DocType");return(await t.readToken(new We(d))).replaceAll(/\00.*$/g,"")}if(wa(t)&&(!Number.isFinite(I.len)||I.len<0||I.len>Pie)||(await bI(t,I.len,{maximumLength:wa(t)?Pie:t.fileInfo.size,reason:"EBML payload"}),--s,t.position<=c))return}}let i=await a(),A=t.position;switch(await e(i.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/matroska"};default:return}}if(this.checkString("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(this.check([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(this.checkString("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(this.checkString("MSCF")||this.checkString("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(this.check([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(this.check([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(this.check([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(this.check([127,69,76,70]))return{ext:"elf",mime:"application/x-elf"};if(this.check([33,66,68,78]))return{ext:"pst",mime:"application/vnd.ms-outlook"};if(this.checkString("PAR1")||this.checkString("PARE"))return{ext:"parquet",mime:"application/vnd.apache.parquet"};if(this.checkString("ttcf"))return{ext:"ttc",mime:"font/collection"};if(this.check([254,237,250,206])||this.check([254,237,250,207])||this.check([206,250,237,254])||this.check([207,250,237,254]))return{ext:"macho",mime:"application/x-mach-binary"};if(this.check([4,34,77,24]))return{ext:"lz4",mime:"application/x-lz4"};if(this.checkString("regf"))return{ext:"dat",mime:"application/x-ft-windows-registry-hive"};if(this.checkString("$FL2")||this.checkString("$FL3"))return{ext:"sav",mime:"application/x-spss-sav"};if(this.check([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(this.checkString("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(this.checkString("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(this.check([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(this.checkString("IMPM"))return{ext:"it",mime:"audio/x-it"};if(this.checkString("-lh0-",{offset:2})||this.checkString("-lh1-",{offset:2})||this.checkString("-lh2-",{offset:2})||this.checkString("-lh3-",{offset:2})||this.checkString("-lh4-",{offset:2})||this.checkString("-lh5-",{offset:2})||this.checkString("-lh6-",{offset:2})||this.checkString("-lh7-",{offset:2})||this.checkString("-lzs-",{offset:2})||this.checkString("-lz4-",{offset:2})||this.checkString("-lz5-",{offset:2})||this.checkString("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(this.check([0,0,1,186])){if(this.check([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(this.check([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(this.checkString("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(this.check([202,254,186,190])){let o=xe.get(this.buffer,4),a=LA.get(this.buffer,6);if(o>0&&o<=30)return{ext:"macho",mime:"application/x-mach-binary"};if(a>30)return{ext:"class",mime:"application/java-vm"}}if(this.checkString(".RMF"))return{ext:"rm",mime:"application/vnd.rn-realmedia"};if(this.checkString("DRACO"))return{ext:"drc",mime:"application/vnd.google.draco"};if(this.check([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(this.checkString("=1e3&&o<=1050)return{ext:"dwg",mime:"image/vnd.dwg"}}if(this.checkString("070707"))return{ext:"cpio",mime:"application/x-cpio"};if(this.checkString("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(this.checkString("!"))return await t.ignore(8),await t.readToken(new We(13,"ascii"))==="debian-binary"?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(this.checkString("WEBVTT")&&[` +`,"\r"," "," ","\0"].some(o=>this.checkString(o,{offset:6})))return{ext:"vtt",mime:"text/vtt"};if(this.check([137,80,78,71,13,10,26,10])){let o={ext:"png",mime:"image/png"},a={ext:"apng",mime:"image/apng"};await t.ignore(8);async function e(){return{length:await t.readToken(Sa),type:await t.readToken(new We(4,"latin1"))}}let i=wa(t),A=t.position,r=0,s=!1;do{if(r++,r>tze||bf(t,A,rze))break;let g=t.position,c=await e();if(c.length<0)return;if(c.type==="IHDR"){if(c.length!==13)return;s=!0}switch(c.type){case"IDAT":return o;case"acTL":return a;default:if(!s&&c.type!=="CgBI")return;if(i&&c.length>Fie)return s&&pze(c.type)?o:void 0;try{await bI(t,c.length+4,{maximumLength:i?Fie+4:t.fileInfo.size,reason:"PNG chunk payload"})}catch(I){if(!i&&(I instanceof gc||I instanceof kA))return o;throw I}}if(t.position<=g)break}while(t.position+8ize||bf(t,i,cn)));){let r=t.position,s=await a(),g=s.size-24;if(!Number.isFinite(g)||g<0){o=!0;break}if(tg(s.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){let c=new Uint8Array(16);if(g-=await rU(t,c,void 0,{maximumLength:c.length,reason:"ASF stream type GUID"}),tg(c,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(tg(c,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}if(e&&g>Lie){o=!0;break}if(await bI(t,g,{maximumLength:e?Lie:t.fileInfo.size,reason:"ASF header payload"}),t.position<=r){o=!0;break}}}catch(a){if(a instanceof kA||a instanceof gc)wa(t)&&(o=!0);else throw a}return o?void 0:{ext:"asf",mime:"application/vnd.ms-asf"}}if(this.check([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((this.check([126,16,4])||this.check([126,24,4]))&&this.check([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(this.check([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(this.check([255,79,255,81]))return{ext:"j2c",mime:"image/j2c"};if(this.check([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await t.ignore(20),await t.readToken(new We(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(this.check([255,10])||this.check([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(this.check([254,255]))return this.checkString("=16){let o=new DataView(this.buffer.buffer).getUint32(12,!0);if(o>12&&this.buffer.length>=o+16)try{let a=new TextDecoder().decode(this.buffer.subarray(16,o+16));if(JSON.parse(a).files)return{ext:"asar",mime:"application/x-asar"}}catch{}}if(this.check([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(this.checkString("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(this.check([71])&&this.check([71],{offset:188}))return{ext:"mts",mime:"video/mp2t"};if(this.check([71],{offset:4})&&this.check([71],{offset:196}))return{ext:"mts",mime:"video/mp2t"};if(this.check([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(this.check([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(this.check([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(this.check([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(this.checkString("Kaydara FBX Binary \0"))return{ext:"fbx",mime:"application/x.autodesk.fbx"};if(this.check([76,80],{offset:34})&&(this.check([0,0,1],{offset:8})||this.check([1,0,2],{offset:8})||this.check([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(this.check([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(this.check([255,255,0,0,7,0,0,0,4,0,0,0,1,0,1,0])||this.check([0,0,255,255,0,0,0,7,0,0,0,4,0,1,0,1]))return{ext:"jmp",mime:"application/x-jmp-data"};if(await t.peekBuffer(this.buffer,{length:Math.min(512,t.fileInfo.size),mayBeLess:!0}),this.checkString("ustar",{offset:257})&&(this.checkString("\0",{offset:262})||this.checkString(" ",{offset:262}))||this.check([0,0,0,0,0,0],{offset:257})&&Die(this.buffer))return{ext:"tar",mime:"application/x-tar"};if(this.check([255,254])){let o="utf-16le";return this.checkString("{this.buffer=new Uint8Array(Of);let o=mze(t.fileInfo.size);if(await t.peekBuffer(this.buffer,{length:Math.min(8,o),mayBeLess:!0}),this.check([0,0,1,186])||this.check([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(this.check([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(this.check([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(this.check([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(await t.peekBuffer(this.buffer,{length:Math.min(2+this.options.mpegOffsetTolerance,o),mayBeLess:!0}),this.buffer.length>=2+this.options.mpegOffsetTolerance)for(let a=0;a<=this.options.mpegOffsetTolerance;++a){let e=this.scanMpeg(a);if(e)return e}};async readTiffTag(t){let o=await this.tokenizer.readToken(t?LA:SA);switch(await this.tokenizer.ignore(10),o){case 50341:return{ext:"arw",mime:"image/x-sony-arw"};case 50706:return{ext:"dng",mime:"image/x-adobe-dng"};default:}}async readTiffIFD(t){let o=await this.tokenizer.readToken(t?LA:SA);if(!(o>aze)&&!(wa(this.tokenizer)&&2+o*12>Uie))for(let a=0;a=6){if(this.checkString("CR",{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(e>=8){let r=(t?LA:SA).get(this.buffer,8),s=(t?LA:SA).get(this.buffer,10);if(r===28&&s===254||r===31&&s===11)return{ext:"nef",mime:"image/x-nikon-nef"}}}if(wa(this.tokenizer)&&e>oze)return o;let i=wa(this.tokenizer)?Uie:this.tokenizer.fileInfo.size;try{await bI(this.tokenizer,e,{maximumLength:i,reason:"TIFF IFD offset"})}catch(r){if(r instanceof kA)return;throw r}let A;try{A=await this.readTiffIFD(t)}catch(r){if(r instanceof kA)return;throw r}return A??o}if(a===43)return o}scanMpeg(t){if(this.check([255,224],{offset:t,mask:[255,224]})){if(this.check([16],{offset:t+1,mask:[22]}))return this.check([8],{offset:t+1,mask:[8]})?{ext:"aac",mime:"audio/aac"}:{ext:"aac",mime:"audio/aac"};if(this.check([2],{offset:t+1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(this.check([4],{offset:t+1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(this.check([6],{offset:t+1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}},Mze=new Set(Mie),_ze=new Set(_ie)});var oU=ue(()=>{sn();jie()});var Xie=ee(qO=>{"use strict";Object.defineProperty(qO,"__esModule",{value:!0});qO.format=kze;qO.parse=vze;var Tze=/^[\u0009\u0020-\u007e\u0080-\u00ff]*$/,qie=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,Nze=/[\\"]/g,Rze=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,zie=(()=>{let n=function(){};return n.prototype=Object.create(null),n})();function kze(n){let{type:t,parameters:o}=n;if(!t||!Rze.test(t))throw new TypeError(`Invalid type: ${t}`);let a=t;if(o)for(let e of Object.keys(o)){if(!qie.test(e))throw new TypeError(`Invalid parameter name: ${e}`);a+=`; ${e}=${Uze(o[e])}`}return a}function vze(n,t){let o=t?.comma===!0?Fze:65536,a=n.length,e=sU(n,t?.start??0,a),i=e;e=nU(n,e,a,o);let A=gU(n,i,e),r=n.slice(i,A).toLowerCase();return t?.parameters===!1?{type:r,index:e,parameters:new zie}:Lze(n,r,e,a,o)}var Vie=32,Wie=9,Zie=59,Pze=61,Jie=34,Gze=92,Fze=44;function Lze(n,t,o,a,e){let i=new zie;e:for(;ot;){let a=n.charCodeAt(o-1);if(a!==Vie&&a!==Wie)break;o--}return o}function Uze(n){if(qie.test(n))return n;if(Tze.test(n))return`"${n.replace(Nze,"\\$&")}"`;throw new TypeError(`Invalid parameter value: ${n}`)}});function $ie(n){if(!Hze.test(n))throw new TypeError(`Invalid media type: ${n}`);let t=n.indexOf("/"),o=n.slice(0,t).toLowerCase(),a=n.slice(t+1).toLowerCase(),e,i=a.lastIndexOf("+");return i!==-1&&(e=a.slice(i+1),a=a.slice(0,i)),{type:o,subtype:a,suffix:e}}var Hze,eae=ue(()=>{Hze=/^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}\/[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}$/});var Aae,yi,cU,IU=ue(()=>{Aae={10:"shot",20:"scene",30:"track",40:"part",50:"album",60:"edition",70:"collection"},yi={video:1,audio:2,complex:3,logo:4,subtitle:17,button:18,control:32},cU={[yi.video]:"video",[yi.audio]:"audio",[yi.complex]:"complex",[yi.logo]:"logo",[yi.subtitle]:"subtitle",[yi.button]:"button",[yi.control]:"control"}});var nE,MI,_I,lU,In,cd,St,nr=ue(()=>{nE=n=>class extends Error{constructor(o){super(o),this.name=n}},MI=class extends nE("CouldNotDetermineFileTypeError"){},_I=class extends nE("UnsupportedFileTypeError"){},lU=class extends nE("UnexpectedFileContentError"){constructor(t,o){super(o),this.fileType=t}toString(){return`${this.name} (FileType: ${this.fileType}): ${this.message}`}},In=class extends nE("FieldDecodingError"){},cd=class extends nE("InternalParserError"){},St=n=>class extends lU{constructor(t){super(n,t)}}});function GA(n,t,o){return(n[t]&1<>i;let r=8-i,s=a-r;return s<0?A>>=8-i-a:s>0&&(A<<=s,A|=XA(n,t,o+r,s)),A}function Ki(n,t,o){return XA(n,t,o,1)===1}function rae(n){let t=[];for(let o=0,a=n.length;oo.trim().toLowerCase());if(t.length>=1){let o=Number.parseFloat(t[0]);return t.length===2&&t[1]==="db"?{dB:o,ratio:xze(o)}:{dB:Kze(o),ratio:o}}}function dU(n){if(n.length===0)throw new Error("decodeUintBE: empty Uint8Array");let t=new DataView(n.buffer,n.byteOffset,n.byteLength);return wf(t)}var sr=ue(()=>{DA();nr();Df()});var sE,gE,cE,pU,_f,hU,IE,VO,EU,TI=ue(()=>{DA();sr();sE={0:"Other",1:"32x32 pixels 'file icon' (PNG only)",2:"Other file icon",3:"Cover (front)",4:"Cover (back)",5:"Leaflet page",6:"Media (e.g. label side of CD)",7:"Lead artist/lead performer/soloist",8:"Artist/performer",9:"Conductor",10:"Band/Orchestra",11:"Composer",12:"Lyricist/text writer",13:"Recording Location",14:"During recording",15:"During performance",16:"Movie/video screen capture",17:"A bright coloured fish",18:"Illustration",19:"Band/artist logotype",20:"Publisher/Studio logotype"},gE={other:0,lyrics:1,text:2,movement_part:3,events:4,chord:5,trivia_pop:6},cE={notSynchronized:0,mpegFrameNumber:1,milliseconds:2},pU={get:(n,t)=>n[t+3]&127|n[t+2]<<7|n[t+1]<<14|n[t]<<21,len:4},_f={len:10,get:(n,t)=>({fileIdentifier:new We(3,"ascii").get(n,t),version:{major:$s.get(n,t+3),revision:$s.get(n,t+4)},flags:{unsynchronisation:GA(n,t+5,7),isExtendedHeader:GA(n,t+5,6),expIndicator:GA(n,t+5,5),footer:GA(n,t+5,4)},size:pU.get(n,t+6)})},hU={len:10,get:(n,t)=>({size:xe.get(n,t),extendedFlags:LA.get(n,t+4),sizeOfPadding:xe.get(n,t+6),crcDataPresent:GA(n,t+4,31)})},IE={len:1,get:(n,t)=>{switch(n[t]){case 0:return{encoding:"latin1"};case 1:return{encoding:"utf-16le",bom:!0};case 2:return{encoding:"utf-16be",bom:!1};case 3:return{encoding:"utf8",bom:!1};default:return{encoding:"utf8",bom:!1}}}},VO={len:4,get:(n,t)=>({encoding:IE.get(n,t),language:new We(3,"latin1").get(n,t+1)})},EU={len:6,get:(n,t)=>{let o=VO.get(n,t);return{encoding:o.encoding,language:o.language,timeStampFormat:QA.get(n,t+4),contentType:QA.get(n,t+5)}}}});var Id=ue(()=>{IU();TI()});function aae(n){return WO[n]&&!WO[n].multiple}function oae(n){return!WO[n].multiple||WO[n].unique||!1}var AA,WO,nae=ue(()=>{AA={multiple:!1},WO={year:AA,track:AA,disk:AA,title:AA,artist:AA,artists:{multiple:!0,unique:!0},albumartist:AA,albumartists:{multiple:!0,unique:!0},album:AA,date:AA,originaldate:AA,originalyear:AA,releasedate:AA,comment:{multiple:!0,unique:!1},genre:{multiple:!0,unique:!0},picture:{multiple:!0,unique:!0},composer:{multiple:!0,unique:!0},lyrics:{multiple:!0,unique:!1},albumsort:{multiple:!1,unique:!0},titlesort:{multiple:!1,unique:!0},work:{multiple:!1,unique:!0},artistsort:{multiple:!1,unique:!0},albumartistsort:{multiple:!1,unique:!0},composersort:{multiple:!1,unique:!0},lyricist:{multiple:!0,unique:!0},writer:{multiple:!0,unique:!0},conductor:{multiple:!0,unique:!0},remixer:{multiple:!0,unique:!0},arranger:{multiple:!0,unique:!0},engineer:{multiple:!0,unique:!0},producer:{multiple:!0,unique:!0},technician:{multiple:!0,unique:!0},djmixer:{multiple:!0,unique:!0},mixer:{multiple:!0,unique:!0},label:{multiple:!0,unique:!0},grouping:AA,subtitle:{multiple:!0},discsubtitle:AA,totaltracks:AA,totaldiscs:AA,compilation:AA,rating:{multiple:!0},bpm:AA,mood:AA,media:AA,catalognumber:{multiple:!0,unique:!0},tvShow:AA,tvShowSort:AA,tvSeason:AA,tvEpisode:AA,tvEpisodeId:AA,tvNetwork:AA,podcast:AA,podcasturl:AA,releasestatus:AA,releasetype:{multiple:!0},releasecountry:AA,script:AA,language:AA,copyright:AA,license:AA,encodedby:AA,encodersettings:AA,gapless:AA,barcode:AA,isrc:{multiple:!0},asin:AA,musicbrainz_recordingid:AA,musicbrainz_trackid:AA,musicbrainz_albumid:AA,musicbrainz_artistid:{multiple:!0},musicbrainz_albumartistid:{multiple:!0},musicbrainz_releasegroupid:AA,musicbrainz_workid:AA,musicbrainz_trmid:AA,musicbrainz_discid:AA,acoustid_id:AA,acoustid_fingerprint:AA,musicip_puid:AA,musicip_fingerprint:AA,website:AA,"performer:instrument":{multiple:!0,unique:!0},averageLevel:AA,peakLevel:AA,notes:{multiple:!0,unique:!1},key:AA,originalalbum:AA,originalartist:AA,discogs_artist_id:{multiple:!0,unique:!0},discogs_release_id:AA,discogs_label_id:AA,discogs_master_release_id:AA,discogs_votes:AA,discogs_rating:AA,replaygain_track_peak:AA,replaygain_track_gain:AA,replaygain_album_peak:AA,replaygain_album_gain:AA,replaygain_track_minmax:AA,replaygain_album_minmax:AA,replaygain_undo:AA,description:{multiple:!0},longDescription:AA,category:{multiple:!0},hdVideo:AA,keywords:{multiple:!0},movement:AA,movementIndex:AA,movementTotal:AA,podcastId:AA,showMovement:AA,stik:AA,playCounter:AA}});var Br,cc=ue(()=>{Br=class{static toIntOrNull(t){let o=Number.parseInt(t,10);return Number.isNaN(o)?null:o}static normalizeTrack(t){let o=t.toString().split("/");return{no:Number.parseInt(o[0],10)||null,of:Number.parseInt(o[1],10)||null}}constructor(t,o){this.tagTypes=t,this.tagMap=o}mapGenericTag(t,o){t={id:t.id,value:t.value},this.postMap(t,o);let a=this.getCommonName(t.id);return a?{id:a,value:t.value}:null}getCommonName(t){return this.tagMap[t]}postMap(t,o){}};Br.maxRatingScore=1});var Yze,ZO,sae=ue(()=>{cc();Yze={title:"title",artist:"artist",album:"album",year:"year",comment:"comment",track:"track",genre:"genre"},ZO=class extends Br{constructor(){super(["ID3v1"],Yze)}}});var dn,lE=ue(()=>{cc();dn=class extends Br{constructor(t,o){let a={};for(let e of Object.keys(o))a[e.toUpperCase()]=o[e];super(t,a)}getCommonName(t){return this.tagMap[t.toUpperCase()]}}});var jze,XO,gae=ue(()=>{DA();cc();lE();sr();jze={TIT2:"title",TPE1:"artist","TXXX:Artists":"artists",TPE2:"albumartist",TALB:"album",TDRV:"date",TORY:"originalyear",TPOS:"disk",TCON:"genre",APIC:"picture",TCOM:"composer",USLT:"lyrics",TSOA:"albumsort",TSOT:"titlesort",TOAL:"originalalbum",TSOP:"artistsort",TSO2:"albumartistsort",TSOC:"composersort",TEXT:"lyricist","TXXX:Writer":"writer",TPE3:"conductor",TPE4:"remixer","IPLS:arranger":"arranger","IPLS:engineer":"engineer","IPLS:producer":"producer","IPLS:DJ-mix":"djmixer","IPLS:mix":"mixer",TPUB:"label",TIT1:"grouping",TIT3:"subtitle",TRCK:"track",TCMP:"compilation",POPM:"rating",TBPM:"bpm",TMED:"media","TXXX:CATALOGNUMBER":"catalognumber","TXXX:MusicBrainz Album Status":"releasestatus","TXXX:MusicBrainz Album Type":"releasetype","TXXX:MusicBrainz Album Release Country":"releasecountry","TXXX:RELEASECOUNTRY":"releasecountry","TXXX:SCRIPT":"script",TLAN:"language",TCOP:"copyright",WCOP:"license",TENC:"encodedby",TSSE:"encodersettings","TXXX:BARCODE":"barcode","TXXX:ISRC":"isrc",TSRC:"isrc","TXXX:ASIN":"asin","TXXX:originalyear":"originalyear","UFID:http://musicbrainz.org":"musicbrainz_recordingid","TXXX:MusicBrainz Release Track Id":"musicbrainz_trackid","TXXX:MusicBrainz Album Id":"musicbrainz_albumid","TXXX:MusicBrainz Artist Id":"musicbrainz_artistid","TXXX:MusicBrainz Album Artist Id":"musicbrainz_albumartistid","TXXX:MusicBrainz Release Group Id":"musicbrainz_releasegroupid","TXXX:MusicBrainz Work Id":"musicbrainz_workid","TXXX:MusicBrainz TRM Id":"musicbrainz_trmid","TXXX:MusicBrainz Disc Id":"musicbrainz_discid","TXXX:ACOUSTID_ID":"acoustid_id","TXXX:Acoustid Id":"acoustid_id","TXXX:Acoustid Fingerprint":"acoustid_fingerprint","TXXX:MusicIP PUID":"musicip_puid","TXXX:MusicMagic Fingerprint":"musicip_fingerprint",WOAR:"website",TDRC:"date",TYER:"year",TDOR:"originaldate","TIPL:arranger":"arranger","TIPL:engineer":"engineer","TIPL:producer":"producer","TIPL:DJ-mix":"djmixer","TIPL:mix":"mixer",TMOO:"mood",SYLT:"lyrics",TSST:"discsubtitle",TKEY:"key",COMM:"comment",TOPE:"originalartist","PRIV:AverageLevel":"averageLevel","PRIV:PeakLevel":"peakLevel","TXXX:DISCOGS_ARTIST_ID":"discogs_artist_id","TXXX:DISCOGS_ARTISTS":"artists","TXXX:DISCOGS_ARTIST_NAME":"artists","TXXX:DISCOGS_ALBUM_ARTISTS":"albumartist","TXXX:DISCOGS_CATALOG":"catalognumber","TXXX:DISCOGS_COUNTRY":"releasecountry","TXXX:DISCOGS_DATE":"originaldate","TXXX:DISCOGS_LABEL":"label","TXXX:DISCOGS_LABEL_ID":"discogs_label_id","TXXX:DISCOGS_MASTER_RELEASE_ID":"discogs_master_release_id","TXXX:DISCOGS_RATING":"discogs_rating","TXXX:DISCOGS_RELEASED":"date","TXXX:DISCOGS_RELEASE_ID":"discogs_release_id","TXXX:DISCOGS_VOTES":"discogs_votes","TXXX:CATALOGID":"catalognumber","TXXX:STYLE":"genre","TXXX:REPLAYGAIN_TRACK_PEAK":"replaygain_track_peak","TXXX:REPLAYGAIN_TRACK_GAIN":"replaygain_track_gain","TXXX:REPLAYGAIN_ALBUM_PEAK":"replaygain_album_peak","TXXX:REPLAYGAIN_ALBUM_GAIN":"replaygain_album_gain","TXXX:MP3GAIN_MINMAX":"replaygain_track_minmax","TXXX:MP3GAIN_ALBUM_MINMAX":"replaygain_album_minmax","TXXX:MP3GAIN_UNDO":"replaygain_undo",MVNM:"movement",MVIN:"movementIndex",PCST:"podcast",TCAT:"category",TDES:"description",TDRL:"releasedate",TGID:"podcastId",TKWD:"keywords",WFED:"podcasturl",GRP1:"grouping",PCNT:"playCounter"},XO=class n extends dn{static toRating(t){return{source:t.email,rating:t.rating>0?(t.rating-1)/254*Br.maxRatingScore:void 0}}constructor(){super(["ID3v2.3","ID3v2.4"],jze)}postMap(t,o){switch(t.id){case"UFID":{let a=t.value;a.owner_identifier==="http://musicbrainz.org"&&(t.id+=`:${a.owner_identifier}`,t.value=mi(a.identifier,"latin1"))}break;case"PRIV":{let a=t.value;switch(a.owner_identifier){case"AverageLevel":case"PeakValue":t.id+=`:${a.owner_identifier}`,t.value=a.data.length===4?Le.get(a.data,0):null,t.value===null&&o.addWarning("Failed to parse PRIV:PeakValue");break;default:o.addWarning(`Unknown PRIV owner-identifier: ${a.data}`)}}break;case"POPM":t.value=n.toRating(t.value);break;default:break}}}});var Jze,$O,cae=ue(()=>{cc();Jze={Title:"title",Author:"artist","WM/AlbumArtist":"albumartist","WM/AlbumTitle":"album","WM/Year":"date","WM/OriginalReleaseTime":"originaldate","WM/OriginalReleaseYear":"originalyear",Description:"comment","WM/TrackNumber":"track","WM/PartOfSet":"disk","WM/Genre":"genre","WM/Composer":"composer","WM/Lyrics":"lyrics","WM/AlbumSortOrder":"albumsort","WM/TitleSortOrder":"titlesort","WM/ArtistSortOrder":"artistsort","WM/AlbumArtistSortOrder":"albumartistsort","WM/ComposerSortOrder":"composersort","WM/Writer":"lyricist","WM/Conductor":"conductor","WM/ModifiedBy":"remixer","WM/Engineer":"engineer","WM/Producer":"producer","WM/DJMixer":"djmixer","WM/Mixer":"mixer","WM/Publisher":"label","WM/ContentGroupDescription":"grouping","WM/SubTitle":"subtitle","WM/SetSubTitle":"discsubtitle","WM/IsCompilation":"compilation","WM/SharedUserRating":"rating","WM/BeatsPerMinute":"bpm","WM/Mood":"mood","WM/Media":"media","WM/CatalogNo":"catalognumber","MusicBrainz/Album Status":"releasestatus","MusicBrainz/Album Type":"releasetype","MusicBrainz/Album Release Country":"releasecountry","WM/Script":"script","WM/Language":"language",Copyright:"copyright",LICENSE:"license","WM/EncodedBy":"encodedby","WM/EncodingSettings":"encodersettings","WM/Barcode":"barcode","WM/ISRC":"isrc","MusicBrainz/Track Id":"musicbrainz_recordingid","MusicBrainz/Release Track Id":"musicbrainz_trackid","MusicBrainz/Album Id":"musicbrainz_albumid","MusicBrainz/Artist Id":"musicbrainz_artistid","MusicBrainz/Album Artist Id":"musicbrainz_albumartistid","MusicBrainz/Release Group Id":"musicbrainz_releasegroupid","MusicBrainz/Work Id":"musicbrainz_workid","MusicBrainz/TRM Id":"musicbrainz_trmid","MusicBrainz/Disc Id":"musicbrainz_discid","Acoustid/Id":"acoustid_id","Acoustid/Fingerprint":"acoustid_fingerprint","MusicIP/PUID":"musicip_puid","WM/ARTISTS":"artists","WM/InitialKey":"key",ASIN:"asin","WM/Work":"work","WM/AuthorURL":"website","WM/Picture":"picture"},$O=class n extends Br{static toRating(t){return{rating:Number.parseFloat(t+1)/5}}constructor(){super(["asf"],Jze)}postMap(t){switch(t.id){case"WM/SharedUserRating":{let o=t.id.split(":");t.value=n.toRating(t.value),t.id=o[0];break}}}}});var qze,eb,Iae=ue(()=>{lE();qze={TT2:"title",TP1:"artist",TP2:"albumartist",TAL:"album",TYE:"year",COM:"comment",TRK:"track",TPA:"disk",TCO:"genre",PIC:"picture",TCM:"composer",TOR:"originaldate",TOT:"originalalbum",TXT:"lyricist",TP3:"conductor",TPB:"label",TT1:"grouping",TT3:"subtitle",TLA:"language",TCR:"copyright",WCP:"license",TEN:"encodedby",TSS:"encodersettings",WAR:"website",PCS:"podcast",TCP:"compilation",TDR:"date",TS2:"albumartistsort",TSA:"albumsort",TSC:"composersort",TSP:"artistsort",TST:"titlesort",WFD:"podcasturl",TBP:"bpm",GP1:"grouping"},eb=class extends dn{constructor(){super(["ID3v2.2"],qze)}}});var zze,Ab,lae=ue(()=>{lE();zze={Title:"title",Artist:"artist",Artists:"artists","Album Artist":"albumartist",Album:"album",Year:"date",Originalyear:"originalyear",Originaldate:"originaldate",Releasedate:"releasedate",Comment:"comment",Track:"track",Disc:"disk",DISCNUMBER:"disk",Genre:"genre","Cover Art (Front)":"picture","Cover Art (Back)":"picture",Composer:"composer",Lyrics:"lyrics",ALBUMSORT:"albumsort",TITLESORT:"titlesort",WORK:"work",ARTISTSORT:"artistsort",ALBUMARTISTSORT:"albumartistsort",COMPOSERSORT:"composersort",Lyricist:"lyricist",Writer:"writer",Conductor:"conductor",MixArtist:"remixer",Arranger:"arranger",Engineer:"engineer",Producer:"producer",DJMixer:"djmixer",Mixer:"mixer",Label:"label",Grouping:"grouping",Subtitle:"subtitle",DiscSubtitle:"discsubtitle",Compilation:"compilation",BPM:"bpm",Mood:"mood",Media:"media",CatalogNumber:"catalognumber",MUSICBRAINZ_ALBUMSTATUS:"releasestatus",MUSICBRAINZ_ALBUMTYPE:"releasetype",RELEASECOUNTRY:"releasecountry",Script:"script",Language:"language",Copyright:"copyright",LICENSE:"license",EncodedBy:"encodedby",EncoderSettings:"encodersettings",Barcode:"barcode",ISRC:"isrc",ASIN:"asin",musicbrainz_trackid:"musicbrainz_recordingid",musicbrainz_releasetrackid:"musicbrainz_trackid",MUSICBRAINZ_ALBUMID:"musicbrainz_albumid",MUSICBRAINZ_ARTISTID:"musicbrainz_artistid",MUSICBRAINZ_ALBUMARTISTID:"musicbrainz_albumartistid",MUSICBRAINZ_RELEASEGROUPID:"musicbrainz_releasegroupid",MUSICBRAINZ_WORKID:"musicbrainz_workid",MUSICBRAINZ_TRMID:"musicbrainz_trmid",MUSICBRAINZ_DISCID:"musicbrainz_discid",Acoustid_Id:"acoustid_id",ACOUSTID_FINGERPRINT:"acoustid_fingerprint",MUSICIP_PUID:"musicip_puid",Weblink:"website",REPLAYGAIN_TRACK_GAIN:"replaygain_track_gain",REPLAYGAIN_TRACK_PEAK:"replaygain_track_peak",MP3GAIN_MINMAX:"replaygain_track_minmax",MP3GAIN_UNDO:"replaygain_undo"},Ab=class extends dn{constructor(){super(["APEv2"],zze)}}});var Vze,Wze,Tf,dae=ue(()=>{lE();Vze={"\xA9nam":"title","\xA9ART":"artist",aART:"albumartist","----:com.apple.iTunes:Band":"albumartist","\xA9alb":"album","\xA9day":"date","\xA9cmt":"comment","\xA9com":"comment",trkn:"track",disk:"disk","\xA9gen":"genre",covr:"picture","\xA9wrt":"composer","\xA9lyr":"lyrics",soal:"albumsort",sonm:"titlesort",soar:"artistsort",soaa:"albumartistsort",soco:"composersort","----:com.apple.iTunes:LYRICIST":"lyricist","----:com.apple.iTunes:CONDUCTOR":"conductor","----:com.apple.iTunes:REMIXER":"remixer","----:com.apple.iTunes:ENGINEER":"engineer","----:com.apple.iTunes:PRODUCER":"producer","----:com.apple.iTunes:DJMIXER":"djmixer","----:com.apple.iTunes:MIXER":"mixer","----:com.apple.iTunes:LABEL":"label","\xA9grp":"grouping","----:com.apple.iTunes:SUBTITLE":"subtitle","----:com.apple.iTunes:DISCSUBTITLE":"discsubtitle",cpil:"compilation",tmpo:"bpm","----:com.apple.iTunes:MOOD":"mood","----:com.apple.iTunes:MEDIA":"media","----:com.apple.iTunes:CATALOGNUMBER":"catalognumber",tvsh:"tvShow",tvsn:"tvSeason",tves:"tvEpisode",sosn:"tvShowSort",tven:"tvEpisodeId",tvnn:"tvNetwork",pcst:"podcast",purl:"podcasturl","----:com.apple.iTunes:MusicBrainz Album Status":"releasestatus","----:com.apple.iTunes:MusicBrainz Album Type":"releasetype","----:com.apple.iTunes:MusicBrainz Album Release Country":"releasecountry","----:com.apple.iTunes:SCRIPT":"script","----:com.apple.iTunes:LANGUAGE":"language",cprt:"copyright","\xA9cpy":"copyright","----:com.apple.iTunes:LICENSE":"license","\xA9too":"encodedby",pgap:"gapless","----:com.apple.iTunes:BARCODE":"barcode","----:com.apple.iTunes:ISRC":"isrc","----:com.apple.iTunes:ASIN":"asin","----:com.apple.iTunes:NOTES":"comment","----:com.apple.iTunes:MusicBrainz Track Id":"musicbrainz_recordingid","----:com.apple.iTunes:MusicBrainz Release Track Id":"musicbrainz_trackid","----:com.apple.iTunes:MusicBrainz Album Id":"musicbrainz_albumid","----:com.apple.iTunes:MusicBrainz Artist Id":"musicbrainz_artistid","----:com.apple.iTunes:MusicBrainz Album Artist Id":"musicbrainz_albumartistid","----:com.apple.iTunes:MusicBrainz Release Group Id":"musicbrainz_releasegroupid","----:com.apple.iTunes:MusicBrainz Work Id":"musicbrainz_workid","----:com.apple.iTunes:MusicBrainz TRM Id":"musicbrainz_trmid","----:com.apple.iTunes:MusicBrainz Disc Id":"musicbrainz_discid","----:com.apple.iTunes:Acoustid Id":"acoustid_id","----:com.apple.iTunes:Acoustid Fingerprint":"acoustid_fingerprint","----:com.apple.iTunes:MusicIP PUID":"musicip_puid","----:com.apple.iTunes:fingerprint":"musicip_fingerprint","----:com.apple.iTunes:replaygain_track_gain":"replaygain_track_gain","----:com.apple.iTunes:replaygain_track_peak":"replaygain_track_peak","----:com.apple.iTunes:replaygain_album_gain":"replaygain_album_gain","----:com.apple.iTunes:replaygain_album_peak":"replaygain_album_peak","----:com.apple.iTunes:replaygain_track_minmax":"replaygain_track_minmax","----:com.apple.iTunes:replaygain_album_minmax":"replaygain_album_minmax","----:com.apple.iTunes:replaygain_undo":"replaygain_undo",gnre:"genre","----:com.apple.iTunes:ALBUMARTISTSORT":"albumartistsort","----:com.apple.iTunes:ARTISTS":"artists","----:com.apple.iTunes:ORIGINALDATE":"originaldate","----:com.apple.iTunes:ORIGINALYEAR":"originalyear","----:com.apple.iTunes:RELEASEDATE":"releasedate",desc:"description",ldes:"longDescription","\xA9mvn":"movement","\xA9mvi":"movementIndex","\xA9mvc":"movementTotal","\xA9wrk":"work",catg:"category",egid:"podcastId",hdvd:"hdVideo",keyw:"keywords",shwm:"showMovement",stik:"stik",rate:"rating"},Wze="iTunes",Tf=class extends dn{constructor(){super([Wze],Vze)}postMap(t,o){switch(t.id){case"rate":t.value={source:void 0,rating:Number.parseFloat(t.value)/100};break}}}});var Zze,tb,pae=ue(()=>{cc();Zze={TITLE:"title",ARTIST:"artist",ARTISTS:"artists",ALBUMARTIST:"albumartist","ALBUM ARTIST":"albumartist",ALBUM:"album",DATE:"date",ORIGINALDATE:"originaldate",ORIGINALYEAR:"originalyear",RELEASEDATE:"releasedate",COMMENT:"comment",TRACKNUMBER:"track",DISCNUMBER:"disk",GENRE:"genre",METADATA_BLOCK_PICTURE:"picture",COMPOSER:"composer",LYRICS:"lyrics",ALBUMSORT:"albumsort",TITLESORT:"titlesort",WORK:"work",ARTISTSORT:"artistsort",ALBUMARTISTSORT:"albumartistsort",COMPOSERSORT:"composersort",LYRICIST:"lyricist",WRITER:"writer",CONDUCTOR:"conductor",REMIXER:"remixer",ARRANGER:"arranger",ENGINEER:"engineer",PRODUCER:"producer",DJMIXER:"djmixer",MIXER:"mixer",LABEL:"label",GROUPING:"grouping",SUBTITLE:"subtitle",DISCSUBTITLE:"discsubtitle",TRACKTOTAL:"totaltracks",DISCTOTAL:"totaldiscs",COMPILATION:"compilation",RATING:"rating",BPM:"bpm",KEY:"key",MOOD:"mood",MEDIA:"media",CATALOGNUMBER:"catalognumber",RELEASESTATUS:"releasestatus",RELEASETYPE:"releasetype",RELEASECOUNTRY:"releasecountry",SCRIPT:"script",LANGUAGE:"language",COPYRIGHT:"copyright",LICENSE:"license",ENCODEDBY:"encodedby",ENCODERSETTINGS:"encodersettings",BARCODE:"barcode",ISRC:"isrc",ASIN:"asin",MUSICBRAINZ_TRACKID:"musicbrainz_recordingid",MUSICBRAINZ_RELEASETRACKID:"musicbrainz_trackid",MUSICBRAINZ_ALBUMID:"musicbrainz_albumid",MUSICBRAINZ_ARTISTID:"musicbrainz_artistid",MUSICBRAINZ_ALBUMARTISTID:"musicbrainz_albumartistid",MUSICBRAINZ_RELEASEGROUPID:"musicbrainz_releasegroupid",MUSICBRAINZ_WORKID:"musicbrainz_workid",MUSICBRAINZ_TRMID:"musicbrainz_trmid",MUSICBRAINZ_DISCID:"musicbrainz_discid",ACOUSTID_ID:"acoustid_id",ACOUSTID_ID_FINGERPRINT:"acoustid_fingerprint",MUSICIP_PUID:"musicip_puid",WEBSITE:"website",NOTES:"notes",TOTALTRACKS:"totaltracks",TOTALDISCS:"totaldiscs",DISCOGS_ARTIST_ID:"discogs_artist_id",DISCOGS_ARTISTS:"artists",DISCOGS_ARTIST_NAME:"artists",DISCOGS_ALBUM_ARTISTS:"albumartist",DISCOGS_CATALOG:"catalognumber",DISCOGS_COUNTRY:"releasecountry",DISCOGS_DATE:"originaldate",DISCOGS_LABEL:"label",DISCOGS_LABEL_ID:"discogs_label_id",DISCOGS_MASTER_RELEASE_ID:"discogs_master_release_id",DISCOGS_RATING:"discogs_rating",DISCOGS_RELEASED:"date",DISCOGS_RELEASE_ID:"discogs_release_id",DISCOGS_VOTES:"discogs_votes",CATALOGID:"catalognumber",STYLE:"genre",REPLAYGAIN_TRACK_GAIN:"replaygain_track_gain",REPLAYGAIN_TRACK_PEAK:"replaygain_track_peak",REPLAYGAIN_ALBUM_GAIN:"replaygain_album_gain",REPLAYGAIN_ALBUM_PEAK:"replaygain_album_peak",REPLAYGAIN_MINMAX:"replaygain_track_minmax",REPLAYGAIN_ALBUM_MINMAX:"replaygain_album_minmax",REPLAYGAIN_UNDO:"replaygain_undo"},tb=class n extends Br{static toRating(t,o,a){return{source:t?t.toLowerCase():void 0,rating:Number.parseFloat(o)/a*Br.maxRatingScore}}constructor(){super(["vorbis"],Zze)}postMap(t){if(t.id==="RATING")t.value=n.toRating(void 0,t.value,100);else if(t.id.indexOf("RATING:")===0){let o=t.id.split(":");t.value=n.toRating(o[1],t.value,1),t.id=o[0]}}}});var Xze,rb,hae=ue(()=>{cc();Xze={IART:"artist",ICRD:"date",INAM:"title",TITL:"title",IPRD:"album",ITRK:"track",IPRT:"track",COMM:"comment",ICMT:"comment",ICNT:"releasecountry",GNRE:"genre",IWRI:"writer",RATE:"rating",YEAR:"year",ISFT:"encodedby",CODE:"encodedby",TURL:"website",IGNR:"genre",IENG:"engineer",ITCH:"technician",IMED:"media",IRPD:"album"},rb=class extends Br{constructor(){super(["exif"],Xze)}}});var $ze,ib,Eae=ue(()=>{lE();$ze={"segment:title":"title","album:ARTIST":"albumartist","album:ARTISTSORT":"albumartistsort","album:TITLE":"album","album:DATE_RECORDED":"originaldate","album:DATE_RELEASED":"releasedate","album:PART_NUMBER":"disk","album:TOTAL_PARTS":"totaltracks","track:ARTIST":"artist","track:ARTISTSORT":"artistsort","track:TITLE":"title","track:PART_NUMBER":"track","track:MUSICBRAINZ_TRACKID":"musicbrainz_recordingid","track:MUSICBRAINZ_ALBUMID":"musicbrainz_albumid","track:MUSICBRAINZ_ARTISTID":"musicbrainz_artistid","track:PUBLISHER":"label","track:GENRE":"genre","track:ENCODER":"encodedby","track:ENCODER_OPTIONS":"encodersettings","edition:TOTAL_PARTS":"totaldiscs",picture:"picture"},ib=class extends dn{constructor(){super(["matroska"],$ze)}}});var eVe,ab,uae=ue(()=>{cc();eVe={NAME:"title",AUTH:"artist","(c) ":"copyright",ANNO:"comment"},ab=class extends Br{constructor(){super(["AIFF"],eVe)}}});var ob,Cae=ue(()=>{sae();gae();cae();Iae();lae();dae();pae();hae();Eae();uae();nr();ob=class{constructor(){this.tagMappers={},[new ZO,new eb,new XO,new Tf,new Tf,new tb,new Ab,new $O,new rb,new ib,new ab].forEach(t=>{this.registerTagMapper(t)})}mapTag(t,o,a){if(this.tagMappers[t])return this.tagMappers[t].mapGenericTag(o,a);throw new cd(`No generic tag mapper defined for tag-format: ${t}`)}registerTagMapper(t){for(let o of t.tagTypes)this.tagMappers[o]=t}}});function Bae(n){return uU.test(n)?tVe(n):AVe(n)}function AVe(n){return{contentType:gE.lyrics,timeStampFormat:cE.notSynchronized,text:n.trim(),syncText:[]}}function tVe(n){let t=n.split(` `),o=[];for(let a of t){let e=a.match(uU);if(e){let i=Number.parseInt(e[1],10),A=Number.parseInt(e[2],10),r=e[3].length===3?Number.parseInt(e[3],10):Number.parseInt(e[3],10)*10,s=(i*60+A)*1e3+r,g=a.replace(uU,"").trim();o.push({timestamp:s,text:g})}}return{contentType:gE.lyrics,timeStampFormat:cE.milliseconds,text:o.map(a=>a.text).join(` -`),syncText:o}}var uU,uae=ue(()=>{Id();uU=/\[(\d{2}):(\d{2})\.(\d{2,3})]/});function $ze(n){return n.length>2?`${n.slice(0,n.length-1).join(", ")} & ${n[n.length-1]}`:n.join(" & ")}var Cae,ld,Xze,ob,Bae=ue(()=>{Id();Cae=ze(lt(),1);iae();hae();gc();sr();oU();uae();ld=(0,Cae.default)("music-metadata:collector"),Xze=["matroska","APEv2","vorbis","ID3v2.4","ID3v2.3","ID3v2.2","exif","asf","iTunes","AIFF","ID3v1"],ob=class{constructor(t){this.format={tagTypes:[],trackInfo:[]},this.native={},this.common={track:{no:null,of:null},disk:{no:null,of:null},movementIndex:{no:null,of:null}},this.quality={warnings:[]},this.commonOrigin={},this.originPriority={},this.tagMapper=new ab,this.opts=t;let o=1;for(let a of Xze)this.originPriority[a]=o++;this.originPriority.artificial=500,this.originPriority.id3v1=600}hasAny(){return Object.keys(this.native).length>0}addStreamInfo(t){ld(`streamInfo: type=${t.type?cU[t.type]:"?"}, codec=${t.codecName}`),this.format.trackInfo.push(t)}setFormat(t,o){ld(`format: ${t} = ${o}`),this.format[t]=o,this.opts?.observer&&this.opts.observer({metadata:this,tag:{type:"format",id:t,value:o}})}setAudioOnly(){this.setFormat("hasAudio",!0),this.setFormat("hasVideo",!1)}async addTag(t,o,a){ld(`tag ${t}.${o} = ${a}`),this.native[t]||(this.format.tagTypes.push(t),this.native[t]=[]),this.native[t].push({id:o,value:a}),await this.toCommon(t,o,a)}addWarning(t){this.quality.warnings.push({message:t})}async postMap(t,o){switch(o.id){case"artist":return this.handleSingularArtistTag(t,o,"artist","artists");case"albumartist":return this.handleSingularArtistTag(t,o,"albumartist","albumartists");case"artists":return this.handlePluralArtistTag(t,o,"artist","artists");case"albumartists":return this.handlePluralArtistTag(t,o,"albumartist","albumartists");case"picture":return this.postFixPicture(o.value).then(a=>{a!==null&&(o.value=a,this.setGenericTag(t,o))});case"totaltracks":this.common.track.of=Br.toIntOrNull(o.value);return;case"totaldiscs":this.common.disk.of=Br.toIntOrNull(o.value);return;case"movementTotal":this.common.movementIndex.of=Br.toIntOrNull(o.value);return;case"track":case"disk":case"movementIndex":{let a=this.common[o.id].of;this.common[o.id]=Br.normalizeTrack(o.value),this.common[o.id].of=a??this.common[o.id].of;return}case"bpm":case"year":case"originalyear":o.value=Number.parseInt(o.value,10);break;case"date":{let a=Number.parseInt(o.value.substr(0,4),10);Number.isNaN(a)||(this.common.year=a);break}case"discogs_label_id":case"discogs_release_id":case"discogs_master_release_id":case"discogs_artist_id":case"discogs_votes":o.value=typeof o.value=="string"?Number.parseInt(o.value,10):o.value;break;case"replaygain_track_gain":case"replaygain_track_peak":case"replaygain_album_gain":case"replaygain_album_peak":o.value=Aae(o.value);break;case"replaygain_track_minmax":o.value=o.value.split(",").map(a=>Number.parseInt(a,10));break;case"replaygain_undo":{let a=o.value.split(",").map(e=>Number.parseInt(e,10));o.value={leftChannel:a[0],rightChannel:a[1]};break}case"gapless":case"compilation":case"podcast":case"showMovement":o.value=o.value==="1"||o.value===1;break;case"isrc":{let a=this.common[o.id];if(a&&a.indexOf(o.value)!==-1)return;break}case"comment":typeof o.value=="string"&&(o.value={text:o.value}),o.value.descriptor==="iTunPGAP"&&this.setGenericTag(t,{id:"gapless",value:o.value.text==="1"});break;case"lyrics":typeof o.value=="string"&&(o.value=Eae(o.value));break;default:}o.value!==null&&this.setGenericTag(t,o)}toCommonMetadata(){return{format:this.format,native:this.native,quality:this.quality,common:this.common}}handleSingularArtistTag(t,o,a,e){if(this.commonOrigin[a]===this.originPriority[t])return this.postMap("artificial",{id:e,value:o.value});this.common[e]||this.setGenericTag("artificial",{id:e,value:o.value}),this.setGenericTag(t,o)}handlePluralArtistTag(t,o,a,e){if((!this.common[a]||this.commonOrigin[a]===this.originPriority.artificial)&&(!this.common[e]||this.common[e].indexOf(o.value)===-1)){let i=(this.common[e]||[]).concat([o.value]),A=$ze(i);this.setGenericTag("artificial",{id:a,value:A})}this.setGenericTag(t,o)}async postFixPicture(t){if(t.data&&t.data.length>0){if(!t.format){let o=await Mf(Uint8Array.from(t.data));if(o)t.format=o.mime;else return null}switch(t.format=t.format.toLocaleLowerCase(),t.format){case"image/jpg":t.format="image/jpeg"}return t}return this.addWarning("Empty picture tag found"),null}async toCommon(t,o,a){let e={id:o,value:a},i=this.tagMapper.mapTag(t,e,this);i&&await this.postMap(t,i)}setGenericTag(t,o){ld(`common.${o.id} = ${o.value}`);let a=this.commonOrigin[o.id]||1e3,e=this.originPriority[t];if(tae(o.id))if(e<=a)this.common[o.id]=o.value,this.commonOrigin[o.id]=e;else return ld(`Ignore native tag (singleton): ${t}.${o.id} = ${o.value}`);else if(e===a)!rae(o.id)||this.common[o.id].indexOf(o.value)===-1?this.common[o.id].push(o.value):ld(`Ignore duplicate value: ${t}.${o.id} = ${o.value}`);else if(e{Lt=class{constructor(t,o,a){this.metadata=t,this.tokenizer=o,this.options=a}}});var eVe,at,Da=ue(()=>{Zs();sr();nr();eVe=/^[\x21-\x7e©][\x20-\x7e\x00()]{3}/,at={len:4,get:(n,t)=>{let o=Tr(n.subarray(t,t+at.len),"latin1");if(!o.match(eVe))throw new In(`FourCC contains invalid characters: ${eae(o)} "${o}"`);return o},put:(n,t,o)=>{let a=lie(o,"latin1");if(a.length!==4)throw new cd("Invalid length");return n.set(a,t),t+4}}});function Qae(n){return{containsHeader:nb(n,31),containsFooter:nb(n,30),isHeader:nb(n,29),readOnly:nb(n,0),dataType:(n&6)>>1}}function nb(n,t){return(n&1<{DA();Da();Nf={text_utf8:0,binary:1,external_info:2,reserved:3},CU={len:52,get:(n,t)=>({ID:at.get(n,t),version:Le.get(n,t+4)/1e3,descriptorBytes:Le.get(n,t+8),headerBytes:Le.get(n,t+12),seekTableBytes:Le.get(n,t+16),headerDataBytes:Le.get(n,t+20),apeFrameDataBytes:Le.get(n,t+24),apeFrameDataBytesHigh:Le.get(n,t+28),terminatingDataBytes:Le.get(n,t+32),fileMD5:new Mt(16).get(n,t+36)})},fae={len:24,get:(n,t)=>({compressionLevel:SA.get(n,t),formatFlags:SA.get(n,t+2),blocksPerFrame:Le.get(n,t+4),finalFrameBlocks:Le.get(n,t+8),totalFrames:Le.get(n,t+12),bitsPerSample:SA.get(n,t+16),channel:SA.get(n,t+18),sampleRate:Le.get(n,t+20)})},ro={len:32,get:(n,t)=>({ID:new We(8,"ascii").get(n,t),version:Le.get(n,t+8),size:Le.get(n,t+12),fields:Le.get(n,t+16),flags:Qae(Le.get(n,t+20))})},sb={len:8,get:(n,t)=>({size:Le.get(n,t),flags:Qae(Le.get(n,t+4))})}});var Dae={};Ur(Dae,{APEv2Parser:()=>NI,ApeContentError:()=>dE,tryParseApeHeader:()=>dd});function dd(n,t,o){return new NI(n,t,o).tryParseApeHeader()}var wae,TI,mae,Sae,dE,NI,pd=ue(()=>{wae=ze(lt(),1);sn();DA();sr();to();yae();nr();Zs();TI=(0,wae.default)("music-metadata:parser:APEv2"),mae="APEv2",Sae="APETAGEX",dE=class extends St("APEv2"){};NI=class n extends Lt{constructor(){super(...arguments),this.ape={}}static calculateDuration(t){let o=t.totalFrames>1?t.blocksPerFrame*(t.totalFrames-1):0;return o+=t.finalFrameBlocks,o/t.sampleRate}static async findApeFooterOffset(t,o){let a=new Uint8Array(ro.len),e=t.position;if(o<=ro.len){TI(`Offset is too small to read APE footer: offset=${o}`);return}if(o>ro.len){await t.readBuffer(a,{position:o-ro.len}),t.setPosition(e);let i=ro.get(a,0);if(i.ID==="APETAGEX")return i.flags.isHeader?TI(`APE Header found at offset=${o-ro.len}`):(TI(`APE Footer found at offset=${o-ro.len}`),o-=i.size),{footer:i,offset:o}}}static parseTagFooter(t,o,a){let e=ro.get(o,o.length-ro.len);if(e.ID!==Sae)throw new dE("Unexpected APEv2 Footer ID preamble value");return So(o),new n(t,So(o),a).parseTags(e)}async tryParseApeHeader(){if(this.tokenizer.fileInfo.size&&this.tokenizer.fileInfo.size-this.tokenizer.position0?this.parseDescriptorExpansion(o):this.parseHeader());return this.metadata.setAudioOnly(),await this.tokenizer.ignore(a.forwardBytes),this.tryParseApeHeader()}async parseTags(t){let o=new Uint8Array(256),a=t.size-ro.len;TI(`Parse APE tags at offset=${this.tokenizer.position}, size=${a}`);for(let e=0;ethis.metadata.addTag(mae,r,c)));break}case Nf.binary:if(this.options.skipCovers)await this.tokenizer.ignore(i.size);else{let s=new Uint8Array(i.size);await this.tokenizer.readBuffer(s),A=ig(s);let g=Tr(s.subarray(0,A),"utf-8"),c=s.subarray(A+1);await this.metadata.addTag(mae,r,{description:g,data:c})}break;case Nf.external_info:TI(`Ignore external info ${r}`),await this.tokenizer.ignore(i.size);break;case Nf.reserved:TI(`Ignore external info ${r}`),this.metadata.addWarning(`APEv2 header declares a reserved datatype for "${r}"`),await this.tokenizer.ignore(i.size);break}}}async parseDescriptorExpansion(t){return await this.tokenizer.ignore(t),this.parseHeader()}async parseHeader(){let t=await this.tokenizer.readToken(fae);if(this.metadata.setFormat("lossless",!0),this.metadata.setFormat("container","Monkey's Audio"),this.metadata.setFormat("bitsPerSample",t.bitsPerSample),this.metadata.setFormat("sampleRate",t.sampleRate),this.metadata.setFormat("numberOfChannels",t.channel),this.metadata.setFormat("duration",n.calculateDuration(t)),!this.ape.descriptor)throw new dE("Missing APE descriptor");return{forwardBytes:this.ape.descriptor.seekTableBytes+this.ape.descriptor.headerDataBytes+this.ape.descriptor.apeFrameDataBytes+this.ape.descriptor.terminatingDataBytes}}}});async function bae(n){if(n.fileInfo.size>=128){let t=new Uint8Array(3),o=n.position;return await n.readBuffer(t,{position:n.fileInfo.size-128}),n.setPosition(o),Tr(t,"latin1")==="TAG"}return!1}var Oae,gb,pE,cb,RI,Ib,Rf=ue(()=>{Oae=ze(lt(),1);DA();sr();to();pd();Zs();gb=(0,Oae.default)("music-metadata:parser:ID3v1"),pE=["Blues","Classic Rock","Country","Dance","Disco","Funk","Grunge","Hip-Hop","Jazz","Metal","New Age","Oldies","Other","Pop","R&B","Rap","Reggae","Rock","Techno","Industrial","Alternative","Ska","Death Metal","Pranks","Soundtrack","Euro-Techno","Ambient","Trip-Hop","Vocal","Jazz+Funk","Fusion","Trance","Classical","Instrumental","Acid","House","Game","Sound Clip","Gospel","Noise","Alt. Rock","Bass","Soul","Punk","Space","Meditative","Instrumental Pop","Instrumental Rock","Ethnic","Gothic","Darkwave","Techno-Industrial","Electronic","Pop-Folk","Eurodance","Dream","Southern Rock","Comedy","Cult","Gangsta Rap","Top 40","Christian Rap","Pop/Funk","Jungle","Native American","Cabaret","New Wave","Psychedelic","Rave","Showtunes","Trailer","Lo-Fi","Tribal","Acid Punk","Acid Jazz","Polka","Retro","Musical","Rock & Roll","Hard Rock","Folk","Folk/Rock","National Folk","Swing","Fast-Fusion","Bebob","Latin","Revival","Celtic","Bluegrass","Avantgarde","Gothic Rock","Progressive Rock","Psychedelic Rock","Symphonic Rock","Slow Rock","Big Band","Chorus","Easy Listening","Acoustic","Humour","Speech","Chanson","Opera","Chamber Music","Sonata","Symphony","Booty Bass","Primus","Porn Groove","Satire","Slow Jam","Club","Tango","Samba","Folklore","Ballad","Power Ballad","Rhythmic Soul","Freestyle","Duet","Punk Rock","Drum Solo","A Cappella","Euro-House","Dance Hall","Goa","Drum & Bass","Club-House","Hardcore","Terror","Indie","BritPop","Negerpunk","Polsk Punk","Beat","Christian Gangsta Rap","Heavy Metal","Black Metal","Crossover","Contemporary Christian","Christian Rock","Merengue","Salsa","Thrash Metal","Anime","JPop","Synthpop","Abstract","Art Rock","Baroque","Bhangra","Big Beat","Breakbeat","Chillout","Downtempo","Dub","EBM","Eclectic","Electro","Electroclash","Emo","Experimental","Garage","Global","IDM","Illbient","Industro-Goth","Jam Band","Krautrock","Leftfield","Lounge","Math Rock","New Romantic","Nu-Breakz","Post-Punk","Post-Rock","Psytrance","Shoegaze","Space Rock","Trop Rock","World Music","Neoclassical","Audiobook","Audio Theatre","Neue Deutsche Welle","Podcast","Indie Rock","G-Funk","Dubstep","Garage Rock","Psybient"],cb={len:128,get:(n,t)=>{let o=new RI(3).get(n,t);return o==="TAG"?{header:o,title:new RI(30).get(n,t+3),artist:new RI(30).get(n,t+33),album:new RI(30).get(n,t+63),year:new RI(4).get(n,t+93),comment:new RI(28).get(n,t+97),zeroByte:QA.get(n,t+127),track:QA.get(n,t+126),genre:QA.get(n,t+127)}:null}},RI=class{constructor(t){this.len=t,this.stringType=new We(t,"latin1")}get(t,o){let a=this.stringType.get(t,o);return a=qO(a),a=a.trim(),a.length>0?a:void 0}},Ib=class n extends Lt{constructor(t,o,a){super(t,o,a),this.apeHeader=a.apeHeader}static getGenre(t){if(tt){gb("Already consumed the last 128 bytes");return}let o=await this.tokenizer.readToken(cb,t);if(o){gb("ID3v1 header found at: pos=%s",this.tokenizer.fileInfo.size-cb.len);let a=["title","artist","album","comment","track","year"];for(let i of a)o[i]&&o[i]!==""&&await this.addTag(i,o[i]);let e=n.getGenre(o.genre);e&&await this.addTag("genre",e)}else gb("ID3v1 header not found at: pos=%s",this.tokenizer.fileInfo.size-cb.len)}async addTag(t,o){await this.metadata.addTag("ID3v1",t,o)}}});var BU,Mae=ue(()=>{DA();BU={len:16,get:(n,t)=>{let o=xe.get(n,t+8),a=xe.get(n,t+12);return{startTime:xe.get(n,t),endTime:xe.get(n,t+4),startOffset:o===4294967295?void 0:o,endOffset:a===4294967295?void 0:a}}}});function kf(n){switch(n){case 2:return 6;case 3:case 4:return 10;default:throw _ae(n)}}function AVe(n,t){return t===3?{status:{tag_alter_preservation:GA(n,0,7),file_alter_preservation:GA(n,0,6),read_only:GA(n,0,5)},format:{compression:GA(n,1,7),encryption:GA(n,1,6),grouping_identity:GA(n,1,5),unsynchronisation:!1,data_length_indicator:!1}}:{status:{tag_alter_preservation:GA(n,0,6),file_alter_preservation:GA(n,0,5),read_only:GA(n,0,4)},format:{grouping_identity:GA(n,1,6),compression:GA(n,1,3),encryption:GA(n,1,2),unsynchronisation:GA(n,1,1),data_length_indicator:GA(n,1,0)}}}function vf(n,t,o){switch(t){case 2:return tVe(n,t,o);case 3:case 4:return rVe(n,t,o);default:throw _ae(t)}}function tVe(n,t,o){let a={id:Tr(n.subarray(0,3),"ascii"),length:Fr.get(n,3)};return a.id.match(/^[A-Z0-9]{3}$/)||o.addWarning(`Invalid ID3v2.${t} frame-header-ID: ${a.id}`),a}function rVe(n,t,o){let a={id:Tr(n.subarray(0,4),"ascii"),length:(t===4?pU:xe).get(n,4),flags:AVe(n.subarray(8,10),t)};return a.id.match(/^[A-Z0-9]{4}$/)||o.addWarning(`Invalid ID3v2.${t} frame-header-ID: ${a.id}`),a}function _ae(n){throw new kI(`Unexpected majorVer: ${n}`)}var fU=ue(()=>{DA();sr();_I();Zs();QU()});function iVe(n){let t=[],o,a="";for(let e of n)if(typeof o=="string")if(e==="("&&o==="")a+="(",o=void 0;else if(e===")"){a!==""&&(t.push(a),a="");let i=Tae(o);i&&t.push(i),o=void 0}else o+=e;else e==="("?o="":a+=e;return a&&(t.length===0&&a.match(/^\d*$/)&&(a=Tae(a)),a&&t.push(a)),t}function Tae(n){if(n==="RX")return"Remix";if(n==="CR")return"Cover";if(n.match(/^\d*$/))return pE[Number.parseInt(n,10)]}function aVe(n){throw new kI(`Unexpected majorVer: ${n}`)}var Nae,lb,pn,yU,db,kI,QU=ue(()=>{Nae=ze(lt(),1);DA();sr();_I();Rf();nr();sr();Mae();fU();lb=(0,Nae.default)("music-metadata:id3v2:frame-parser"),pn="latin1",yU={encoding:pn,bom:!1};db=class n{constructor(t,o){this.major=t,this.warningCollector=o}readData(t,o,a){if(t.length===0){this.warningCollector.addWarning(`id3v2.${this.major} header has empty tag type=${o}`);return}let{encoding:e,bom:i}=IE.get(t,0),A=t.length,r=0,s=[],g=n.getNullTerminatorLength(e),c;switch(lb(`Parsing tag type=${o}, encoding=${e}, bom=${i}`),o!=="TXXX"&&o[0]==="T"?"T*":o){case"T*":case"GRP1":case"GP1":case"IPLS":case"MVIN":case"MVNM":case"PCS":case"PCST":{let I;try{I=n.trimNullPadding(mi(t.subarray(1),e))}catch(d){if(d instanceof Error){this.warningCollector.addWarning(`id3v2.${this.major} type=${o} header has invalid string value: ${d.message}`);break}throw d}switch(o){case"TMCL":case"TIPL":case"IPLS":s=n.functionList(this.splitValue(o,I));break;case"TRK":case"TRCK":case"TPOS":case"TIT1":case"TIT2":case"TIT3":s=I;break;case"TCOM":case"TEXT":case"TOLY":case"TOPE":case"TPE1":case"TSRC":s=this.splitValue(o,I);break;case"TCO":case"TCON":s=this.splitValue(o,I).map(d=>iVe(d)).reduce((d,B)=>d.concat(B),[]);break;case"PCS":case"PCST":s=this.major>=4?this.splitValue(o,I):[I],s=Array.isArray(s)&&s[0]===""?1:0;break;default:s=this.major>=4?this.splitValue(o,I):[I]}break}case"TXXX":{let I=n.readIdentifierAndData(t.subarray(1),e);s={description:I.id,text:this.splitValue(o,mi(I.data,e).replace(/\x00+$/,""))};break}case"PIC":case"APIC":if(a){let I={};switch(t=t.subarray(1),this.major){case 2:I.format=mi(t.subarray(0,3),"latin1"),t=t.subarray(3);break;case 3:case 4:c=ig(t,pn),I.format=mi(t.subarray(0,c),pn),t=t.subarray(c+1);break;default:throw aVe(this.major)}I.format=n.fixPictureMimeType(I.format),I.type=sE[t[0]],t=t.subarray(1),c=ig(t,e),I.description=mi(t.subarray(0,c),e),t=t.subarray(c+g),I.data=t,s=I}break;case"CNT":case"PCNT":s=dU(t);break;case"SYLT":{let I=EU.get(t,0);t=t.subarray(EU.len);let d={descriptor:"",language:I.language,contentType:I.contentType,timeStampFormat:I.timeStampFormat,syncText:[]},B=!1;for(;t.length>0;){let f=n.readNullTerminatedString(t,I.encoding);if(t=t.subarray(f.len),B){let Q=xe.get(t,0);t=t.subarray(xe.len),d.syncText.push({text:f.text,timestamp:Q})}else d.descriptor=f.text,B=!0}s=d;break}case"ULT":case"USLT":case"COM":case"COMM":{let I=zO.get(t,r);r+=zO.len;let d=n.readNullTerminatedString(t.subarray(r),I.encoding);r+=d.len;let B=n.readNullTerminatedString(t.subarray(r),I.encoding);s={language:I.language,descriptor:d.text,text:B.text};break}case"UFID":{let I=n.readIdentifierAndData(t,pn);s={owner_identifier:I.id,identifier:I.data};break}case"PRIV":{let I=n.readIdentifierAndData(t,pn);s={owner_identifier:I.id,data:I.data};break}case"POPM":{t=t.subarray(r);let I=n.readNullTerminatedString(t,yU),d=I.text;if(t=t.subarray(I.len),t.length===0){this.warningCollector.addWarning(`id3v2.${this.major} type=${o} POPM frame missing rating byte`),s={email:d,rating:0,counter:void 0};break}let B=QA.get(t,0),f=t.subarray(QA.len);s={email:d,rating:B,counter:f.length>0?dU(f):void 0};break}case"GEOB":{let I=IE.get(t,0);t=t.subarray(1);let d=n.readNullTerminatedString(t,yU),B=d.text;t=t.subarray(d.len);let f=n.readNullTerminatedString(t,I),Q=f.text;t=t.subarray(f.len);let y=n.readNullTerminatedString(t,I),m=y.text;t=t.subarray(y.len),s={type:B,filename:Q,description:m,data:t};break}case"WCOM":case"WCOP":case"WOAF":case"WOAR":case"WOAS":case"WORS":case"WPAY":case"WPUB":s=n.readNullTerminatedString(t,yU).text;break;case"WXXX":{let I=IE.get(t,0);t=t.subarray(1);let d=n.readNullTerminatedString(t,I),B=d.text;t=t.subarray(d.len),s={description:B,url:n.trimNullPadding(mi(t,pn))};break}case"WFD":case"WFED":{let I=IE.get(t,0);t=t.subarray(1),s=n.readNullTerminatedString(t,I).text;break}case"MCDI":{s=t.subarray(0,A);break}case"CHAP":{lb("Reading CHAP"),c=ig(t,pn);let I={label:mi(t.subarray(0,c),pn),info:BU.get(t,c+1),frames:new Map};for(r+=c+1+BU.len;r=i.length)return{text:mi(t,o.encoding),len:e};let r=t.subarray(0,a+A);return{text:mi(r,o.encoding),len:a+A+n.getNullTerminatorLength(o.encoding)}}static fixPictureMimeType(t){switch(t=t.toLocaleLowerCase(),t){case"jpg":return"image/jpeg";case"png":return"image/png"}return t}static functionList(t){let o={};for(let a=0;a+11?this.warningCollector.addWarning(`ID3v2.${this.major} ${t} uses non standard null-separator.`):a=o.split(/\//g)):a=o.split(/\x00/g),n.trimArray(a)}static trimArray(t){return t.map(o=>n.trimNullPadding(o).trim())}static trimNullPadding(t){let o=t.length;for(;o>0&&t.charCodeAt(o-1)===0;)o--;return o===t.length?t:t.slice(0,o)}static readIdentifierAndData(t,o){let a=n.readNullTerminatedString(t,{encoding:o,bom:!1});return{id:a.text,data:t.subarray(a.len)}}static getNullTerminatorLength(t){return t.startsWith("utf-16")?2:1}},kI=class extends St("id3v2"){}});function oVe(n){throw new kI(`Unexpected majorVer: ${n}`)}var hn,hE=ue(()=>{DA();QU();_I();fU();hn=class n{constructor(){this.tokenizer=void 0,this.id3Header=void 0,this.metadata=void 0,this.headerType=void 0,this.options=void 0}static removeUnsyncBytes(t){let o=0,a=0;for(;o0?this.parseExtendedHeaderData(o,t.size):this.parseId3Data(this.id3Header.size-t.size)}async parseExtendedHeaderData(t,o){return await this.tokenizer.ignore(t),this.parseId3Data(this.id3Header.size-o)}async parseId3Data(t){let o=await this.tokenizer.readToken(new Mt(t));for(let a of this.parseMetadata(o))switch(a.id){case"TXXX":a.value&&await this.handleTag(a,a.value.text,()=>a.value.description);break;default:await(Array.isArray(a.value)?Promise.all(a.value.map(e=>this.addTag(a.id,e))):this.addTag(a.id,a.value))}}async handleTag(t,o,a,e=i=>i){await Promise.all(o.map(i=>this.addTag(n.makeDescriptionTagName(t.id,a(i)),e(i))))}async addTag(t,o){await this.metadata.addTag(this.headerType,t,o)}parseMetadata(t){let o=0,a=[];for(;o!==t.length;){let e=kf(this.id3Header.version.major);if(o+e>t.length){this.metadata.addWarning("Illegal ID3v2 tag length");break}let i=t.subarray(o,o+e);o+=e;let A=vf(i,this.id3Header.version.major,this.metadata),r=t.subarray(o,o+A.length);o+=A.length;let s=n.readFrameData(r,A,this.id3Header.version.major,!this.options.skipCovers,this.metadata);s&&a.push({id:A.id,value:s})}return a}static mapId3v2Chapters(t){if(!t)return;let o=t.filter(g=>g.id==="CHAP");if(!o?.length)return;let e=t.filter(g=>g.id==="CTOC")?.find(g=>g.value.flags?.topLevel),i=new Map;for(let g of o)i.set(g.value.label,g.value);let A=e?.value.childElementIds,r=[],s=A??[...i.keys()];for(let g of s){let c=i.get(g);if(!c)continue;let I=c.frames,d=I.get("TIT2");d&&r.push({id:g,title:d,url:I.get("WXXX"),start:c.info.startTime/1e3,end:c.info.endTime/1e3,image:I.get("APIC")})}return A||r.sort((g,c)=>g.start-c.start),r.length?r:void 0}}});var Rae,mU,ag,Pf=ue(()=>{sn();Rae=ze(lt(),1);_I();hE();Rf();to();mU=(0,Rae.default)("music-metadata:parser:ID3"),ag=class extends Lt{constructor(){super(...arguments),this.id3parser=new hn}static async startsWithID3v2Header(t){return(await t.peekToken(_f)).fileIdentifier==="ID3"}async parse(){try{await this.parseID3v2()}catch(t){if(t instanceof kA)mU("End-of-stream");else throw t}}finalize(){}async parseID3v2(){await this.tryReadId3v2Headers(),mU("End of ID3v2 header, go to MPEG-parser: pos=%s",this.tokenizer.position),await this.postId3v2Parse(),this.options.skipPostHeaders&&this.metadata.hasAny()?this.finalize():(await new Ib(this.metadata,this.tokenizer,this.options).parse(),this.finalize())}async tryReadId3v2Headers(){if((await this.tokenizer.peekToken(_f)).fileIdentifier==="ID3")return mU("Found ID3v2 header, pos=%s",this.tokenizer.position),await this.id3parser.parse(this.metadata,this.tokenizer,this.options),this.tryReadId3v2Headers()}}});var SU,kae=ue(()=>{sr();SU={len:2,get:(n,t)=>{let o=XA(n,t,0,3),a=XA(n,t,6,1),e=XA(n,t,7,9)/10;if(o>0)return{type:XA(n,t,0,3),origin:XA(n,t,3,3),adjustment:a?-e:e}}}});var vae,Pae=ue(()=>{DA();sr();kae();vae={len:27,get:(n,t)=>{let o=xe.get(n,t+2);return{revision:XA(n,t,0,4),vbr_method:XA(n,t,4,4),lowpass_filter:100*QA.get(n,t+1),track_peak:o===0?null:o/2**23,track_gain:SU.get(n,6),album_gain:SU.get(n,8),music_length:xe.get(n,t+20),music_crc:QA.get(n,t+24),header_crc:LA.get(n,t+24)}}}});async function Gae(n){let t=await n.readToken(nVe),o={numFrames:null,streamSize:null,vbrScale:null};if(t.frames&&(o.numFrames=await n.readToken(xe)),t.bytes&&(o.streamSize=await n.readToken(xe)),t.toc&&(o.toc=new Uint8Array(100),await n.readBuffer(o.toc)),t.vbrScale&&(o.vbrScale=await n.readToken(xe)),await n.peekToken(new We(4,"ascii"))==="LAME"){await n.ignore(4),o.lame={version:await n.readToken(new We(5,"ascii"))};let e=o.lame.version.match(/\d+.\d+/g);if(e!==null){let A=e[0].split(".").map(r=>Number.parseInt(r,10));A[0]>=3&&A[1]>=90&&(o.lame.extended=await n.readToken(vae))}}return o}var wU,pb,nVe,Fae=ue(()=>{DA();sr();Pae();wU=new We(4,"ascii"),pb=new We(6,"ascii"),nVe={len:4,get:(n,t)=>({frames:Hi(n,t,31),bytes:Hi(n,t,30),toc:Hi(n,t,29),vbrScale:Hi(n,t,28)})}});var xae={};Ur(xae,{MpegContentError:()=>hd,MpegParser:()=>DU});function gVe(n){return`V${Math.floor((100-n)/10)}`}var Kae,wo,hd,Lae,Uae,sVe,Do,Hae,DU,Yae=ue(()=>{DA();sn();Kae=ze(lt(),1);sr();Pf();Fae();nr();wo=(0,Kae.default)("music-metadata:parser:mpeg"),hd=class extends St("MPEG"){},Lae=1024,Uae={AudioObjectTypes:["AAC Main","AAC LC","AAC SSR","AAC LTP"],SamplingFrequencies:[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,null,null,null]},sVe=[void 0,["front-center"],["front-left","front-right"],["front-center","front-left","front-right"],["front-center","front-left","front-right","back-center"],["front-center","front-left","front-right","back-left","back-right"],["front-center","front-left","front-right","back-left","back-right","LFE-channel"],["front-center","front-left","front-right","side-left","side-right","back-left","back-right","LFE-channel"]],Do=class n{constructor(t,o){this.bitrateIndex=null,this.sampRateFreqIndex=null,this.padding=null,this.privateBit=null,this.channelModeIndex=null,this.modeExtension=null,this.isOriginalMedia=null,this.version=null,this.bitrate=null,this.samplingRate=null,this.frameLength=0,this.versionIndex=XA(t,o+1,3,2),this.layer=n.LayerDescription[XA(t,o+1,5,2)],this.versionIndex>1&&this.layer===0?this.parseAdtsHeader(t,o):this.parseMpegHeader(t,o),this.isProtectedByCRC=!Hi(t,o+1,7)}calcDuration(t){return this.samplingRate==null?null:t*this.calcSamplesPerFrame()/this.samplingRate}calcSamplesPerFrame(){return n.samplesInFrameTable[this.version===1?0:1][this.layer]}calculateSideInfoLength(){if(this.layer!==3)return 2;if(this.channelModeIndex===3){if(this.version===1)return 17;if(this.version===2||this.version===2.5)return 9}else{if(this.version===1)return 32;if(this.version===2||this.version===2.5)return 17}return null}calcSlotSize(){return[null,4,1,1][this.layer]}parseMpegHeader(t,o){this.container="MPEG",this.bitrateIndex=XA(t,o+2,0,4),this.sampRateFreqIndex=XA(t,o+2,4,2),this.padding=Hi(t,o+2,6),this.privateBit=Hi(t,o+2,7),this.channelModeIndex=XA(t,o+3,0,2),this.modeExtension=XA(t,o+3,2,2),this.isCopyrighted=Hi(t,o+3,4),this.isOriginalMedia=Hi(t,o+3,5),this.emphasis=XA(t,o+3,7,2),this.version=n.VersionID[this.versionIndex],this.channelMode=n.ChannelMode[this.channelModeIndex],this.codec=`MPEG ${this.version} Layer ${this.layer}`;let a=this.calcBitrate();if(!a)throw new hd("Cannot determine bit-rate");if(this.bitrate=a*1e3,this.samplingRate=this.calcSamplingRate(),this.samplingRate==null)throw new hd("Cannot determine sampling-rate")}parseAdtsHeader(t,o){wo("layer=0 => ADTS"),this.version=this.versionIndex===2?4:2,this.container=`ADTS/MPEG-${this.version}`;let a=XA(t,o+2,0,2);this.codec="AAC",this.codecProfile=Uae.AudioObjectTypes[a],wo(`MPEG-4 audio-codec=${this.codec}`);let e=XA(t,o+2,2,4);this.samplingRate=Uae.SamplingFrequencies[e],wo(`sampling-rate=${this.samplingRate}`);let i=XA(t,o+2,7,3);this.mp4ChannelConfig=sVe[i],wo(`channel-config=${this.mp4ChannelConfig?this.mp4ChannelConfig.join("+"):"?"}`),this.frameLength=XA(t,o+3,6,2)<<11}calcBitrate(){if(this.bitrateIndex===0||this.bitrateIndex===15)return null;if(this.version&&this.bitrateIndex){let t=10*Math.floor(this.version)+this.layer;return n.bitrate_index[this.bitrateIndex][t]}return null}calcSamplingRate(){return this.sampRateFreqIndex===3||this.version===null||this.sampRateFreqIndex==null?null:n.sampling_rate_freq_index[this.version][this.sampRateFreqIndex]}};Do.SyncByte1=255;Do.SyncByte2=224;Do.VersionID=[2.5,null,2,1];Do.LayerDescription=[0,3,2,1];Do.ChannelMode=["stereo","joint_stereo","dual_channel","mono"];Do.bitrate_index={1:{11:32,12:32,13:32,21:32,22:8,23:8},2:{11:64,12:48,13:40,21:48,22:16,23:16},3:{11:96,12:56,13:48,21:56,22:24,23:24},4:{11:128,12:64,13:56,21:64,22:32,23:32},5:{11:160,12:80,13:64,21:80,22:40,23:40},6:{11:192,12:96,13:80,21:96,22:48,23:48},7:{11:224,12:112,13:96,21:112,22:56,23:56},8:{11:256,12:128,13:112,21:128,22:64,23:64},9:{11:288,12:160,13:128,21:144,22:80,23:80},10:{11:320,12:192,13:160,21:160,22:96,23:96},11:{11:352,12:224,13:192,21:176,22:112,23:112},12:{11:384,12:256,13:224,21:192,22:128,23:128},13:{11:416,12:320,13:256,21:224,22:144,23:144},14:{11:448,12:384,13:320,21:256,22:160,23:160}};Do.sampling_rate_freq_index={1:{0:44100,1:48e3,2:32e3},2:{0:22050,1:24e3,2:16e3},2.5:{0:11025,1:12e3,2:8e3}};Do.samplesInFrameTable=[[0,384,1152,1152],[0,384,1152,576]];Hae={len:4,get:(n,t)=>new Do(n,t)};DU=class extends ag{constructor(){super(...arguments),this.frameCount=0,this.syncFrameCount=-1,this.totalDataLength=0,this.bitrates=[],this.offset=0,this.frame_size=0,this.calculateEofDuration=!1,this.samplesPerFrame=null,this.buf_frame_header=new Uint8Array(4),this.mpegOffset=null,this.syncPeek={buf:new Uint8Array(Lae),len:0}}async postId3v2Parse(){this.metadata.setFormat("lossless",!1),this.metadata.setAudioOnly();try{let t=!1;for(;!t;)await this.sync(),t=await this.parseCommonMpegHeader()}catch(t){if(t instanceof kA){if(wo("End-of-stream"),this.calculateEofDuration&&this.samplesPerFrame!==null){let o=this.frameCount*this.samplesPerFrame;if(this.metadata.setFormat("numberOfSamples",o),this.metadata.format.sampleRate){let a=o/this.metadata.format.sampleRate;wo(`Calculate duration at EOF: ${a} sec.`,a),this.metadata.setFormat("duration",a)}}}else throw t}}finalize(){let t=this.metadata.format,o=!!this.metadata.native.ID3v1;if(this.mpegOffset!==null){if(t.duration&&this.tokenizer.fileInfo.size){let a=this.tokenizer.fileInfo.size-this.mpegOffset-(o?128:0);t.codecProfile&&t.codecProfile[0]==="V"&&this.metadata.setFormat("bitrate",a*8/t.duration)}if(this.tokenizer.fileInfo.size&&t.codecProfile==="CBR"){let a=this.tokenizer.fileInfo.size-this.mpegOffset-(o?128:0);if(this.frame_size!==null&&this.samplesPerFrame!==null){let e=Math.round(a/this.frame_size)*this.samplesPerFrame;if(this.metadata.setFormat("numberOfSamples",e),t.sampleRate&&!t.duration){let i=e/t.sampleRate;wo("Calculate CBR duration based on file size: %s",i),this.metadata.setFormat("duration",i)}}}}}async sync(){let t=!1;for(;;){let o=0;if(this.syncPeek.len=await this.tokenizer.peekBuffer(this.syncPeek.buf,{length:Lae,mayBeLess:!0}),this.syncPeek.len<=163)throw new kA;for(;;){if(t&&(this.syncPeek.buf[o]&224)===224){this.buf_frame_header[0]=Do.SyncByte1,this.buf_frame_header[1]=this.syncPeek.buf[o],await this.tokenizer.ignore(o),wo(`Sync at offset=${this.tokenizer.position-1}, frameCount=${this.frameCount}`),this.syncFrameCount===this.frameCount&&(wo(`Re-synced MPEG stream, frameCount=${this.frameCount}`),this.frameCount=0,this.frame_size=0),this.syncFrameCount=this.frameCount;return}if(t=!1,o=this.syncPeek.buf.indexOf(Do.SyncByte1,o),o===-1){if(this.syncPeek.len=2&&t.layer===0?this.parseAdts(t):this.parseAudioFrameHeader(t)}async parseAudioFrameHeader(t){this.metadata.setFormat("numberOfChannels",t.channelMode==="mono"?1:2),this.metadata.setFormat("bitrate",t.bitrate),this.frameCount<20*1e4&&wo("offset=%s MP%s bitrate=%s sample-rate=%s",this.tokenizer.position-4,t.layer,t.bitrate,t.samplingRate);let o=t.calcSlotSize();if(o===null)throw new hd("invalid slot_size");let a=t.calcSamplesPerFrame();wo(`samples_per_frame=${a}`);let e=a/8;if(t.bitrate!==null&&t.samplingRate!=null){let i=e*t.bitrate/t.samplingRate+(t.padding?o:0);this.frame_size=Math.floor(i)}if(this.audioFrameHeader=t,t.bitrate!==null&&this.bitrates.push(t.bitrate),this.frameCount===1)return this.offset=Hae.len,await this.skipSideInformation(),!1;if(this.frameCount===4){if(this.areAllSame(this.bitrates)){if(this.samplesPerFrame=a,this.metadata.setFormat("codecProfile","CBR"),this.tokenizer.fileInfo.size)return!0}else if(this.metadata.format.duration)return!0;if(!this.options.duration)return!0}return this.options.duration&&this.frameCount===4&&(this.samplesPerFrame=a,this.calculateEofDuration=!0),this.offset=4,t.isProtectedByCRC?(await this.parseCrc(),!1):(await this.skipSideInformation(),!1)}async parseAdts(t){let o=new Uint8Array(3);if(await this.tokenizer.readBuffer(o),t.frameLength+=XA(o,0,0,11),this.totalDataLength+=t.frameLength,this.samplesPerFrame=1024,t.samplingRate!==null){let a=t.samplingRate/this.samplesPerFrame,i=8*(this.frameCount===0?0:this.totalDataLength/this.frameCount)*a+.5;this.metadata.setFormat("bitrate",i),wo(`frame-count=${this.frameCount}, size=${t.frameLength} bytes, bit-rate=${i}`)}if(await this.tokenizer.ignore(t.frameLength>7?t.frameLength-7:1),this.frameCount===3)if(this.metadata.setFormat("codecProfile",t.codecProfile),t.mp4ChannelConfig&&this.metadata.setFormat("numberOfChannels",t.mp4ChannelConfig.length),this.options.duration)this.calculateEofDuration=!0;else return!0;return!1}async parseCrc(){return await this.tokenizer.ignore(gn.len),this.offset+=gn.len,this.skipSideInformation()}async skipSideInformation(){if(this.audioFrameHeader){let t=this.audioFrameHeader.calculateSideInfoLength();if(t!==null){await this.tokenizer.readToken(new Mt(t)),this.offset+=t,await this.readXtraInfoHeader();return}}}async readXtraInfoHeader(){let t=await this.tokenizer.readToken(wU);switch(this.offset+=wU.len,t){case"Info":return this.metadata.setFormat("codecProfile","CBR"),this.readXingInfoHeader();case"Xing":{let a=await this.readXingInfoHeader();if(a.vbrScale!==null){let e=gVe(a.vbrScale);this.metadata.setFormat("codecProfile",e)}return null}case"Xtra":break;case"LAME":{let a=await this.tokenizer.readToken(pb);if(this.frame_size!==null&&this.frame_size>=this.offset+pb.len)return this.offset+=pb.len,this.metadata.setFormat("tool",`LAME ${a}`),await this.skipFrameData(this.frame_size-this.offset),null;this.metadata.addWarning("Corrupt LAME header");break}}let o=this.frame_size-this.offset;return o<0?this.metadata.addWarning(`Frame ${this.frameCount}corrupt: negative frameDataLeft`):await this.skipFrameData(o),null}async readXingInfoHeader(){let t=this.tokenizer.position,o=await Gae(this.tokenizer);if(this.offset+=this.tokenizer.position-t,o.lame&&(this.metadata.setFormat("tool",`LAME ${ln(o.lame.version)}`),o.lame.extended&&(this.metadata.setFormat("trackPeakLevel",o.lame.extended.track_peak),o.lame.extended.track_gain&&this.metadata.setFormat("trackGain",o.lame.extended.track_gain.adjustment),o.lame.extended.album_gain&&this.metadata.setFormat("albumGain",o.lame.extended.album_gain.adjustment),this.metadata.setFormat("duration",o.lame.extended.music_length/1e3))),o.streamSize&&this.audioFrameHeader&&o.numFrames!==null){let e=this.audioFrameHeader.calcDuration(o.numFrames);return this.metadata.setFormat("duration",e),wo("Get duration from Xing header: %s",this.metadata.format.duration),o}let a=this.frame_size-this.offset;return await this.skipFrameData(a),o}async skipFrameData(t){if(t<0)throw new hd("frame-data-left cannot be negative");await this.tokenizer.ignore(t)}areAllSame(t){let o=t[0];return t.every(a=>a===o)}}});var jae,Jae=ue(()=>{jae={parserType:"mpeg",extensions:[".mp2",".mp3",".m2a",".aac","aacp"],mimeTypes:["audio/mpeg","audio/mp3","audio/aacs","audio/aacp"],async load(){return(await Promise.resolve().then(()=>(Yae(),xae))).MpegParser}}});var qae,zae=ue(()=>{qae={parserType:"apev2",extensions:[".ape"],mimeTypes:["audio/ape","audio/monkeys-audio"],async load(){return(await Promise.resolve().then(()=>(pd(),Dae))).APEv2Parser}}});function OU(n){let t=n.trim();if(t.length!==36||t[8]!=="-"||t[13]!=="-"||t[18]!=="-"||t[23]!=="-")throw new Error(`Invalid GUID format: ${n}`);let o,a=new Uint8Array(16);o=parseInt(t.slice(0,8),16),a[0]=o&255,a[1]=o>>>8&255,a[2]=o>>>16&255,a[3]=o>>>24&255,o=parseInt(t.slice(9,13),16),a[4]=o&255,a[5]=o>>>8&255,o=parseInt(t.slice(14,18),16),a[6]=o&255,a[7]=o>>>8&255,o=parseInt(t.slice(19,23),16),a[8]=o>>>8&255,a[9]=o&255,o=parseInt(t.slice(24,32),16),a[10]=o>>>24&255,a[11]=o>>>16&255,a[12]=o>>>8&255,a[13]=o&255,o=parseInt(t.slice(32,36),16),a[14]=o>>>8&255,a[15]=o&255;for(let e=0;e<16;e++)if(!Number.isFinite(a[e]))throw new Error(`Invalid GUID format: ${n}`);if(!/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(t))throw new Error(`Invalid GUID format: ${n}`);return a}var hb,Vae=ue(()=>{hb=class n{constructor(t){if(t.length!==16)throw new Error("GUID must be exactly 16 bytes");this.bytes=t}static fromString(t){return new n(OU(t))}toString(){let t=this.bytes,o=s=>s.toString(16).padStart(2,"0"),a=o(t[3])+o(t[2])+o(t[1])+o(t[0]),e=o(t[5])+o(t[4]),i=o(t[7])+o(t[6]),A=o(t[8])+o(t[9]),r=o(t[10])+o(t[11])+o(t[12])+o(t[13])+o(t[14])+o(t[15]);return`${a}-${e}-${i}-${A}-${r}`.toUpperCase()}equals(t,o=0){if(o<0||t.length-o<16)return!1;let a=this.bytes;for(let e=0;e<16;e++)if(t[o+e]!==a[e])return!1;return!0}}});var Ye,gr,bU=ue(()=>{Vae();Ye=class n{static fromBin(t,o=0){return new n(n.decode(t,o))}static decode(t,o=0){return new hb(t.subarray(o,o+16)).toString()}static decodeMediaType(t){switch(t.str){case n.AudioMedia.str:return"audio";case n.VideoMedia.str:return"video";case n.CommandMedia.str:return"command";case n.Degradable_JPEG_Media.str:return"degradable-jpeg";case n.FileTransferMedia.str:return"file-transfer";case n.BinaryMedia.str:return"binary"}}static encode(t){return OU(t)}constructor(t){this.str=t}equals(t){return this.str===t.str}toBin(){return n.encode(this.str)}};Ye.HeaderObject=new Ye("75B22630-668E-11CF-A6D9-00AA0062CE6C");Ye.DataObject=new Ye("75B22636-668E-11CF-A6D9-00AA0062CE6C");Ye.SimpleIndexObject=new Ye("33000890-E5B1-11CF-89F4-00A0C90349CB");Ye.IndexObject=new Ye("D6E229D3-35DA-11D1-9034-00A0C90349BE");Ye.MediaObjectIndexObject=new Ye("FEB103F8-12AD-4C64-840F-2A1D2F7AD48C");Ye.TimecodeIndexObject=new Ye("3CB73FD0-0C4A-4803-953D-EDF7B6228F0C");Ye.FilePropertiesObject=new Ye("8CABDCA1-A947-11CF-8EE4-00C00C205365");Ye.StreamPropertiesObject=new Ye("B7DC0791-A9B7-11CF-8EE6-00C00C205365");Ye.HeaderExtensionObject=new Ye("5FBF03B5-A92E-11CF-8EE3-00C00C205365");Ye.CodecListObject=new Ye("86D15240-311D-11D0-A3A4-00A0C90348F6");Ye.ScriptCommandObject=new Ye("1EFB1A30-0B62-11D0-A39B-00A0C90348F6");Ye.MarkerObject=new Ye("F487CD01-A951-11CF-8EE6-00C00C205365");Ye.BitrateMutualExclusionObject=new Ye("D6E229DC-35DA-11D1-9034-00A0C90349BE");Ye.ErrorCorrectionObject=new Ye("75B22635-668E-11CF-A6D9-00AA0062CE6C");Ye.ContentDescriptionObject=new Ye("75B22633-668E-11CF-A6D9-00AA0062CE6C");Ye.ExtendedContentDescriptionObject=new Ye("D2D0A440-E307-11D2-97F0-00A0C95EA850");Ye.ContentBrandingObject=new Ye("2211B3FA-BD23-11D2-B4B7-00A0C955FC6E");Ye.StreamBitratePropertiesObject=new Ye("7BF875CE-468D-11D1-8D82-006097C9A2B2");Ye.ContentEncryptionObject=new Ye("2211B3FB-BD23-11D2-B4B7-00A0C955FC6E");Ye.ExtendedContentEncryptionObject=new Ye("298AE614-2622-4C17-B935-DAE07EE9289C");Ye.DigitalSignatureObject=new Ye("2211B3FC-BD23-11D2-B4B7-00A0C955FC6E");Ye.PaddingObject=new Ye("1806D474-CADF-4509-A4BA-9AABCB96AAE8");Ye.ExtendedStreamPropertiesObject=new Ye("14E6A5CB-C672-4332-8399-A96952065B5A");Ye.AdvancedMutualExclusionObject=new Ye("A08649CF-4775-4670-8A16-6E35357566CD");Ye.GroupMutualExclusionObject=new Ye("D1465A40-5A79-4338-B71B-E36B8FD6C249");Ye.StreamPrioritizationObject=new Ye("D4FED15B-88D3-454F-81F0-ED5C45999E24");Ye.BandwidthSharingObject=new Ye("A69609E6-517B-11D2-B6AF-00C04FD908E9");Ye.LanguageListObject=new Ye("7C4346A9-EFE0-4BFC-B229-393EDE415C85");Ye.MetadataObject=new Ye("C5F8CBEA-5BAF-4877-8467-AA8C44FA4CCA");Ye.MetadataLibraryObject=new Ye("44231C94-9498-49D1-A141-1D134E457054");Ye.IndexParametersObject=new Ye("D6E229DF-35DA-11D1-9034-00A0C90349BE");Ye.MediaObjectIndexParametersObject=new Ye("6B203BAD-3F11-48E4-ACA8-D7613DE2CFA7");Ye.TimecodeIndexParametersObject=new Ye("F55E496D-9797-4B5D-8C8B-604DFE9BFB24");Ye.CompatibilityObject=new Ye("26F18B5D-4584-47EC-9F5F-0E651F0452C9");Ye.AdvancedContentEncryptionObject=new Ye("43058533-6981-49E6-9B74-AD12CB86D58C");Ye.AudioMedia=new Ye("F8699E40-5B4D-11CF-A8FD-00805F5C442B");Ye.VideoMedia=new Ye("BC19EFC0-5B4D-11CF-A8FD-00805F5C442B");Ye.CommandMedia=new Ye("59DACFC0-59E6-11D0-A3AC-00A0C90348F6");Ye.JFIF_Media=new Ye("B61BE100-5B4E-11CF-A8FD-00805F5C442B");Ye.Degradable_JPEG_Media=new Ye("35907DE0-E415-11CF-A917-00805F5C442B");Ye.FileTransferMedia=new Ye("91BD222C-F21C-497A-8B6D-5AA86BFC0185");Ye.BinaryMedia=new Ye("3AFB65E2-47EF-40F2-AC2C-70A90D71D343");Ye.ASF_Index_Placeholder_Object=new Ye("D9AADE20-7C17-4F9C-BC28-8555DD98E2A2");gr=Ye});function Zae(n){return cVe[n]}function Gf(n){return ln(mi(n,"utf-16le"))}function Wae(n){return new Uint8Array(n)}function IVe(n,t=0){return Xae(n,t)===1}function lVe(n,t=0){return Le.get(n,t)}function dVe(n,t=0){return Lr.get(n,t)}function Xae(n,t=0){return SA.get(n,t)}var cVe,$ae=ue(()=>{DA();sr();cVe=[Gf,Wae,IVe,lVe,dVe,Xae,Wae]});async function eoe(n){let t=await n.readNumber(SA);return(await n.readToken(new We(t*2,"utf-16le"))).replace("\0","")}async function toe(n){let t=await n.readToken(pVe),o=[];for(let a=0;a{DA();sr();bU();$ae();_I();nr();EE=class extends St("ASF"){},Aoe={len:30,get:(n,t)=>({objectId:gr.fromBin(n,t),objectSize:Number(Lr.get(n,t+16)),numberOfHeaderObjects:Le.get(n,t+24)})},vI={len:24,get:(n,t)=>({objectId:gr.fromBin(n,t),objectSize:Number(Lr.get(n,t+16))})},cc=class{constructor(t){this.len=Number(t.objectSize)-vI.len}postProcessTag(t,o,a,e){if(o==="WM/Picture")t.push({id:o,value:MU.fromBuffer(e)});else{let i=Zae(a);if(!i)throw new EE(`unexpected value headerType: ${a}`);t.push({id:o,value:i(e)})}}},Ff=class extends cc{get(t,o){return null}},uE=class extends cc{get(t,o){return{fileId:gr.fromBin(t,o),fileSize:Lr.get(t,o+16),creationDate:Lr.get(t,o+24),dataPacketsCount:Lr.get(t,o+32),playDuration:Lr.get(t,o+40),sendDuration:Lr.get(t,o+48),preroll:Lr.get(t,o+56),flags:{broadcast:GA(t,o+64,24),seekable:GA(t,o+64,25)},minimumDataPacketSize:Le.get(t,o+68),maximumDataPacketSize:Le.get(t,o+72),maximumBitrate:Le.get(t,o+76)}}};uE.guid=gr.FilePropertiesObject;CE=class extends cc{get(t,o){return{streamType:gr.decodeMediaType(gr.fromBin(t,o)),errorCorrectionType:gr.fromBin(t,o+8)}}};CE.guid=gr.StreamPropertiesObject;BE=class{constructor(){this.len=22}get(t,o){let a=new DataView(t.buffer,o);return{reserved1:gr.fromBin(t,o),reserved2:a.getUint16(16,!0),extensionDataSize:a.getUint16(18,!0)}}};BE.guid=gr.HeaderExtensionObject;pVe={len:20,get:(n,t)=>({entryCount:new DataView(n.buffer,t).getUint16(16,!0)})};Ed=class n extends cc{get(t,o){let a=[],e=new DataView(t.buffer,o),i=10;for(let A=0;A0){let s=n.contentDescTags[A],g=i+r;a.push({id:s,value:Gf(t.subarray(o+i,o+g))}),i=g}}return a}};Ed.guid=gr.ContentDescriptionObject;Ed.contentDescTags=["Title","Author","Copyright","Description","Rating"];fE=class extends cc{get(t,o){let a=[],e=new DataView(t.buffer,o),i=e.getUint16(0,!0),A=2;for(let r=0;rNU});var roe,TU,CVe,NU,aoe=ue(()=>{roe=ze(lt(),1);Id();bU();_U();to();_U();TU=(0,roe.default)("music-metadata:parser:ASF"),CVe="asf",NU=class extends Lt{async parse(){let t=await this.tokenizer.readToken(Aoe);if(!t.objectId.equals(gr.HeaderObject))throw new EE(`expected asf header; but was not found; got: ${t.objectId.str}`);await this.parseObjectHeader(t.numberOfHeaderObjects)}async parseObjectHeader(t){let o;do{let a=await this.tokenizer.readToken(vI);switch(TU("header GUID=%s",a.objectId.str),a.objectId.str){case uE.guid.str:{let e=await this.tokenizer.readToken(new uE(a));this.metadata.setFormat("duration",Number(e.playDuration/BigInt(1e3))/1e4-Number(e.preroll)/1e3),this.metadata.setFormat("bitrate",e.maximumBitrate);break}case CE.guid.str:{let e=await this.tokenizer.readToken(new CE(a));this.metadata.setFormat("container",`ASF/${e.streamType}`);break}case BE.guid.str:{let e=await this.tokenizer.readToken(new BE);await this.parseExtensionObject(e.extensionDataSize);break}case Ed.guid.str:o=await this.tokenizer.readToken(new Ed(a)),await this.addTags(o);break;case fE.guid.str:o=await this.tokenizer.readToken(new fE(a)),await this.addTags(o);break;case gr.CodecListObject.str:{let e=await toe(this.tokenizer);e.forEach(A=>{this.metadata.addStreamInfo({type:A.type.videoCodec?yi.video:yi.audio,codecName:A.codecName})});let i=e.filter(A=>A.type.audioCodec).map(A=>A.codecName).join("/");this.metadata.setFormat("codec",i);break}case gr.StreamBitratePropertiesObject.str:await this.tokenizer.ignore(a.objectSize-vI.len);break;case gr.PaddingObject.str:TU("Padding: %s bytes",a.objectSize-vI.len),await this.tokenizer.ignore(a.objectSize-vI.len);break;default:this.metadata.addWarning(`Ignore ASF-Object-GUID: ${a.objectId.str}`),TU("Ignore ASF-Object-GUID: %s",a.objectId.str),await this.tokenizer.readToken(new Ff(a))}}while(--t)}async addTags(t){await Promise.all(t.map(({id:o,value:a})=>this.metadata.addTag(CVe,o,a)))}async parseExtensionObject(t){do{let o=await this.tokenizer.readToken(vI),a=o.objectSize-vI.len;if(a<0)throw new EE(`Invalid ASF header object size: ${o.objectSize}`);switch(o.objectId.str){case QE.guid.str:await this.tokenizer.readToken(new QE(o));break;case ud.guid.str:{let e=await this.tokenizer.readToken(new ud(o));await this.addTags(e);break}case yE.guid.str:{let e=await this.tokenizer.readToken(new yE(o));await this.addTags(e);break}case gr.PaddingObject.str:await this.tokenizer.ignore(a);break;case gr.CompatibilityObject.str:await this.tokenizer.ignore(a);break;case gr.ASF_Index_Placeholder_Object.str:await this.tokenizer.ignore(a);break;default:this.metadata.addWarning(`Ignore ASF-Object-GUID: ${o.objectId.str}`),await this.tokenizer.readToken(new Ff(o));break}t-=o.objectSize}while(t>0)}}});var ooe,noe=ue(()=>{ooe={parserType:"asf",extensions:[".asf",".wma",".wmv"],mimeTypes:["audio/ms-wma","video/ms-wmv","audio/ms-asf","video/ms-asf","application/vnd.ms-asf"],async load(){return(await Promise.resolve().then(()=>(aoe(),ioe))).AsfParser}}});var Cd,soe=ue(()=>{DA();Da();Cd={len:12,get:(n,t)=>({chunkID:at.get(n,t),chunkSize:X2.get(n,t+4)})}});var coe={};Ur(coe,{DsdiffContentParseError:()=>mE,DsdiffParser:()=>RU});var goe,Oa,mE,RU,Ioe=ue(()=>{DA();goe=ze(lt(),1);sn();Da();to();hE();soe();nr();Oa=(0,goe.default)("music-metadata:parser:aiff"),mE=class extends St("DSDIFF"){},RU=class extends Lt{async parse(){let t=await this.tokenizer.readToken(Cd);if(t.chunkID!=="FRM8")throw new mE("Unexpected chunk-ID");this.metadata.setAudioOnly();let o=(await this.tokenizer.readToken(at)).trim();switch(o){case"DSD":return this.metadata.setFormat("container",`DSDIFF/${o}`),this.metadata.setFormat("lossless",!0),this.readFmt8Chunks(t.chunkSize-BigInt(at.len));default:throw new mE(`Unsupported DSDIFF type: ${o}`)}}async readFmt8Chunks(t){for(;t>=Cd.len;){let o=await this.tokenizer.readToken(Cd);Oa(`Chunk id=${o.chunkID}`),await this.readData(o),t-=BigInt(Cd.len)+o.chunkSize}}async readData(t){Oa(`Reading data of chunk[ID=${t.chunkID}, size=${t.chunkSize}]`);let o=this.tokenizer.position;switch(t.chunkID.trim()){case"FVER":{let e=await this.tokenizer.readToken(Le);Oa(`DSDIFF version=${e}`);break}case"PROP":{if(await this.tokenizer.readToken(at)!=="SND ")throw new mE("Unexpected PROP-chunk ID");await this.handleSoundPropertyChunks(t.chunkSize-BigInt(at.len));break}case"ID3":{let e=await this.tokenizer.readToken(new Mt(Number(t.chunkSize))),i=So(e);await new hn().parse(this.metadata,i,this.options);break}case"DSD":this.metadata.format.numberOfChannels&&this.metadata.setFormat("numberOfSamples",Number(t.chunkSize*BigInt(8)/BigInt(this.metadata.format.numberOfChannels))),this.metadata.format.numberOfSamples&&this.metadata.format.sampleRate&&this.metadata.setFormat("duration",this.metadata.format.numberOfSamples/this.metadata.format.sampleRate);break;default:Oa(`Ignore chunk[ID=${t.chunkID}, size=${t.chunkSize}]`);break}let a=t.chunkSize-BigInt(this.tokenizer.position-o);a>0&&(Oa(`After Parsing chunk, remaining ${a} bytes`),await this.tokenizer.ignore(Number(a)))}async handleSoundPropertyChunks(t){for(Oa(`Parsing sound-property-chunks, remainingSize=${t}`);t>0;){let o=await this.tokenizer.readToken(Cd);Oa(`Sound-property-chunk[ID=${o.chunkID}, size=${o.chunkSize}]`);let a=this.tokenizer.position;switch(o.chunkID.trim()){case"FS":{let i=await this.tokenizer.readToken(xe);this.metadata.setFormat("sampleRate",i);break}case"CHNL":{let i=await this.tokenizer.readToken(LA);this.metadata.setFormat("numberOfChannels",i),await this.handleChannelChunks(o.chunkSize-BigInt(LA.len));break}case"CMPR":{let i=(await this.tokenizer.readToken(at)).trim(),A=await this.tokenizer.readToken(QA),r=await this.tokenizer.readToken(new We(A,"ascii"));i==="DSD"&&(this.metadata.setFormat("lossless",!0),this.metadata.setFormat("bitsPerSample",1)),this.metadata.setFormat("codec",`${i} (${r})`);break}case"ABSS":{let i=await this.tokenizer.readToken(LA),A=await this.tokenizer.readToken(QA),r=await this.tokenizer.readToken(QA),s=await this.tokenizer.readToken(xe);Oa(`ABSS ${i}:${A}:${r}.${s}`);break}case"LSCO":{let i=await this.tokenizer.readToken(LA);Oa(`LSCO lsConfig=${i}`);break}default:Oa(`Unknown sound-property-chunk[ID=${o.chunkID}, size=${o.chunkSize}]`),await this.tokenizer.ignore(Number(o.chunkSize))}let e=o.chunkSize-BigInt(this.tokenizer.position-a);e>0&&(Oa(`After Parsing sound-property-chunk ${o.chunkSize}, remaining ${e} bytes`),await this.tokenizer.ignore(Number(e))),t-=BigInt(Cd.len)+o.chunkSize,Oa(`Parsing sound-property-chunks, remainingSize=${t}`)}if(this.metadata.format.lossless&&this.metadata.format.sampleRate&&this.metadata.format.numberOfChannels&&this.metadata.format.bitsPerSample){let o=this.metadata.format.sampleRate*this.metadata.format.numberOfChannels*this.metadata.format.bitsPerSample;this.metadata.setFormat("bitrate",o)}}async handleChannelChunks(t){Oa(`Parsing channel-chunks, remainingSize=${t}`);let o=[];for(;t>=at.len;){let a=await this.tokenizer.readToken(at);Oa(`Channel[ID=${a}]`),o.push(a),t-=BigInt(at.len)}return Oa(`Channels: ${o.join(", ")}`),o}}});var loe,doe=ue(()=>{loe={parserType:"dsdiff",extensions:[".dff"],mimeTypes:["audio/dsf","audio/dsd"],async load(){return(await Promise.resolve().then(()=>(Ioe(),coe))).DsdiffParser}}});var poe,PI,Eb,kU=ue(()=>{DA();Da();nr();poe={NONE:"not compressed PCM Apple Computer",sowt:"PCM (byte swapped)",fl32:"32-bit floating point IEEE 32-bit float",fl64:"64-bit floating point IEEE 64-bit float Apple Computer",alaw:"ALaw 2:1 8-bit ITU-T G.711 A-law",ulaw:"\xB5Law 2:1 8-bit ITU-T G.711 \xB5-law Apple Computer",ULAW:"CCITT G.711 u-law 8-bit ITU-T G.711 \xB5-law",ALAW:"CCITT G.711 A-law 8-bit ITU-T G.711 A-law",FL32:"Float 32 IEEE 32-bit float "},PI=class extends St("AIFF"){},Eb=class{constructor(t,o){this.isAifc=o;let a=o?22:18;if(t.chunkSize>Math.abs(a):e<22){let A=QA.get(t,o+22);if(A>0){let r=(A+1)%2;if(23+A+r===this.len)i.compressionName=new We(A,"latin1").get(t,o+23);else throw new PI("Illegal pstring length")}else i.compressionName=void 0}}else i.compressionName="PCM";return i}}});var ub,hoe=ue(()=>{DA();Da();ub={len:8,get:(n,t)=>({chunkID:at.get(n,t),chunkSize:Number(BigInt(xe.get(n,t+4)))})}});var uoe={};Ur(uoe,{AIFFParser:()=>PU});var Eoe,vU,PU,Coe=ue(()=>{DA();Eoe=ze(lt(),1);sn();hE();Da();to();kU();kU();hoe();vU=(0,Eoe.default)("music-metadata:parser:aiff"),PU=class extends Lt{constructor(){super(...arguments),this.isCompressed=null}async parse(){if((await this.tokenizer.readToken(ub)).chunkID!=="FORM")throw new PI("Invalid Chunk-ID, expected 'FORM'");let o=await this.tokenizer.readToken(at);switch(o){case"AIFF":this.metadata.setFormat("container",o),this.isCompressed=!1;break;case"AIFC":this.metadata.setFormat("container","AIFF-C"),this.isCompressed=!0;break;default:throw new PI(`Unsupported AIFF type: ${o}`)}this.metadata.setFormat("lossless",!this.isCompressed),this.metadata.setAudioOnly();try{for(;!this.tokenizer.fileInfo.size||this.tokenizer.fileInfo.size-this.tokenizer.position>=ub.len;){vU(`Reading AIFF chunk at offset=${this.tokenizer.position}`);let a=await this.tokenizer.readToken(ub),e=2*Math.round(a.chunkSize/2),i=await this.readData(a);await this.tokenizer.ignore(e-i)}}catch(a){if(a instanceof kA)vU("End-of-stream");else throw a}}async readData(t){switch(t.chunkID){case"COMM":{if(this.isCompressed===null)throw new PI("Failed to parse AIFF.COMM chunk when compression type is unknown");let o=await this.tokenizer.readToken(new Eb(t,this.isCompressed));return this.metadata.setFormat("bitsPerSample",o.sampleSize),this.metadata.setFormat("sampleRate",o.sampleRate),this.metadata.setFormat("numberOfChannels",o.numChannels),this.metadata.setFormat("numberOfSamples",o.numSampleFrames),this.metadata.setFormat("duration",o.numSampleFrames/o.sampleRate),(o.compressionName||o.compressionType)&&this.metadata.setFormat("codec",o.compressionName??poe[o.compressionType]),t.chunkSize}case"ID3 ":{let o=await this.tokenizer.readToken(new Mt(t.chunkSize)),a=So(o);return await new hn().parse(this.metadata,a,this.options),t.chunkSize}case"SSND":return this.metadata.format.duration&&this.metadata.setFormat("bitrate",8*t.chunkSize/this.metadata.format.duration),0;case"NAME":case"AUTH":case"(c) ":case"ANNO":return this.readTextChunk(t);default:return vU(`Ignore chunk id=${t.chunkID}, size=${t.chunkSize}`),0}}async readTextChunk(t){let a=(await this.tokenizer.readToken(new We(t.chunkSize,"ascii"))).split("\0").map(e=>e.trim()).filter(e=>e?.length);return await Promise.all(a.map(e=>this.metadata.addTag("AIFF",t.chunkID,e))),t.chunkSize}}});var Boe,foe=ue(()=>{Boe={parserType:"aiff",extensions:[".aif","aiff","aifc"],mimeTypes:["audio/aiff","audio/aif","audio/aifc","application/aiff"],async load(){return(await Promise.resolve().then(()=>(Coe(),uoe))).AIFFParser}}});var Lf,Qoe,yoe,moe=ue(()=>{DA();Da();Lf={len:12,get:(n,t)=>({id:at.get(n,t),size:Lr.get(n,t+4)})},Qoe={len:16,get:(n,t)=>({fileSize:mf.get(n,t),metadataPointer:mf.get(n,t+8)})},yoe={len:40,get:(n,t)=>({formatVersion:Cr.get(n,t),formatID:Cr.get(n,t+4),channelType:Cr.get(n,t+8),channelNum:Cr.get(n,t+12),samplingFrequency:Cr.get(n,t+16),bitsPerSample:Cr.get(n,t+20),sampleCount:mf.get(n,t+24),blockSizePerChannel:Cr.get(n,t+32)})}});var woe={};Ur(woe,{DsdContentParseError:()=>Cb,DsfParser:()=>FU});var Soe,GU,Cb,FU,Doe=ue(()=>{Soe=ze(lt(),1);Pf();moe();hE();nr();GU=(0,Soe.default)("music-metadata:parser:DSF"),Cb=class extends St("DSD"){},FU=class extends ag{async postId3v2Parse(){let t=this.tokenizer.position,o=await this.tokenizer.readToken(Lf);if(o.id!=="DSD ")throw new Cb("Invalid chunk signature");this.metadata.setFormat("container","DSF"),this.metadata.setFormat("lossless",!0),this.metadata.setAudioOnly();let a=await this.tokenizer.readToken(Qoe);if(a.metadataPointer===BigInt(0))GU("No ID3v2 tag present");else return GU(`expect ID3v2 at offset=${a.metadataPointer}`),await this.parseChunks(a.fileSize-o.size),await this.tokenizer.ignore(Number(a.metadataPointer)-this.tokenizer.position-t),new hn().parse(this.metadata,this.tokenizer,this.options)}async parseChunks(t){for(;t>=Lf.len;){let o=await this.tokenizer.readToken(Lf);switch(GU(`Parsing chunk name=${o.id} size=${o.size}`),o.id){case"fmt ":{let a=await this.tokenizer.readToken(yoe);this.metadata.setFormat("numberOfChannels",a.channelNum),this.metadata.setFormat("sampleRate",a.samplingFrequency),this.metadata.setFormat("bitsPerSample",a.bitsPerSample),this.metadata.setFormat("numberOfSamples",a.sampleCount),this.metadata.setFormat("duration",Number(a.sampleCount)/a.samplingFrequency);let e=a.bitsPerSample*a.samplingFrequency*a.channelNum;this.metadata.setFormat("bitrate",e);return}default:this.tokenizer.ignore(Number(o.size)-Lf.len);break}t-=o.size}}}});var Ooe,boe=ue(()=>{Ooe={parserType:"dsf",extensions:[".dsf"],mimeTypes:["audio/dsf"],async load(){return(await Promise.resolve().then(()=>(Doe(),woe))).DsfParser}}});var GI,Uf,Moe,Bb=ue(()=>{DA();_I();GI=class n{static fromBase64(t){return n.fromBuffer(Uint8Array.from(atob(t),o=>o.charCodeAt(0)))}static fromBuffer(t){return new n(t.length).get(t,0)}constructor(t){this.len=t}get(t,o){let a=sE[xe.get(t,o)];o+=4;let e=xe.get(t,o);o+=4;let i=new We(e,"utf-8").get(t,o);o+=e;let A=xe.get(t,o);o+=4;let r=new We(A,"utf-8").get(t,o);o+=A;let s=xe.get(t,o);o+=4;let g=xe.get(t,o);o+=4;let c=xe.get(t,o);o+=4;let I=xe.get(t,o);o+=4;let d=xe.get(t,o);o+=4;let B=t.slice(o,o+d);return{type:a,format:i,description:r,width:s,height:g,colour_depth:c,indexed_color:I,data:B}}},Uf={len:7,get:(n,t)=>({packetType:QA.get(n,t),vorbis:new We(6,"ascii").get(n,t+1)})},Moe={len:23,get:(n,t)=>({version:Le.get(n,t+0),channelMode:QA.get(n,t+4),sampleRate:Le.get(n,t+5),bitrateMax:Le.get(n,t+9),bitrateNominal:Le.get(n,t+13),bitrateMin:Le.get(n,t+17)})}});var SE,LU=ue(()=>{DA();Zs();SE=class{constructor(t,o){this.data=t,this.offset=o}readInt32(){let t=Le.get(this.data,this.offset);return this.offset+=4,t}readStringUtf8(){let t=this.readInt32(),o=Tr(this.data.subarray(this.offset,this.offset+t),"utf-8");return this.offset+=t,o}parseUserComment(){let t=this.offset,o=this.readStringUtf8(),a=o.indexOf("=");return{key:o.substring(0,a).toUpperCase(),value:o.substring(a+1),len:this.offset-t}}}});var _oe,wE,Hf,og,Kf=ue(()=>{DA();_oe=ze(lt(),1);LU();Bb();nr();wE=(0,_oe.default)("music-metadata:parser:ogg:vorbis1"),Hf=class extends St("Vorbis"){},og=class n{constructor(t,o){this.pageSegments=[],this.durationOnLastPage=!0,this.metadata=t,this.options=o}async parsePage(t,o){if(this.lastPageHeader=t,t.headerType.firstPage)this.parseFirstPage(t,o);else{if(t.headerType.continued){if(this.pageSegments.length===0)throw new Hf("Cannot continue on previous page");this.pageSegments.push(o)}if(t.headerType.lastPage||!t.headerType.continued){if(this.pageSegments.length>0){let a=n.mergeUint8Arrays(this.pageSegments);await this.parseFullPage(a)}this.pageSegments=t.headerType.lastPage?[]:[o]}}}static mergeUint8Arrays(t){let o=t.reduce((e,i)=>e+i.length,0),a=new Uint8Array(o);return t.forEach((e,i,A)=>{let r=A.slice(0,i).reduce((s,g)=>s+g.length,0);a.set(e,r)}),a}async flush(){await this.parseFullPage(n.mergeUint8Arrays(this.pageSegments))}async parseUserComment(t,o){let e=new SE(t,o).parseUserComment();return await this.addTag(e.key,e.value),e.len}async addTag(t,o){if(t==="METADATA_BLOCK_PICTURE"&&typeof o=="string"){if(this.options.skipCovers){wE("Ignore picture");return}o=GI.fromBase64(o),wE(`Push picture: id=${t}, format=${o.format}`)}else wE(`Push tag: id=${t}, value=${o}`);await this.metadata.addTag("vorbis",t,o)}calculateDuration(t){this.lastPageHeader&&(t||this.lastPageHeader.headerType.lastPage)&&this.metadata.format.sampleRate&&this.lastPageHeader.absoluteGranulePosition>=0&&(this.metadata.setFormat("numberOfSamples",this.lastPageHeader.absoluteGranulePosition),this.metadata.setFormat("duration",this.lastPageHeader.absoluteGranulePosition/this.metadata.format.sampleRate))}parseFirstPage(t,o){this.metadata.setFormat("codec","Vorbis I"),this.metadata.setFormat("hasAudio",!0),wE("Parse first page");let a=Uf.get(o,0);if(a.vorbis!=="vorbis")throw new Hf("Metadata does not look like Vorbis");if(a.packetType===1){let e=Moe.get(o,Uf.len);this.metadata.setFormat("sampleRate",e.sampleRate),this.metadata.setFormat("bitrate",e.bitrateNominal),this.metadata.setFormat("numberOfChannels",e.channelMode),wE("sample-rate=%s[hz], bitrate=%s[b/s], channel-mode=%s",e.sampleRate,e.bitrateNominal,e.channelMode)}else throw new Hf("First Ogg page should be type 1: the identification header")}async parseFullPage(t){let o=Uf.get(t,0);switch(wE("Parse full page: type=%s, byteLength=%s",o.packetType,t.byteLength),o.packetType){case 3:return this.parseUserCommentList(t,Uf.len);case 1:case 5:break}}async parseUserCommentList(t,o){let a=Le.get(t,o);o+=4,o+=a;let e=Le.get(t,o);for(o+=4;e-- >0;)o+=await this.parseUserComment(t,o)}}});var ba,xf,Yf,UU=ue(()=>{sr();DA();ba={STREAMINFO:0,PADDING:1,APPLICATION:2,SEEKTABLE:3,VORBIS_COMMENT:4,CUESHEET:5,PICTURE:6},xf={len:4,get:(n,t)=>({lastBlock:GA(n,t,7),type:XA(n,t,1,7),length:Fr.get(n,t+1)})},Yf={len:34,get:(n,t)=>({minimumBlockSize:LA.get(n,t),maximumBlockSize:LA.get(n,t+2)/1e3,minimumFrameSize:Fr.get(n,t+4),maximumFrameSize:Fr.get(n,t+7),sampleRate:Fr.get(n,t+10)>>4,channels:XA(n,t+12,4,3)+1,bitsPerSample:XA(n,t+12,7,5)+1,totalSamples:XA(n,t+13,4,36),fileMD5:new Mt(16).get(n,t+18)})}});var Roe={};Ur(Roe,{FlacParser:()=>jf});var Noe,QVe,fb,jf,HU=ue(()=>{Noe=ze(lt(),1);DA();Bb();Pf();Da();Kf();LU();nr();UU();QVe=(0,Noe.default)("music-metadata:parser:FLAC"),fb=class extends St("FLAC"){},jf=class extends ag{constructor(){super(...arguments),this.vorbisParser=new og(this.metadata,this.options)}async postId3v2Parse(){if((await this.tokenizer.readToken(at)).toString()!=="fLaC")throw new fb("Invalid FLAC preamble");let o;do o=await this.tokenizer.readToken(xf),await this.parseDataBlock(o);while(!o.lastBlock);if(this.tokenizer.fileInfo.size&&this.metadata.format.duration){let a=this.tokenizer.fileInfo.size-this.tokenizer.position;this.metadata.setFormat("bitrate",8*a/this.metadata.format.duration)}}async parseDataBlock(t){switch(QVe(`blockHeader type=${t.type}, length=${t.length}`),t.type){case ba.STREAMINFO:return this.readBlockStreamInfo(t.length);case ba.PADDING:break;case ba.APPLICATION:break;case ba.SEEKTABLE:break;case ba.VORBIS_COMMENT:return this.readComment(t.length);case ba.CUESHEET:break;case ba.PICTURE:await this.parsePicture(t.length);return;default:this.metadata.addWarning(`Unknown block type: ${t.type}`)}return this.tokenizer.ignore(t.length).then()}async readBlockStreamInfo(t){if(t!==Yf.len)throw new fb("Unexpected block-stream-info length");let o=await this.tokenizer.readToken(Yf);this.metadata.setFormat("container","FLAC"),this.processsStreamInfo(o)}processsStreamInfo(t){this.metadata.setFormat("codec","FLAC"),this.metadata.setFormat("hasAudio",!0),this.metadata.setFormat("lossless",!0),this.metadata.setFormat("numberOfChannels",t.channels),this.metadata.setFormat("bitsPerSample",t.bitsPerSample),this.metadata.setFormat("sampleRate",t.sampleRate),t.totalSamples>0&&this.metadata.setFormat("duration",t.totalSamples/t.sampleRate)}async readComment(t){let o=await this.tokenizer.readToken(new Mt(t));return this.parseComment(o)}async parseComment(t){let o=new SE(t,0),a=o.readStringUtf8();a.length>0&&this.metadata.setFormat("tool",a);let e=o.readInt32(),i=new Array(e);for(let A=0;A(A.key==="ENCODER"&&this.metadata.setFormat("tool",A.value),this.addTag(A.key,A.value))))}async parsePicture(t){return this.options.skipCovers?this.tokenizer.ignore(t):this.addPictureTag(await this.tokenizer.readToken(new GI(t)))}addPictureTag(t){return this.addTag("METADATA_BLOCK_PICTURE",t)}addTag(t,o){return this.vorbisParser.addTag(t,o)}}});var koe,voe=ue(()=>{koe={parserType:"flac",extensions:[".flac"],mimeTypes:["audio/flac"],async load(){return(await Promise.resolve().then(()=>(HU(),Roe))).FlacParser}}});var _e,KU=ue(()=>{_e={string:0,uint:1,uid:2,bool:3,binary:4,float:5}});var Poe,Goe=ue(()=>{KU();Poe={name:"dtd",container:{440786851:{name:"ebml",container:{17030:{name:"ebmlVersion",value:_e.uint},17143:{name:"ebmlReadVersion",value:_e.uint},17138:{name:"ebmlMaxIDWidth",value:_e.uint},17139:{name:"ebmlMaxSizeWidth",value:_e.uint},17026:{name:"docType",value:_e.string},17031:{name:"docTypeVersion",value:_e.uint},17029:{name:"docTypeReadVersion",value:_e.uint}}},408125543:{name:"segment",container:{290298740:{name:"seekHead",container:{19899:{name:"seek",multiple:!0,container:{21419:{name:"id",value:_e.binary},21420:{name:"position",value:_e.uint}}}}},357149030:{name:"info",container:{29604:{name:"uid",value:_e.uid},29572:{name:"filename",value:_e.string},3979555:{name:"prevUID",value:_e.uid},3965867:{name:"prevFilename",value:_e.string},4110627:{name:"nextUID",value:_e.uid},4096955:{name:"nextFilename",value:_e.string},2807729:{name:"timecodeScale",value:_e.uint},17545:{name:"duration",value:_e.float},17505:{name:"dateUTC",value:_e.uint},31657:{name:"title",value:_e.string},19840:{name:"muxingApp",value:_e.string},22337:{name:"writingApp",value:_e.string}}},524531317:{name:"cluster",multiple:!0,container:{231:{name:"timecode",value:_e.uid},22743:{name:"silentTracks ",multiple:!0},167:{name:"position",value:_e.uid},171:{name:"prevSize",value:_e.uid},160:{name:"blockGroup"},163:{name:"simpleBlock"}}},374648427:{name:"tracks",container:{174:{name:"entries",multiple:!0,container:{215:{name:"trackNumber",value:_e.uint},29637:{name:"uid",value:_e.uid},131:{name:"trackType",value:_e.uint},185:{name:"flagEnabled",value:_e.bool},136:{name:"flagDefault",value:_e.bool},21930:{name:"flagForced",value:_e.bool},156:{name:"flagLacing",value:_e.bool},28135:{name:"minCache",value:_e.uint},28136:{name:"maxCache",value:_e.uint},2352003:{name:"defaultDuration",value:_e.uint},2306383:{name:"timecodeScale",value:_e.float},21358:{name:"name",value:_e.string},2274716:{name:"language",value:_e.string},134:{name:"codecID",value:_e.string},25506:{name:"codecPrivate",value:_e.binary},2459272:{name:"codecName",value:_e.string},3839639:{name:"codecSettings",value:_e.string},3883072:{name:"codecInfoUrl",value:_e.string},2536e3:{name:"codecDownloadUrl",value:_e.string},170:{name:"codecDecodeAll",value:_e.bool},28587:{name:"trackOverlay",value:_e.uint},224:{name:"video",container:{154:{name:"flagInterlaced",value:_e.bool},21432:{name:"stereoMode",value:_e.uint},176:{name:"pixelWidth",value:_e.uint},186:{name:"pixelHeight",value:_e.uint},21680:{name:"displayWidth",value:_e.uint},21690:{name:"displayHeight",value:_e.uint},21683:{name:"aspectRatioType",value:_e.uint},3061028:{name:"colourSpace",value:_e.uint},3126563:{name:"gammaValue",value:_e.float}}},225:{name:"audio",container:{181:{name:"samplingFrequency",value:_e.float},30901:{name:"outputSamplingFrequency",value:_e.float},159:{name:"channels",value:_e.uint},148:{name:"channels",value:_e.uint},32123:{name:"channelPositions",value:_e.binary},25188:{name:"bitDepth",value:_e.uint}}},28032:{name:"contentEncodings",container:{25152:{name:"contentEncoding",container:{20529:{name:"order",value:_e.uint},20530:{name:"scope",value:_e.bool},20531:{name:"type",value:_e.uint},20532:{name:"contentEncoding",container:{16980:{name:"contentCompAlgo",value:_e.uint},16981:{name:"contentCompSettings",value:_e.binary}}},20533:{name:"contentEncoding",container:{18401:{name:"contentEncAlgo",value:_e.uint},18402:{name:"contentEncKeyID",value:_e.binary},18403:{name:"contentSignature ",value:_e.binary},18404:{name:"ContentSigKeyID ",value:_e.binary},18405:{name:"contentSigAlgo ",value:_e.uint},18406:{name:"contentSigHashAlgo ",value:_e.uint}}},25188:{name:"bitDepth",value:_e.uint}}}}}}}}},475249515:{name:"cues",container:{187:{name:"cuePoint",container:{179:{name:"cueTime",value:_e.uid},183:{name:"positions",container:{247:{name:"track",value:_e.uint},241:{name:"clusterPosition",value:_e.uint},21368:{name:"blockNumber",value:_e.uint},234:{name:"codecState",value:_e.uint},219:{name:"reference",container:{150:{name:"time",value:_e.uint},151:{name:"cluster",value:_e.uint},21343:{name:"number",value:_e.uint},235:{name:"codecState",value:_e.uint}}},240:{name:"relativePosition",value:_e.uint}}}}}}},423732329:{name:"attachments",container:{24999:{name:"attachedFiles",multiple:!0,container:{18046:{name:"description",value:_e.string},18030:{name:"name",value:_e.string},18016:{name:"mimeType",value:_e.string},18012:{name:"data",value:_e.binary},18094:{name:"uid",value:_e.uid}}}}},272869232:{name:"chapters",container:{17849:{name:"editionEntry",container:{182:{name:"chapterAtom",container:{29636:{name:"uid",value:_e.uid},145:{name:"timeStart",value:_e.uint},146:{name:"timeEnd",value:_e.uid},152:{name:"hidden",value:_e.bool},17816:{name:"enabled",value:_e.uid},143:{name:"track",container:{137:{name:"trackNumber",value:_e.uid},128:{name:"display",container:{133:{name:"string",value:_e.string},17276:{name:"language ",value:_e.string},17278:{name:"country ",value:_e.string}}}}}}}}}}},307544935:{name:"tags",container:{29555:{name:"tag",multiple:!0,container:{25536:{name:"target",container:{25541:{name:"tagTrackUID",value:_e.uid},25540:{name:"tagChapterUID",value:_e.uint},25542:{name:"tagAttachmentUID",value:_e.uid},25546:{name:"targetType",value:_e.string},26826:{name:"targetTypeValue",value:_e.uint},25545:{name:"tagEditionUID",value:_e.uid}}},26568:{name:"simpleTags",multiple:!0,container:{17827:{name:"name",value:_e.string},17543:{name:"string",value:_e.string},17541:{name:"binary",value:_e.binary},17530:{name:"language",value:_e.string},17531:{name:"languageIETF",value:_e.string},17540:{name:"default",value:_e.bool}}}}}}}}}}}});function xU(n,t){return Number(yVe(n,t))}function yVe(n,t){let o=new Uint8Array(8),a=n.subarray(0,t);try{return o.set(a,8-t),eg.get(o,0)}catch{return BigInt(-1)}}function Loe(n){return n.container&&Object.keys(n.container).map(t=>{let o=n.container[t];return o.id=Number.parseInt(t,10),o}).forEach(t=>{t.parent=n,Loe(t)}),n}function Bd(n){let t="";return n.parent&&n.parent.name!=="dtd"&&(t+=`${Bd(n.parent)}/`),t+n.name}var Foe,DE,Qb,ng,yb,Uoe=ue(()=>{DA();Foe=ze(lt(),1);sn();KU();DA();nr();DE=(0,Foe.default)("music-metadata:parser:ebml"),Qb=class extends St("EBML"){},ng={ReadNext:0,IgnoreElement:2,SkipSiblings:3,TerminateParsing:4,SkipElement:5},yb=class{constructor(t){this.parserMap=new Map,this.ebmlMaxIDLength=4,this.ebmlMaxSizeLength=8,this.tokenizer=t,this.parserMap.set(_e.uint,o=>this.readUint(o)),this.parserMap.set(_e.string,o=>this.readString(o)),this.parserMap.set(_e.binary,o=>this.readBuffer(o)),this.parserMap.set(_e.uid,async o=>this.readBuffer(o)),this.parserMap.set(_e.bool,o=>this.readFlag(o)),this.parserMap.set(_e.float,o=>this.readFloat(o))}async iterate(t,o,a){return this.parseContainer(Loe(t),o,a)}async parseContainer(t,o,a){let e={};for(;this.tokenizer.position=0?this.tokenizer.position+i.len:-1,a);r.multiple?(e[r.name]||(e[r.name]=[]),e[r.name].push(g)):e[r.name]=g,await a.elementValue(r,g,A)}else{let g=this.parserMap.get(r.value);if(typeof g=="function"){let c=await g(i);e[r.name]=c,await a.elementValue(r,c,A)}}break;case ng.SkipElement:DE(`Go to next element: name=${Bd(r)}, element.id=0x${i.id}, container=${!!r.container} at position=${A}`);break;case ng.IgnoreElement:DE(`Ignore element: name=${Bd(r)}, element.id=0x${i.id}, container=${!!r.container} at position=${A}`),await this.tokenizer.ignore(i.len);break;case ng.SkipSiblings:DE(`Ignore remaining container, at: name=${Bd(r)}, element.id=0x${i.id}, container=${!!r.container} at position=${A}`),await this.tokenizer.ignore(o-this.tokenizer.position);break;case ng.TerminateParsing:return DE(`Terminate parsing at element: name=${Bd(r)}, element.id=0x${i.id}, container=${!!r.container} at position=${A}`),e}else switch(i.id){case 236:await this.tokenizer.ignore(i.len);break;default:DE(`parseEbml: parent=${Bd(t)}, unknown child: id=${i.id.toString(16)} at position=${A}`),await this.tokenizer.ignore(i.len)}}return e}async readVintData(t){let o=await this.tokenizer.peekNumber(QA),a=128,e=1;for(;(o&a)===0;){if(e>t)throw new Qb("VINT value exceeding maximum size");++e,a>>=1}let i=new Uint8Array(e);return await this.tokenizer.readBuffer(i),i}async readElement(){let t=await this.readVintData(this.ebmlMaxIDLength),o=await this.readVintData(this.ebmlMaxSizeLength);return o[0]^=128>>o.length-1,{id:xU(t,t.length),len:xU(o,o.length)}}async readFloat(t){switch(t.len){case 0:return 0;case 4:return this.tokenizer.readNumber($2);case 8:return this.tokenizer.readNumber(HO);case 10:return this.tokenizer.readNumber(HO);default:throw new Qb(`Invalid IEEE-754 float length: ${t.len}`)}}async readFlag(t){return await this.readUint(t)===1}async readUint(t){let o=await this.readBuffer(t);return xU(o,t.len)}async readString(t){return(await this.tokenizer.readToken(new We(t.len,"utf-8"))).replace(/\x00.*$/g,"")}async readBuffer(t){let o=new Uint8Array(t.len);return await this.tokenizer.readBuffer(o),o}}});var Koe={};Ur(Koe,{MatroskaParser:()=>YU});var Hoe,mb,YU,xoe=ue(()=>{Hoe=ze(lt(),1);to();Goe();IU();Uoe();mb=(0,Hoe.default)("music-metadata:parser:matroska"),YU=class extends Lt{constructor(){super(...arguments),this.seekHeadOffset=0,this.flagUseIndexToSkipClusters=this.options.mkvUseIndex??!1}async parse(){let t=this.tokenizer.fileInfo.size??Number.MAX_SAFE_INTEGER,o=new yb(this.tokenizer);mb("Initializing DTD end MatroskaIterator"),await o.iterate(Poe,t,{startNext:a=>{switch(a.id){case 475249515:return mb(`Skip element: name=${a.name}, id=0x${a.id.toString(16)}`),ng.IgnoreElement;case 524531317:if(this.flagUseIndexToSkipClusters&&this.seekHead){let e=this.seekHead.seek.find(i=>i.position+this.seekHeadOffset>this.tokenizer.position);if(e){let i=e.position+this.seekHeadOffset-this.tokenizer.position;return mb(`Use index to go to next position, ignoring ${i} bytes`),this.tokenizer.ignore(i),ng.SkipElement}}return ng.IgnoreElement;default:return ng.ReadNext}},elementValue:async(a,e,i)=>{switch(mb(`Received: name=${a.name}, value=${e}`),a.id){case 17026:this.metadata.setFormat("container",`EBML/${e}`);break;case 290298740:this.seekHead=e,this.seekHeadOffset=i;break;case 357149030:{let A=e,r=A.timecodeScale?A.timecodeScale:1e6;if(typeof A.duration=="number"){let s=A.duration*r/1e9;await this.addTag("segment:title",A.title),this.metadata.setFormat("duration",Number(s))}}break;case 374648427:{let A=e;if(A?.entries){A.entries.forEach(s=>{let g={codecName:s.codecID.replace("A_","").replace("V_",""),codecSettings:s.codecSettings,flagDefault:s.flagDefault,flagLacing:s.flagLacing,flagEnabled:s.flagEnabled,language:s.language,name:s.name,type:s.trackType,audio:s.audio,video:s.video};this.metadata.addStreamInfo(g)});let r=A.entries.filter(s=>s.trackType===yi.audio).reduce((s,g)=>!s||g.flagDefault&&!s.flagDefault||g.trackNumber{let s=r.target,g=s?.targetTypeValue?Xie[s.targetTypeValue]:s?.targetType?s.targetType:"track";await Promise.all(r.simpleTags.map(async c=>{let I=c.string?c.string:c.binary;await this.addTag(`${g}:${c.name}`,I)}))}))}break;case 423732329:{let A=e;await Promise.all(A.attachedFiles.filter(r=>r.mimeType.startsWith("image/")).map(r=>this.addTag("picture",{data:r.data,format:r.mimeType,description:r.description,name:r.name})))}break}}})}async addTag(t,o){await this.metadata.addTag("matroska",t,o)}}});var Yoe,joe=ue(()=>{Yoe={parserType:"matroska",extensions:[".mka",".mkv",".mk3d",".mks","webm"],mimeTypes:["audio/matroska","video/matroska","audio/webm","video/webm"],async load(){return(await Promise.resolve().then(()=>(xoe(),Koe))).MatroskaParser}}});function Woe(n,t,o,a,e){if(JU(`remainingLen=${a}, numberOfEntries=${e} * token-len=${t.len}`),a===0)return[];if(a!==e*t.len)throw new Ic("mismatch number-of-entries with remaining atom-length");let i=[];for(let A=0;A{DA();qoe=ze(lt(),1);Da();nr();sr();nr();JU=(0,qoe.default)("music-metadata:parser:MP4:atom"),Ic=class extends St("MP4"){},fd={len:8,get:(n,t)=>{let o=xe.get(n,t);if(o<0)throw new Ic("Invalid atom header length");return{length:BigInt(o),name:new We(4,"latin1").get(n,t+4)}},put:(n,t,o)=>(xe.put(n,t,Number(o.length)),at.put(n,t+4,o.name))},zoe=eg,qU={len:4,get:(n,t)=>({type:new We(4,"ascii").get(n,t)})},Sb=class{constructor(t,o,a){if(to&&JU(`Warning: atom ${a} expected to be ${o}, but was actually ${t} bytes long.`),this.len=t}},OE={len:4,get:(n,t)=>{let o=xe.get(n,t)-2082844800;return new Date(o*1e3)}},bE={len:8,get:(n,t)=>{let o=Number(eg.get(n,t))-2082844800;return new Date(o*1e3)}},wb=class extends Sb{constructor(t){super(t,24,"mdhd")}get(t,o){let a=QA.get(t,o+0),e=Fr.get(t,o+1);switch(a){case 0:return{version:a,flags:e,creationTime:OE.get(t,o+4),modificationTime:OE.get(t,o+8),timeScale:xe.get(t,o+12),duration:xe.get(t,o+16),language:LA.get(t,o+20),quality:LA.get(t,o+22)};case 1:return{version:a,flags:e,creationTime:bE.get(t,o+4),modificationTime:bE.get(t,o+12),timeScale:xe.get(t,o+20),duration:Number(eg.get(t,o+24)),language:LA.get(t,o+32),quality:LA.get(t,o+34)};default:throw new In("Invalid mdhd version header")}}},Db=class extends Sb{constructor(t){super(t,100,"mvhd")}get(t,o){let a=QA.get(t,o),e=Fr.get(t,o+1);return a===1?{version:a,flags:e,creationTime:bE.get(t,o+4),modificationTime:bE.get(t,o+12),timeScale:xe.get(t,o+20),duration:Number(eg.get(t,o+24)),preferredRate:xe.get(t,o+32),preferredVolume:LA.get(t,o+36),previewTime:xe.get(t,o+84),previewDuration:xe.get(t,o+88),posterTime:xe.get(t,o+92),selectionTime:xe.get(t,o+96),selectionDuration:xe.get(t,o+100),currentTime:xe.get(t,o+104),nextTrackID:xe.get(t,o+108)}:{version:a,flags:e,creationTime:OE.get(t,o+4),modificationTime:OE.get(t,o+8),timeScale:xe.get(t,o+12),duration:xe.get(t,o+16),preferredRate:xe.get(t,o+20),preferredVolume:LA.get(t,o+24),previewTime:xe.get(t,o+72),previewDuration:xe.get(t,o+76),posterTime:xe.get(t,o+80),selectionTime:xe.get(t,o+84),selectionDuration:xe.get(t,o+88),currentTime:xe.get(t,o+92),nextTrackID:xe.get(t,o+96)}}},Ob=class{constructor(t){this.len=t}get(t,o){return{type:{set:QA.get(t,o+0),type:Fr.get(t,o+1)},locale:Fr.get(t,o+4),value:new Mt(this.len-8).get(t,o+8)}}},bb=class{constructor(t){this.len=t}get(t,o){return{version:QA.get(t,o),flags:Fr.get(t,o+1),name:new We(this.len-4,"utf-8").get(t,o+4)}}},Mb=class{constructor(t){this.len=t}get(t,o){let a=QA.get(t,o),e=Fr.get(t,o+1);switch(a){case 0:return{version:a,flags:e,creationTime:OE.get(t,o+4),modificationTime:OE.get(t,o+8),trackId:xe.get(t,o+12),duration:xe.get(t,o+20),layer:LA.get(t,o+32),alternateGroup:LA.get(t,o+34),volume:LA.get(t,o+36)};case 1:return{version:a,flags:e,creationTime:bE.get(t,o+4),modificationTime:bE.get(t,o+12),trackId:xe.get(t,o+20),duration:Number(eg.get(t,o+28)),layer:LA.get(t,o+44),alternateGroup:LA.get(t,o+46),volume:LA.get(t,o+48)};default:throw new In("Invalid tkhd version header")}}},Joe={len:8,get:(n,t)=>({version:QA.get(n,t),flags:Fr.get(n,t+1),numberOfEntries:xe.get(n,t+4)})},jU=class{constructor(t){this.len=t}get(t,o){let a=this.len-12;return{dataFormat:at.get(t,o),dataReferenceIndex:LA.get(t,o+10),description:a>0?new Mt(a).get(t,o+12):void 0}}},Jf=class{constructor(t){this.len=t}get(t,o){let a=Joe.get(t,o);o+=Joe.len;let e=[];for(let i=0;i=this.len){JU("TrackRunBox size mismatch");break}let r={};e.flags.sampleDurationPresent&&(r.sampleDuration=xe.get(t,i),i+=4),e.flags.sampleSizePresent&&(r.sampleSize=xe.get(t,i),i+=4),e.flags.sampleFlagsPresent&&(r.sampleFlags=xe.get(t,i),i+=4),e.flags.sampleCompositionTimeOffsetsPresent&&(r.sampleCompositionTimeOffset=xe.get(t,i),i+=4),e.samples.push(r)}return e}},Pb=class{constructor(t){this.len=t}get(t,o){let a=o+1,e=new We(4,"utf-8");return{version:$s.get(t,o),flags:Fr.get(t,o+1),componentType:e.get(t,o+4),handlerType:e.get(t,o+8),componentName:new We(this.len-28,"utf-8").get(t,o+28)}}},Gb=class{constructor(t){this.len=t}get(t,o){let a=0,e=[];for(;a{$oe=ze(lt(),1);Vf();Vf();Xoe=(0,$oe.default)("music-metadata:parser:MP4:Atom"),Fb=class n{static async readAtom(t,o,a,e){let i=t.position;Xoe(`Reading next token on offset=${i}...`);let A=await t.readToken(fd),r=A.length===1n;r&&(A.length=await t.readToken(zoe));let s=new n(A,r,a),g=s.getPayloadLength(e);return Xoe(`parse atom name=${s.atomPath}, extended=${s.extended}, offset=${i}, len=${s.header.length}`),await s.readData(t,o,g),s}constructor(t,o,a){this.header=t,this.extended=o,this.parent=a,this.children=[],this.atomPath=(this.parent?`${this.parent.atomPath}.`:"")+this.header.name}getHeaderLength(){return this.extended?16:8}getPayloadLength(t){return(this.header.length===0n?t:Number(this.header.length))-this.getHeaderLength()}async readAtoms(t,o,a){for(;a>0;){let e=await n.readAtom(t,o,this,a);this.children.push(e),a-=e.header.length===0n?a:Number(e.header.length)}}async readData(t,o,a){switch(this.header.name){case"moov":case"udta":case"mdia":case"minf":case"stbl":case"":case"ilst":case"tref":case"moof":return this.readAtoms(t,o,this.getPayloadLength(a));case"meta":{let i=(await t.peekToken(fd)).name==="hdlr"?0:4;return await t.ignore(i),this.readAtoms(t,o,this.getPayloadLength(a)-i)}default:return o(this,a)}}}});var ine={};Ur(ine,{MP4Parser:()=>VU});function tne(n,t,o){return o.indexOf(n)===t}var rne,io,wVe,Ane,VU,ane=ue(()=>{rne=ze(lt(),1);DA();to();Rf();ene();Vf();Vf();Id();Df();Zs();io=(0,rne.default)("music-metadata:parser:MP4"),wVe="iTunes",Ane={raw:{lossy:!1,format:"raw"},MAC3:{lossy:!0,format:"MACE 3:1"},MAC6:{lossy:!0,format:"MACE 6:1"},ima4:{lossy:!0,format:"IMA 4:1"},ulaw:{lossy:!0,format:"uLaw 2:1"},alaw:{lossy:!0,format:"uLaw 2:1"},Qclp:{lossy:!0,format:"QUALCOMM PureVoice"},".mp3":{lossy:!0,format:"MPEG-1 layer 3"},alac:{lossy:!1,format:"ALAC"},"ac-3":{lossy:!0,format:"AC-3"},mp4a:{lossy:!0,format:"MPEG-4/AAC"},mp4s:{lossy:!0,format:"MP4S"},c608:{lossy:!0,format:"CEA-608"},c708:{lossy:!0,format:"CEA-708"}};VU=class n extends Lt{constructor(){super(...arguments),this.tracks=new Map,this.hasVideoTrack=!1,this.hasAudioTrack=!0,this.atomParsers={mvhd:async t=>{let o=await this.tokenizer.readToken(new Db(t));this.metadata.setFormat("creationTime",o.creationTime),this.metadata.setFormat("modificationTime",o.modificationTime)},chap:async t=>{let o=this.getTrackDescription(),a=[];for(;t>=xe.len;)a.push(await this.tokenizer.readNumber(xe)),t-=xe.len;o.chapterList=a},mdat:async t=>{if(this.options.includeChapters){let o=[...this.tracks.values()].filter(a=>a.chapterList);if(o.length===1){let a=o[0].chapterList,e=[...this.tracks.values()].filter(i=>a.indexOf(i.header.trackId)!==-1);if(e.length===1)return this.parseChapterTrack(e[0],o[0],t)}}await this.tokenizer.ignore(t)},ftyp:async t=>{let o=[];for(;t>0;){let e=await this.tokenizer.readToken(qU);t-=qU.len;let i=e.type.replace(/\W/g,"");i.length>0&&o.push(i)}io(`ftyp: ${o.join("/")}`);let a=o.filter(tne).join("/");this.metadata.setFormat("container",a)},stsd:async t=>{let o=await this.tokenizer.readToken(new Jf(t)),a=this.getTrackDescription();a.soundSampleDescription=o.table.map(e=>this.parseSoundSampleDescription(e))},stsz:async t=>{let o=await this.tokenizer.readToken(new zf(t)),a=this.getTrackDescription();a.sampleSize=o.sampleSize,a.sampleSizeTable=o.entries},date:async t=>{let o=await this.tokenizer.readToken(new We(t,"utf-8"));await this.addTag("date",o)}}}static read_BE_Integer(t,o){let a=(o?"INT":"UINT")+t.length*8+(t.length>1?"_BE":""),e=VA[a];if(!e)throw new Ic(`Token for integer type not found: "${a}"`);return Number(e.get(t,0))}async parse(){this.hasVideoTrack=!1,this.hasAudioTrack=!0,this.tracks.clear();let t=this.tokenizer.fileInfo.size||0;for(;!this.tokenizer.fileInfo.size||t>0;){try{if((await this.tokenizer.peekToken(fd)).name==="\0\0\0\0"){let A=`Error at offset=${this.tokenizer.position}: box.id=0`;io(A),this.addWarning(A);break}}catch(i){if(i instanceof Error){let A=`Error at offset=${this.tokenizer.position}: ${i.message}`;io(A),this.addWarning(A)}else throw i;break}let e=await Fb.readAtom(this.tokenizer,(i,A)=>this.handleAtom(i,A),null,t);t-=e.header.length===BigInt(0)?t:Number(e.header.length)}let o=[];this.tracks.forEach(e=>{let i=[];e.soundSampleDescription.forEach(A=>{let r={},s=Ane[A.dataFormat];if(s?(i.push(s.format),r.codecName=s.format):r.codecName=`<${A.dataFormat}>`,A.description){let{description:g}=A;g.sampleRate>0&&(r.type=yi.audio,r.audio={samplingFrequency:g.sampleRate,bitDepth:g.sampleSize,channels:g.numAudioChannels})}this.metadata.addStreamInfo(r)}),i.length>=1&&o.push(i.join("/"))}),o.length>0&&this.metadata.setFormat("codec",o.filter(tne).join("+"));let a=[...this.tracks.values()].filter(e=>e.soundSampleDescription.length>=1&&e.soundSampleDescription[0].description&&e.soundSampleDescription[0].description.numAudioChannels>0);for(let e of a){if(e.media.header&&e.media.header.timeScale>0)if(e.sampleRate=e.media.header.timeScale,e.media.header.duration>0&&(io("Using duration defined on audio track"),e.samples=e.media.header.duration,e.duration=e.samples/e.sampleRate),e.fragments.length>0){io("Calculate duration defined in track fragments");let r=0;e.sizeInBytes=0;for(let s of e.fragments)for(let g of s.trackRun.samples){let c=g.sampleDuration??s.header.defaultSampleDuration??0,I=g.sampleSize??s.header.defaultSampleSize??0;if(c===0)throw new Error("Missing sampleDuration and no defaultSampleDuration in track fragment header");if(I===0)throw new Error("Missing sampleSize and no defaultSampleSize in track fragment header");r+=c,e.sizeInBytes+=I}e.samples||(e.samples=r),e.duration||(e.duration=r/e.sampleRate)}else e.sampleSizeTable.length>0&&(e.sizeInBytes=e.sampleSizeTable.reduce((r,s)=>r+s,0));let i=e.soundSampleDescription[0];if(i.description&&e.media.header&&(this.metadata.setFormat("sampleRate",i.description.sampleRate),this.metadata.setFormat("bitsPerSample",i.description.sampleSize),this.metadata.setFormat("numberOfChannels",i.description.numAudioChannels),e.media.header.timeScale===0&&e.timeToSampleTable.length>0)){let r=e.timeToSampleTable.map(s=>s.count*s.duration).reduce((s,g)=>s+g);e.duration=r/i.description.sampleRate}let A=Ane[i.dataFormat];A&&this.metadata.setFormat("lossless",!A.lossy)}if(a.length>=1){let e=a[0];e.duration&&(this.metadata.setFormat("duration",e.duration),e.sizeInBytes&&this.metadata.setFormat("bitrate",8*e.sizeInBytes/e.duration))}this.metadata.setFormat("hasAudio",this.hasAudioTrack),this.metadata.setFormat("hasVideo",this.hasVideoTrack)}async handleAtom(t,o){if(t.parent)switch(t.parent.header.name){case"ilst":case"":return this.parseMetadataItemData(t);case"moov":switch(t.header.name){case"trak":return this.parseTrackBox(t);case"udta":return this.parseTrackBox(t)}break;case"moof":switch(t.header.name){case"traf":return this.parseTrackFragmentBox(t)}}if(this.atomParsers[t.header.name])return this.atomParsers[t.header.name](o);io(`No parser for atom path=${t.atomPath}, payload-len=${o}, ignoring atom`),await this.tokenizer.ignore(o)}getTrackDescription(){let t=[...this.tracks.values()];return t[t.length-1]}async addTag(t,o){await this.metadata.addTag(wVe,t,o)}addWarning(t){io(`Warning: ${t}`),this.metadata.addWarning(t)}parseMetadataItemData(t){let o=t.header.name;return t.readAtoms(this.tokenizer,async(a,e)=>{let i=a.getPayloadLength(e);switch(a.header.name){case"data":return this.parseValueAtom(o,a);case"name":case"mean":case"rate":{let A=await this.tokenizer.readToken(new bb(i));o+=`:${A.name}`;break}default:{let A=await this.tokenizer.readToken(new Mt(i));this.addWarning(`Unsupported meta-item: ${o}[${a.header.name}] => value=${xO(A)} ascii=${Tr(A,"ascii")}`)}}},t.getPayloadLength(0))}async parseValueAtom(t,o){let a=await this.tokenizer.readToken(new Ob(Number(o.header.length)-fd.len));if(a.type.set!==0)throw new Ic(`Unsupported type-set != 0: ${a.type.set}`);switch(a.type.type){case 0:switch(t){case"trkn":case"disk":{let e=QA.get(a.value,3),i=QA.get(a.value,5);await this.addTag(t,`${e}/${i}`);break}case"gnre":{let e=QA.get(a.value,1),i=pE[e-1];await this.addTag(t,i);break}case"rate":{let e=Tr(a.value,"ascii");await this.addTag(t,e);break}default:io(`unknown proprietary value type for: ${o.atomPath}`)}break;case 1:case 18:await this.addTag(t,Tr(a.value));break;case 13:if(this.options.skipCovers)break;await this.addTag(t,{format:"image/jpeg",data:Uint8Array.from(a.value)});break;case 14:if(this.options.skipCovers)break;await this.addTag(t,{format:"image/png",data:Uint8Array.from(a.value)});break;case 21:await this.addTag(t,n.read_BE_Integer(a.value,!0));break;case 22:await this.addTag(t,n.read_BE_Integer(a.value,!1));break;case 65:await this.addTag(t,QA.get(a.value,0));break;case 66:await this.addTag(t,LA.get(a.value,0));break;case 67:await this.addTag(t,xe.get(a.value,0));break;default:this.addWarning(`atom key=${t}, has unknown well-known-type (data-type): ${a.type.type}`)}}async parseTrackBox(t){let o={media:{},fragments:[]};await t.readAtoms(this.tokenizer,async(a,e)=>{let i=a.getPayloadLength(e);switch(a.header.name){case"chap":{let A=await this.tokenizer.readToken(new Gb(e));o.chapterList=A;break}case"tkhd":o.header=await this.tokenizer.readToken(new Mb(i));break;case"hdlr":o.handler=await this.tokenizer.readToken(new Pb(i)),o.isAudio=()=>o.handler.handlerType==="audi"||o.handler.handlerType==="soun",o.isVideo=()=>o.handler.handlerType==="vide",o.isAudio()?this.hasAudioTrack=!0:o.isVideo()&&(this.hasVideoTrack=!0);break;case"mdhd":{let A=await this.tokenizer.readToken(new wb(i));o.media.header=A;break}case"stco":{let A=await this.tokenizer.readToken(new Nb(i));o.chunkOffsetTable=A.entries;break}case"stsc":{let A=await this.tokenizer.readToken(new Tb(i));o.sampleToChunkTable=A.entries;break}case"stsd":{let A=await this.tokenizer.readToken(new Jf(i));o.soundSampleDescription=A.table.map(r=>this.parseSoundSampleDescription(r));break}case"stts":{let A=await this.tokenizer.readToken(new _b(i));o.timeToSampleTable=A.entries;break}case"stsz":{let A=await this.tokenizer.readToken(new zf(i));o.sampleSize=A.sampleSize,o.sampleSizeTable=A.entries;break}case"dinf":case"vmhd":case"smhd":io(`Ignoring: ${a.header.name}`),await this.tokenizer.ignore(i);break;default:io(`Unexpected track box: ${a.header.name}`),await this.tokenizer.ignore(i)}},t.getPayloadLength(0)),this.tracks.set(o.header.trackId,o)}parseTrackFragmentBox(t){let o;return t.readAtoms(this.tokenizer,async(a,e)=>{let i=a.getPayloadLength(e);switch(a.header.name){case"tfhd":{let A=new kb(a.getPayloadLength(e));o=await this.tokenizer.readToken(A);break}case"tfdt":await this.tokenizer.ignore(i);break;case"trun":{let A=new vb(i),r=await this.tokenizer.readToken(A);o&&this.tracks.get(o.trackId)?.fragments.push({header:o,trackRun:r});break}default:io(`Unexpected box: ${a.header.name}`),await this.tokenizer.ignore(i)}},t.getPayloadLength(0))}parseSoundSampleDescription(t){let o={dataFormat:t.dataFormat,dataReferenceIndex:t.dataReferenceIndex},a=0;if(t.description){let e=zU.get(t.description,a);a+=zU.len,e.version===0||e.version===1?o.description=Voe.get(t.description,a):io(`Warning: sound-sample-description ${e} not implemented`)}return o}async parseChapterTrack(t,o,a){if(!t.sampleSize&&t.chunkOffsetTable.length!==t.sampleSizeTable.length)throw new Error("Expected equal chunk-offset-table & sample-size-table length.");let e=[];for(let i=0;i0;++i){let A=t.timeToSampleTable.slice(0,i).reduce((d,B)=>d+B.duration,0),s=t.chunkOffsetTable[i]-this.tokenizer.position,g=t.sampleSize>0?t.sampleSize:t.sampleSizeTable[i];if(a-=s+g,a<0)throw new Ic("Chapter chunk exceeding token length");await this.tokenizer.ignore(s);let c=await this.tokenizer.readToken(new Rb(g));io(`Chapter ${i+1}: ${c}`);let I={title:c,timeScale:t.media.header?t.media.header.timeScale:0,start:A,sampleOffset:this.findSampleOffset(o,this.tokenizer.position)};io(`Chapter title=${I.title}, offset=${I.sampleOffset}/${o.header.duration}`),e.push(I)}this.metadata.setFormat("chapters",e),await this.tokenizer.ignore(a)}findSampleOffset(t,o){let a=0;for(;a=o[a].firstChunk&&t{one={parserType:"mp4",extensions:[".mp4",".m4a",".m4b",".m4pa","m4v","m4r","3gp",".mov",".movie",".qt"],mimeTypes:["audio/mp4","audio/m4a","video/m4v","video/mp4","video/quicktime"],async load(){return(await Promise.resolve().then(()=>(ane(),ine))).MP4Parser}}});var Ine,sne,DVe,gne,cne,Lb,lne=ue(()=>{DA();Ine=ze(lt(),1);sr();sne=(0,Ine.default)("music-metadata:parser:musepack:sv8"),DVe=new We(2,"latin1"),gne={len:5,get:(n,t)=>({crc:Le.get(n,t),streamVersion:QA.get(n,t+4)})},cne={len:2,get:(n,t)=>({sampleFrequency:[44100,48e3,37800,32e3][XA(n,t,0,3)],maxUsedBands:XA(n,t,3,5),channelCount:XA(n,t+1,0,4)+1,msUsed:Hi(n,t+1,4),audioBlockFrames:XA(n,t+1,5,3)})},Lb=class{get tokenizer(){return this._tokenizer}set tokenizer(t){this._tokenizer=t}constructor(t){this._tokenizer=t}async readPacketHeader(){let t=await this.tokenizer.readToken(DVe),o=await this.readVariableSizeField();return{key:t,payloadLength:o.value-2-o.len}}async readStreamHeader(t){let o={};sne(`Reading SH at offset=${this.tokenizer.position}`);let a=await this.tokenizer.readToken(gne);t-=gne.len,Object.assign(o,a),sne(`SH.streamVersion = ${a.streamVersion}`);let e=await this.readVariableSizeField();t-=e.len,o.sampleCount=e.value;let i=await this.readVariableSizeField();t-=i.len,o.beginningOfSilence=i.value;let A=await this.tokenizer.readToken(cne);return t-=cne.len,Object.assign(o,A),await this.tokenizer.ignore(t),o}async readVariableSizeField(t=1,o=0){let a=await this.tokenizer.readNumber(QA);return(a&128)===0?{len:t,value:o+a}:(a&=127,a+=o,this.readVariableSizeField(t+1,a<<7))}}});var lc,Ub=ue(()=>{nr();lc=class extends St("Musepack"){}});var dne,bVe,Hb,pne=ue(()=>{dne=ze(lt(),1);to();pd();Da();lne();Ub();bVe=(0,dne.default)("music-metadata:parser:musepack"),Hb=class extends Lt{constructor(){super(...arguments),this.audioLength=0}async parse(){if(await this.tokenizer.readToken(at)!=="MPCK")throw new lc("Invalid Magic number");return this.metadata.setFormat("container","Musepack, SV8"),this.parsePacket()}async parsePacket(){let t=new Lb(this.tokenizer);do{let o=await t.readPacketHeader();switch(bVe(`packet-header key=${o.key}, payloadLength=${o.payloadLength}`),o.key){case"SH":{let a=await t.readStreamHeader(o.payloadLength);this.metadata.setFormat("numberOfSamples",a.sampleCount),this.metadata.setFormat("sampleRate",a.sampleFrequency),this.metadata.setFormat("duration",a.sampleCount/a.sampleFrequency),this.metadata.setFormat("numberOfChannels",a.channelCount);break}case"AP":this.audioLength+=o.payloadLength,await this.tokenizer.ignore(o.payloadLength);break;case"RG":case"EI":case"SO":case"ST":case"CT":await this.tokenizer.ignore(o.payloadLength);break;case"SE":return this.metadata.format.duration&&this.metadata.setFormat("bitrate",this.audioLength*8/this.metadata.format.duration),dd(this.metadata,this.tokenizer,this.options);default:throw new lc(`Unexpected header: ${o.key}`)}}while(!0)}}});var Kb,hne=ue(()=>{DA();Kb=class{constructor(t){this.pos=0,this.dword=null,this.tokenizer=t}async read(t){for(;this.dword===null;)this.dword=await this.tokenizer.readToken(Le);let o=this.dword;return this.pos+=t,this.pos<32?(o>>>=32-this.pos,o&(1<>>32-this.pos),o&(1<0){let e=32-this.pos;this.dword=null,t-=e,this.pos=0}let o=t%32,a=(t-o)/32;return await this.tokenizer.ignore(a*4),this.read(o)}}});var Ene,une=ue(()=>{DA();sr();Zs();Ene={len:24,get:(n,t)=>{let o={signature:Tr(n.subarray(t,t+3),"latin1"),streamMinorVersion:XA(n,t+3,0,4),streamMajorVersion:XA(n,t+3,4,4),frameCount:Le.get(n,t+4),maxLevel:SA.get(n,t+8),sampleFrequency:[44100,48e3,37800,32e3][XA(n,t+10,0,2)],link:XA(n,t+10,2,2),profile:XA(n,t+10,4,4),maxBand:XA(n,t+11,0,6),intensityStereo:Hi(n,t+11,6),midSideStereo:Hi(n,t+11,7),titlePeak:SA.get(n,t+12),titleGain:SA.get(n,t+14),albumPeak:SA.get(n,t+16),albumGain:SA.get(n,t+18),lastFrameLength:Le.get(n,t+20)>>>20&2047,trueGapless:Hi(n,t+23,0)};return o.lastFrameLength=o.trueGapless?Le.get(n,20)>>>20&2047:0,o}}});var Bne,Cne,xb,fne=ue(()=>{Bne=ze(lt(),1);to();pd();hne();une();Ub();Cne=(0,Bne.default)("music-metadata:parser:musepack"),xb=class extends Lt{constructor(){super(...arguments),this.bitreader=null,this.audioLength=0,this.duration=null}async parse(){let t=await this.tokenizer.readToken(Ene);if(t.signature!=="MP+")throw new lc("Unexpected magic number");Cne(`stream-version=${t.streamMajorVersion}.${t.streamMinorVersion}`),this.metadata.setFormat("container","Musepack, SV7"),this.metadata.setFormat("sampleRate",t.sampleFrequency);let o=1152*(t.frameCount-1)+t.lastFrameLength;this.metadata.setFormat("numberOfSamples",o),this.duration=o/t.sampleFrequency,this.metadata.setFormat("duration",this.duration),this.bitreader=new Kb(this.tokenizer),this.metadata.setFormat("numberOfChannels",t.midSideStereo||t.intensityStereo?2:1);let a=await this.bitreader.read(8);return this.metadata.setFormat("codec",(a/100).toFixed(2)),await this.skipAudioData(t.frameCount),Cne(`End of audio stream, switching to APEv2, offset=${this.tokenizer.position}`),dd(this.metadata,this.tokenizer,this.options)}async skipAudioData(t){for(;t-- >0;){let a=await this.bitreader.read(20);this.audioLength+=20+a,await this.bitreader.ignore(a)}let o=await this.bitreader.read(11);this.audioLength+=o,this.duration!==null&&this.metadata.setFormat("bitrate",this.audioLength/this.duration)}}});var mne={};Ur(mne,{MusepackParser:()=>WU});var yne,Qne,WU,Sne=ue(()=>{yne=ze(lt(),1);DA();Pf();pne();fne();Ub();Qne=(0,yne.default)("music-metadata:parser:musepack"),WU=class extends ag{async postId3v2Parse(){let t=await this.tokenizer.peekToken(new We(3,"latin1")),o;switch(t){case"MP+":{Qne("Stream-version 7"),o=new xb(this.metadata,this.tokenizer,this.options);break}case"MPC":{Qne("Stream-version 8"),o=new Hb(this.metadata,this.tokenizer,this.options);break}default:throw new lc("Invalid signature prefix")}return this.metadata.setAudioOnly(),o.parse()}}});var wne,Dne=ue(()=>{wne={parserType:"musepack",extensions:[".mpc"],mimeTypes:["audio/musepack"],async load(){return(await Promise.resolve().then(()=>(Sne(),mne))).MusepackParser}}});var Wf,Yb,ZU=ue(()=>{DA();nr();Wf=class extends St("Opus"){},Yb=class{constructor(t){if(t<19)throw new Wf("ID-header-page 0 should be at least 19 bytes long");this.len=t}get(t,o){return{magicSignature:new We(8,"ascii").get(t,o+0),version:QA.get(t,o+8),channelCount:QA.get(t,o+9),preSkip:SA.get(t,o+10),inputSampleRate:Le.get(t,o+12),outputGain:SA.get(t,o+16),channelMapping:QA.get(t,o+18)}}}});var jb,One=ue(()=>{DA();Kf();ZU();ZU();jb=class extends og{constructor(t,o,a){super(t,o),this.idHeader=null,this.lastPos=-1,this.tokenizer=a,this.durationOnLastPage=!0}parseFirstPage(t,o){if(this.metadata.setFormat("codec","Opus"),this.idHeader=new Yb(o.length).get(o,0),this.idHeader.magicSignature!=="OpusHead")throw new Wf("Illegal ogg/Opus magic-signature");this.metadata.setFormat("sampleRate",this.idHeader.inputSampleRate),this.metadata.setFormat("numberOfChannels",this.idHeader.channelCount),this.metadata.setAudioOnly()}async parseFullPage(t){switch(new We(8,"ascii").get(t,0)){case"OpusTags":await this.parseUserCommentList(t,8),this.lastPos=this.tokenizer.position-t.length;break;default:break}}calculateDuration(t){if(this.lastPageHeader&&(t||this.lastPageHeader.headerType.lastPage)&&this.metadata.format.sampleRate&&this.lastPageHeader.absoluteGranulePosition>=0){let o=this.lastPageHeader.absoluteGranulePosition-this.idHeader.preSkip;if(this.metadata.setFormat("numberOfSamples",o),this.metadata.setFormat("duration",o/48e3),this.lastPos!==-1&&this.tokenizer.fileInfo.size&&this.metadata.format.duration){let a=this.tokenizer.fileInfo.size-this.lastPos;this.metadata.setFormat("bitrate",8*a/this.metadata.format.duration)}}}}});var bne,Mne=ue(()=>{DA();sr();bne={len:80,get:(n,t)=>({speex:new We(8,"ascii").get(n,t+0),version:qO(new We(20,"ascii").get(n,t+8)),version_id:Cr.get(n,t+28),header_size:Cr.get(n,t+32),rate:Cr.get(n,t+36),mode:Cr.get(n,t+40),mode_bitstream_version:Cr.get(n,t+44),nb_channels:Cr.get(n,t+48),bitrate:Cr.get(n,t+52),frame_size:Cr.get(n,t+56),vbr:Cr.get(n,t+60),frames_per_packet:Cr.get(n,t+64),extra_headers:Cr.get(n,t+68),reserved1:Cr.get(n,t+72),reserved2:Cr.get(n,t+76)})}});var _ne,NVe,Jb,Tne=ue(()=>{_ne=ze(lt(),1);Kf();Mne();NVe=(0,_ne.default)("music-metadata:parser:ogg:speex"),Jb=class extends og{constructor(t,o,a){super(t,o)}parseFirstPage(t,o){NVe("First Ogg/Speex page");let a=bne.get(o,0);this.metadata.setFormat("codec",`Speex ${a.version}`),this.metadata.setFormat("numberOfChannels",a.nb_channels),this.metadata.setFormat("sampleRate",a.rate),a.bitrate!==-1&&this.metadata.setFormat("bitrate",a.bitrate),this.metadata.setAudioOnly()}}});var Nne,Rne=ue(()=>{DA();Nne={len:42,get:(n,t)=>({id:new We(7,"ascii").get(n,t),vmaj:QA.get(n,t+7),vmin:QA.get(n,t+8),vrev:QA.get(n,t+9),vmbw:LA.get(n,t+10),vmbh:LA.get(n,t+17),nombr:Fr.get(n,t+37),nqual:QA.get(n,t+40)})}});var vne,kne,qb,Pne=ue(()=>{vne=ze(lt(),1);Rne();kne=(0,vne.default)("music-metadata:parser:ogg:theora"),qb=class{constructor(t,o,a){this.durationOnLastPage=!1,this.metadata=t}async parsePage(t,o){t.headerType.firstPage&&await this.parseFirstPage(t,o)}calculateDuration(){kne("duration calculation not implemented")}async parseFirstPage(t,o){kne("First Ogg/Theora page"),this.metadata.setFormat("codec","Theora");let a=Nne.get(o,0);this.metadata.setFormat("bitrate",a.nombr),this.metadata.setFormat("hasVideo",!0)}flush(){return Promise.resolve()}}});var Gne,zb,Fne=ue(()=>{DA();sr();DA();Gne={len:27,get:(n,t)=>({capturePattern:new We(4,"latin1").get(n,t),version:QA.get(n,t+4),headerType:{continued:GA(n,t+5,0),firstPage:GA(n,t+5,1),lastPage:GA(n,t+5,2)},absoluteGranulePosition:Number(Lr.get(n,t+6)),streamSerialNumber:Le.get(n,t+14),pageSequenceNo:Le.get(n,t+18),pageChecksum:Le.get(n,t+22),page_segments:QA.get(n,t+26)})},zb=class n{static sum(t,o,a){let e=new DataView(t.buffer,0),i=0;for(let A=o;A{Lne=ze(lt(),1);UU();HU();Da();Bb();XU=(0,Lne.default)("music-metadata:parser:ogg:theora"),Vb=class{constructor(t,o,a){this.durationOnLastPage=!1,this.metadata=t,this.options=o,this.tokenizer=a,this.flacParser=new jf(this.metadata,this.tokenizer,o)}async parsePage(t,o){t.headerType.firstPage&&await this.parseFirstPage(t,o)}calculateDuration(){XU("duration calculation not implemented")}async parseFirstPage(t,o){if(XU("First Ogg/FLAC page"),(await at.get(o,9)).toString()!=="fLaC")throw new Error("Invalid FLAC preamble");let e=await xf.get(o,13);await this.parseDataBlock(e,o.subarray(13+xf.len))}async parseDataBlock(t,o){switch(XU(`blockHeader type=${t.type}, length=${t.length}`),t.type){case ba.STREAMINFO:{let a=Yf.get(o,0);return this.flacParser.processsStreamInfo(a)}case ba.PADDING:break;case ba.APPLICATION:break;case ba.SEEKTABLE:break;case ba.VORBIS_COMMENT:return this.flacParser.parseComment(o);case ba.PICTURE:if(!this.options.skipCovers){let a=new GI(o.length).get(o,0);return this.flacParser.addPictureTag(a)}break;default:this.metadata.addWarning(`Unknown block type: ${t.type}`)}return this.tokenizer.ignore(t.length).then()}flush(){return Promise.resolve()}}});var Kne={};Ur(Kne,{OggContentError:()=>ME,OggParser:()=>eH});var Hne,ME,sg,$U,eH,xne=ue(()=>{DA();sn();Hne=ze(lt(),1);to();Kf();One();Tne();Pne();nr();Fne();Une();ME=class extends St("Ogg"){},sg=(0,Hne.default)("music-metadata:parser:ogg"),$U=class{constructor(t,o,a){this.pageNumber=0,this.closed=!1,this.metadata=t,this.streamSerial=o,this.options=a}async parsePage(t,o){this.pageNumber=o.pageSequenceNo,sg("serial=%s page#=%s, Ogg.id=%s",o.streamSerialNumber,o.pageSequenceNo,o.capturePattern);let a=await t.readToken(new zb(o));sg("totalPageSize=%s",a.totalPageSize);let e=await t.readToken(new Mt(a.totalPageSize));if(sg("firstPage=%s, lastPage=%s, continued=%s",o.headerType.firstPage,o.headerType.lastPage,o.headerType.continued),o.headerType.firstPage){this.metadata.setFormat("container","Ogg");let i=e.subarray(0,7),A=Array.from(i).filter(r=>r>=32&&r<=126).map(r=>String.fromCharCode(r)).join("");switch(A){case"vorbis":sg(`Set Ogg stream serial ${o.streamSerialNumber}, codec=Vorbis`),this.pageConsumer=new og(this.metadata,this.options);break;case"OpusHea":sg("Set page consumer to Ogg/Opus"),this.pageConsumer=new jb(this.metadata,this.options,t);break;case"Speex ":sg("Set page consumer to Ogg/Speex"),this.pageConsumer=new Jb(this.metadata,this.options,t);break;case"fishead":case"theora":sg("Set page consumer to Ogg/Theora"),this.pageConsumer=new qb(this.metadata,this.options,t);break;case"FLAC":sg("Set page consumer to Vorbis"),this.pageConsumer=new Vb(this.metadata,this.options,t);break;default:throw new ME(`Ogg codec not recognized (id=${A}`)}}if(o.headerType.lastPage&&(this.closed=!0),this.pageConsumer)await this.pageConsumer.parsePage(o,e);else throw new Error("pageConsumer should be initialized")}},eH=class extends Lt{constructor(){super(...arguments),this.streams=new Map}async parse(){this.streams=new Map;let t=!1,o;try{do{if(o=await this.tokenizer.readToken(Gne),o.capturePattern!=="OggS")throw new ME("Invalid Ogg capture pattern");let a=this.streams.get(o.streamSerialNumber);if(a||(a=new $U(this.metadata,o.streamSerialNumber,this.options),this.streams.set(o.streamSerialNumber,a)),await a.parsePage(this.tokenizer,o),a.pageNumber>12&&!(this.options.duration&&[...this.streams.values()].find(e=>e.pageConsumer?.durationOnLastPage))){sg("Stop processing Ogg stream");break}}while(![...this.streams.values()].every(a=>a.closed))}catch(a){if(a instanceof kA)sg("Reached end-of-stream"),t=!0;else if(a instanceof ME)this.metadata.addWarning(`Corrupt Ogg content at ${this.tokenizer.position}`);else throw a}for(let a of this.streams.values())a.closed||(this.metadata.addWarning(`End-of-stream reached before reaching last page in Ogg stream serial=${a.streamSerial}`),await a.pageConsumer?.flush()),a.pageConsumer?.calculateDuration(t)}}});var Yne,jne=ue(()=>{Yne={parserType:"ogg",extensions:[".ogg",".ogv",".oga",".ogm",".ogx",".opus",".spx"],mimeTypes:["audio/ogg","audio/opus","audio/speex","video/ogg"],async load(){return(await Promise.resolve().then(()=>(xne(),Kne))).OggParser}}});function gg(n,t){return Wb(n,t,1)===1}function Wb(n,t,o){return n>>>t&4294967295>>>32-o}var RVe,Zf,Zb,Jne=ue(()=>{DA();Da();RVe=[6e3,8e3,9600,11025,12e3,16e3,22050,24e3,32e3,44100,48e3,64e3,88200,96e3,192e3,-1],Zf={len:32,get:(n,t)=>{let o=Le.get(n,t+24),a={BlockID:at.get(n,t),blockSize:Le.get(n,t+4),version:SA.get(n,t+8),totalSamples:Le.get(n,t+12),blockIndex:Le.get(n,t+16),blockSamples:Le.get(n,t+20),flags:{bitsPerSample:(1+Wb(o,0,2))*8,isMono:gg(o,2),isHybrid:gg(o,3),isJointStereo:gg(o,4),crossChannel:gg(o,5),hybridNoiseShaping:gg(o,6),floatingPoint:gg(o,7),samplingRate:RVe[Wb(o,23,4)],isDSD:gg(o,31)},crc:new Mt(4).get(n,t+28)};return a.flags.isDSD&&(a.totalSamples*=8),a}},Zb={len:1,get:(n,t)=>({functionId:Wb(n[t],0,6),isOptional:gg(n[t],5),isOddSize:gg(n[t],6),largeBlock:gg(n[t],7)})}});var zne={};Ur(zne,{WavPackContentError:()=>_E,WavPackParser:()=>AH});var qne,Qd,_E,AH,Vne=ue(()=>{DA();pd();Da();to();Jne();qne=ze(lt(),1);Df();nr();Qd=(0,qne.default)("music-metadata:parser:WavPack"),_E=class extends St("WavPack"){},AH=class extends Lt{constructor(){super(...arguments),this.audioDataSize=0}async parse(){return this.metadata.setAudioOnly(),this.audioDataSize=0,await this.parseWavPackBlocks(),dd(this.metadata,this.tokenizer,this.options)}async parseWavPackBlocks(){do{if(await this.tokenizer.peekToken(at)!=="wvpk")break;let o=await this.tokenizer.readToken(Zf);if(o.BlockID!=="wvpk")throw new _E("Invalid WavPack Block-ID");Qd(`WavPack header blockIndex=${o.blockIndex}, len=${Zf.len}`),o.blockIndex===0&&!this.metadata.format.container&&(this.metadata.setFormat("container","WavPack"),this.metadata.setFormat("lossless",!o.flags.isHybrid),this.metadata.setFormat("bitsPerSample",o.flags.bitsPerSample),o.flags.isDSD||(this.metadata.setFormat("sampleRate",o.flags.samplingRate),this.metadata.setFormat("duration",o.totalSamples/o.flags.samplingRate)),this.metadata.setFormat("numberOfChannels",o.flags.isMono?1:2),this.metadata.setFormat("numberOfSamples",o.totalSamples),this.metadata.setFormat("codec",o.flags.isDSD?"DSD":"PCM"));let a=o.blockSize-(Zf.len-8);await(o.blockIndex===0?this.parseMetadataSubBlock(o,a):this.tokenizer.ignore(a)),o.blockSamples>0&&(this.audioDataSize+=o.blockSize)}while(!this.tokenizer.fileInfo.size||this.tokenizer.fileInfo.size-this.tokenizer.position>=Zf.len);this.metadata.format.duration&&this.metadata.setFormat("bitrate",this.audioDataSize*8/this.metadata.format.duration)}async parseMetadataSubBlock(t,o){let a=o;for(;a>Zb.len;){let e=await this.tokenizer.readToken(Zb),i=await this.tokenizer.readNumber(e.largeBlock?yf:QA),A=new Uint8Array(i*2-(e.isOddSize?1:0));switch(await this.tokenizer.readBuffer(A),Qd(`Metadata Sub-Blocks functionId=0x${e.functionId.toString(16)}, id.largeBlock=${e.largeBlock},data-size=${A.length}`),e.functionId){case 0:break;case 14:{Qd("ID_DSD_BLOCK");let r=1<{Wne={parserType:"wavpack",extensions:[".wv",".wvp"],mimeTypes:["audio/wavpack"],async load(){return(await Promise.resolve().then(()=>(Vne(),zne))).WavPackParser}}});var TE,Xb,Xne=ue(()=>{DA();TE={len:8,get:(n,t)=>({chunkID:new We(4,"latin1").get(n,t),chunkSize:Le.get(n,t+4)})},Xb=class{constructor(t){this.tagHeader=t,this.len=t.chunkSize,this.len+=this.len&1}get(t,o){return new We(this.tagHeader.chunkSize,"ascii").get(t,o)}}});var yd,Si,$ne,$b,eM,tH=ue(()=>{DA();nr();yd=class extends St("Wave"){},Si={PCM:1,ADPCM:2,IEEE_FLOAT:3,ALAW:6,MULAW:7,DVI_ADPCM:17,GSM610:49,MPEG_ADTS_AAC:5632,MPEG_LOAS:5634,RAW_AAC1:255,DOLBY_AC3_SPDIF:146,DVM:8192,RAW_SPORT:576,ESST_AC3:577,DRM:9,DTS2:8193,MPEG:80,MPEGLAYER3:85},$ne={[Si.PCM]:"PCM",[Si.ADPCM]:"ADPCM",[Si.IEEE_FLOAT]:"IEEE_FLOAT",[Si.ALAW]:"ALAW",[Si.MULAW]:"MULAW",[Si.DVI_ADPCM]:"DVI_ADPCM",[Si.GSM610]:"GSM610",[Si.MPEG_ADTS_AAC]:"MPEG_ADTS_AAC",[Si.MPEG_LOAS]:"MPEG_LOAS",[Si.RAW_AAC1]:"RAW_AAC1",[Si.DOLBY_AC3_SPDIF]:"DOLBY_AC3_SPDIF",[Si.DVM]:"DVM",[Si.RAW_SPORT]:"RAW_SPORT",[Si.ESST_AC3]:"ESST_AC3",[Si.DRM]:"DRM",[Si.DTS2]:"DTS2",[Si.MPEG]:"MPEG",[Si.MPEGLAYER3]:"MPEGLAYER3"},$b=class{constructor(t){if(t.chunkSize<16)throw new yd("Invalid chunk size");this.len=t.chunkSize}get(t,o){return{wFormatTag:SA.get(t,o),nChannels:SA.get(t,o+2),nSamplesPerSec:Le.get(t,o+4),nAvgBytesPerSec:Le.get(t,o+8),nBlockAlign:SA.get(t,o+12),wBitsPerSample:SA.get(t,o+14)}}},eM=class{constructor(t){if(t.chunkSize<4)throw new yd("Invalid fact chunk size.");this.len=t.chunkSize}get(t,o){return{dwSampleLength:Le.get(t,o)}}}});var rH,ese=ue(()=>{DA();sr();rH={len:420,get:(n,t)=>({description:ln(new We(256,"ascii").get(n,t)).trim(),originator:ln(new We(32,"ascii").get(n,t+256)).trim(),originatorReference:ln(new We(32,"ascii").get(n,t+288)).trim(),originationDate:ln(new We(10,"ascii").get(n,t+320)).trim(),originationTime:ln(new We(8,"ascii").get(n,t+330)).trim(),timeReferenceLow:Le.get(n,t+338),timeReferenceHigh:Le.get(n,t+342),version:SA.get(n,t+346),umid:new Mt(64).get(n,t+348),loudnessValue:SA.get(n,t+412),maxTruePeakLevel:SA.get(n,t+414),maxMomentaryLoudness:SA.get(n,t+416),maxShortTermLoudness:SA.get(n,t+418)})}});var tse={};Ur(tse,{WaveParser:()=>iH});var Ase,FI,iH,rse=ue(()=>{sn();DA();Ase=ze(lt(),1);Xne();tH();hE();sr();Da();to();ese();tH();FI=(0,Ase.default)("music-metadata:parser:RIFF"),iH=class extends Lt{constructor(){super(...arguments),this.blockAlign=0,this.avgBytesPerSec=0}async parse(){let t=await this.tokenizer.readToken(TE);if(FI(`pos=${this.tokenizer.position}, parse: chunkID=${t.chunkID}`),t.chunkID==="RIFF")return this.metadata.setAudioOnly(),this.parseRiffChunk(t.chunkSize).catch(o=>{if(!(o instanceof kA))throw o})}async parseRiffChunk(t){let o=await this.tokenizer.readToken(at);switch(this.metadata.setFormat("container",o),o){case"WAVE":return this.readWaveChunk(t-at.len);default:throw new yd(`Unsupported RIFF format: RIFF/${o}`)}}async readWaveChunk(t){for(;t>=TE.len;){let o=await this.tokenizer.readToken(TE);switch(t-=TE.len+o.chunkSize,o.chunkSize>t&&this.metadata.addWarning("Data chunk size exceeds file size"),this.header=o,FI(`pos=${this.tokenizer.position}, readChunk: chunkID=RIFF/WAVE/${o.chunkID}`),o.chunkID){case"LIST":await this.parseListTag(o);break;case"fact":this.metadata.setFormat("lossless",!1),this.fact=await this.tokenizer.readToken(new eM(o));break;case"fmt ":{let a=await this.tokenizer.readToken(new $b(o)),e=$ne[a.wFormatTag];e||(FI(`WAVE/non-PCM format=${a.wFormatTag}`),e=`non-PCM (${a.wFormatTag})`),this.metadata.setFormat("codec",e),this.metadata.setFormat("bitsPerSample",a.wBitsPerSample),this.metadata.setFormat("sampleRate",a.nSamplesPerSec),this.metadata.setFormat("numberOfChannels",a.nChannels),this.blockAlign=a.nBlockAlign,this.avgBytesPerSec=a.nAvgBytesPerSec;break}case"id3 ":case"ID3 ":{let a=await this.tokenizer.readToken(new Mt(o.chunkSize)),e=So(a);await new hn().parse(this.metadata,e,this.options);break}case"data":{this.metadata.format.lossless!==!1&&this.metadata.setFormat("lossless",!0);let a=o.chunkSize;if(this.tokenizer.fileInfo.size){let i=this.tokenizer.fileInfo.size-this.tokenizer.position;i0?this.metadata.setFormat("bitrate",this.avgBytesPerSec*8):this.metadata.format.duration&&this.metadata.setFormat("bitrate",a*8/this.metadata.format.duration),await this.tokenizer.ignore(o.chunkSize);break}case"bext":{let a=await this.tokenizer.readToken(rH);Object.keys(a).forEach(i=>{this.metadata.addTag("exif",`bext.${i}`,a[i])});let e=o.chunkSize-rH.len;await this.tokenizer.ignore(e);break}case"\0\0\0\0":FI(`Ignore padding chunk: RIFF/${o.chunkID} of ${o.chunkSize} bytes`),this.metadata.addWarning(`Ignore chunk: RIFF/${o.chunkID}`),await this.tokenizer.ignore(o.chunkSize);break;default:FI(`Ignore chunk: RIFF/${o.chunkID} of ${o.chunkSize} bytes`),this.metadata.addWarning(`Ignore chunk: RIFF/${o.chunkID}`),await this.tokenizer.ignore(o.chunkSize)}this.header.chunkSize%2===1&&(FI("Read odd padding byte"),await this.tokenizer.ignore(1))}}async parseListTag(t){let o=await this.tokenizer.readToken(new We(4,"latin1"));switch(FI("pos=%s, parseListTag: chunkID=RIFF/WAVE/LIST/%s",this.tokenizer.position,o),o){case"INFO":return this.parseRiffInfoTags(t.chunkSize-4);default:return this.metadata.addWarning(`Ignore chunk: RIFF/WAVE/LIST/${o}`),FI(`Ignoring chunkID=RIFF/WAVE/LIST/${o}`),this.tokenizer.ignore(t.chunkSize-4).then()}}async parseRiffInfoTags(t){for(;t>=8;){let o=await this.tokenizer.readToken(TE),a=new Xb(o),e=await this.tokenizer.readToken(a);this.addTag(o.chunkID,ln(e)),t-=8+a.len}if(t!==0)throw new yd(`Illegal remaining size: ${t}`)}addTag(t,o){this.metadata.addTag("exif",t,o)}}});var ise,ase=ue(()=>{ise={parserType:"riff",extensions:[".wav","wave",".bwf"],mimeTypes:["audio/vnd.wave","audio/wav","audio/wave"],async load(){return(await Promise.resolve().then(()=>(rse(),tse))).WaveParser}}});function PVe(n){let t=ose.default.parse(n),o=Wie(t.type);return{type:o.type,subtype:o.subtype,suffix:o.suffix,parameters:t.parameters}}function GVe(n){let t=n.lastIndexOf(".");return t===-1?"":n.substring(t)}var ose,nse,md,Sd,aH=ue(()=>{oU();ose=ze(Vie(),1);Zie();nse=ze(lt(),1);Bae();Id();Jae();nr();zae();noe();doe();foe();boe();voe();joe();nne();Dne();jne();Zne();ase();AM();md=(0,nse.default)("music-metadata:parser:factory");Sd=class{constructor(){this.parsers=[],[koe,jae,qae,one,Yoe,ise,Yne,ooe,Boe,Wne,wne,Ooe,loe].forEach(t=>{this.registerParser(t)})}registerParser(t){this.parsers.push(t)}async parse(t,o,a){if(t.supportsRandomAccess()?(md("tokenizer supports random-access, scanning for appending headers"),await oH(t,a)):md("tokenizer does not support random-access, cannot scan for appending headers"),!o){let r=new Uint8Array(4100);if(t.fileInfo.mimeType&&(o=this.findLoaderForContentType(t.fileInfo.mimeType)),!o&&t.fileInfo.path&&(o=this.findLoaderForExtension(t.fileInfo.path)),!o){md("Guess parser on content..."),await t.peekBuffer(r,{mayBeLess:!0});let s=await Mf(r,{mpegOffsetTolerance:10});if(!s||!s.mime)throw new bI("Failed to determine audio format");if(md(`Guessed file type is mime=${s.mime}, extension=${s.ext}`),o=this.findLoaderForContentType(s.mime),!o)throw new MI(`Guessed MIME-type not supported: ${s.mime}`)}}md(`Loading ${o.parserType} parser...`);let e=new ob(a),i=await o.load(),A=new i(e,t,a??{});return md(`Parser ${o.parserType} loaded`),await A.parse(),e.format.trackInfo&&(e.format.hasAudio===void 0&&e.setFormat("hasAudio",!!e.format.trackInfo.find(r=>r.type===yi.audio)),e.format.hasVideo===void 0&&e.setFormat("hasVideo",!!e.format.trackInfo.find(r=>r.type===yi.video))),e.toCommonMetadata()}findLoaderForExtension(t){if(!t)return;let o=GVe(t).toLocaleLowerCase()||t;return this.parsers.find(a=>a.extensions.indexOf(o)!==-1)}findLoaderForContentType(t){let o;if(!t)return;try{o=PVe(t)}catch{md(`Invalid HTTP Content-Type header value: ${t}`);return}let a=o.subtype.indexOf("x-")===0?o.subtype.substring(2):o.subtype;return this.parsers.find(e=>e.mimeTypes.find(i=>i.indexOf(`${o.type}/${a}`)!==-1))}getSupportedMimeTypes(){let t=new Set;return this.parsers.forEach(o=>{o.mimeTypes.forEach(a=>{t.add(a),t.add(a.replace("/","/x-"))})}),Array.from(t)}}});async function sse(n){let t=n.fileInfo.size;if(t>=143){let o=new Uint8Array(15),a=n.position;await n.readBuffer(o,{position:t-143}),n.setPosition(a);let e=Tr(o,"latin1");if(e.substring(6)===FVe)return Number.parseInt(e.substring(0,6),10)+15}return 0}var FVe,gse=ue(()=>{Zs();FVe="LYRICS200"});async function LVe(n,t={}){let o=PO(n);try{return await NE(o,t)}finally{await o.close()}}async function UVe(n,t,o={}){let a=vO(n,{fileInfo:typeof t=="string"?{mimeType:t}:t});try{return await NE(a,o)}finally{await a.close()}}async function HVe(n,t,o={}){let a=So(n,{fileInfo:typeof t=="string"?{mimeType:t}:t});return NE(a,o)}function NE(n,t){return new Sd().parse(n,void 0,t)}function KVe(n){let t={};for(let{id:o,value:a}of n)(t[o]||(t[o]=[])).push(a);return t}function xVe(n){return n===void 0?0:1+Math.round(n*4)}function YVe(n){return n?n.reduce((t,o)=>o.name&&o.name.toLowerCase()in["front","cover","cover (front)"]?o:t):null}async function oH(n,t={}){let o=n.fileInfo.size;if(await bae(n)){o-=128;let a=await sse(n);o-=a}t.apeHeader=await NI.findApeFooterOffset(n,o)}function jVe(){return new Sd().getSupportedMimeTypes()}var AM=ue(()=>{sn();aH();pd();Rf();gse();Id();nr();nr()});var lse={};Ur(lse,{CouldNotDetermineFileTypeError:()=>bI,FieldDecodingError:()=>In,InternalParserError:()=>cd,LyricsContentType:()=>gE,TimestampFormat:()=>cE,UnsupportedFileTypeError:()=>MI,getSupportedMimeTypes:()=>jVe,makeParseError:()=>nE,makeUnexpectedFileContentError:()=>St,orderTags:()=>KVe,parseBlob:()=>LVe,parseBuffer:()=>HVe,parseFile:()=>qVe,parseFromTokenizer:()=>NE,parseStream:()=>JVe,parseWebStream:()=>UVe,ratingToStars:()=>xVe,scanAppendingHeaders:()=>oH,selectCover:()=>YVe});async function JVe(n,t,o={}){let a=await J2(n,{fileInfo:typeof t=="string"?{mimeType:t}:t});try{return await NE(a,o)}finally{await a.close()}}async function qVe(n,t={}){cse(`parseFile: ${n}`);let o=await gie(n),a=new Sd;try{let e=a.findLoaderForExtension(n);e||cse("Parser could not be determined by file extension");try{return await a.parse(o,e,t)}catch(i){throw(i instanceof bI||i instanceof MI)&&(i.message+=`: ${n}`),i}}finally{await o.close()}}var Ise,cse,dse=ue(()=>{sn();Ise=ze(lt(),1);AM();aH();AM();cse=(0,Ise.default)("music-metadata:parser")});var Oge=ee((vPA,UH)=>{"use strict";var t6e=Object.prototype.hasOwnProperty,Ma="~";function cQ(){}Object.create&&(cQ.prototype=Object.create(null),new cQ().__proto__||(Ma=!1));function r6e(n,t,o){this.fn=n,this.context=t,this.once=o||!1}function Dge(n,t,o,a,e){if(typeof o!="function")throw new TypeError("The listener must be a function");var i=new r6e(o,a||n,e),A=Ma?Ma+t:t;return n._events[A]?n._events[A].fn?n._events[A]=[n._events[A],i]:n._events[A].push(i):(n._events[A]=i,n._eventsCount++),n}function hM(n,t){--n._eventsCount===0?n._events=new cQ:delete n._events[t]}function Ia(){this._events=new cQ,this._eventsCount=0}Ia.prototype.eventNames=function(){var t=[],o,a;if(this._eventsCount===0)return t;for(a in o=this._events)t6e.call(o,a)&&t.push(Ma?a.slice(1):a);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o)):t};Ia.prototype.listeners=function(t){var o=Ma?Ma+t:t,a=this._events[o];if(!a)return[];if(a.fn)return[a.fn];for(var e=0,i=a.length,A=new Array(i);e{"use strict";var pQ=n=>n&&typeof n.message=="string",eK=n=>{if(!n)return;let t=n.cause;if(typeof t=="function"){let o=n.cause();return pQ(o)?o:void 0}else return pQ(t)?t:void 0},Ace=(n,t)=>{if(!pQ(n))return"";let o=n.stack||"";if(t.has(n))return o+` +`),syncText:o}}var uU,fae=ue(()=>{Id();uU=/\[(\d{2}):(\d{2})\.(\d{2,3})]/});function iVe(n){return n.length>2?`${n.slice(0,n.length-1).join(", ")} & ${n[n.length-1]}`:n.join(" & ")}var Qae,ld,rVe,nb,yae=ue(()=>{Id();Qae=ze(lt(),1);nae();Cae();cc();sr();oU();fae();ld=(0,Qae.default)("music-metadata:collector"),rVe=["matroska","APEv2","vorbis","ID3v2.4","ID3v2.3","ID3v2.2","exif","asf","iTunes","AIFF","ID3v1"],nb=class{constructor(t){this.format={tagTypes:[],trackInfo:[]},this.native={},this.common={track:{no:null,of:null},disk:{no:null,of:null},movementIndex:{no:null,of:null}},this.quality={warnings:[]},this.commonOrigin={},this.originPriority={},this.tagMapper=new ob,this.opts=t;let o=1;for(let a of rVe)this.originPriority[a]=o++;this.originPriority.artificial=500,this.originPriority.id3v1=600}hasAny(){return Object.keys(this.native).length>0}addStreamInfo(t){ld(`streamInfo: type=${t.type?cU[t.type]:"?"}, codec=${t.codecName}`),this.format.trackInfo.push(t)}setFormat(t,o){ld(`format: ${t} = ${o}`),this.format[t]=o,this.opts?.observer&&this.opts.observer({metadata:this,tag:{type:"format",id:t,value:o}})}setAudioOnly(){this.setFormat("hasAudio",!0),this.setFormat("hasVideo",!1)}async addTag(t,o,a){ld(`tag ${t}.${o} = ${a}`),this.native[t]||(this.format.tagTypes.push(t),this.native[t]=[]),this.native[t].push({id:o,value:a}),await this.toCommon(t,o,a)}addWarning(t){this.quality.warnings.push({message:t})}async postMap(t,o){switch(o.id){case"artist":return this.handleSingularArtistTag(t,o,"artist","artists");case"albumartist":return this.handleSingularArtistTag(t,o,"albumartist","albumartists");case"artists":return this.handlePluralArtistTag(t,o,"artist","artists");case"albumartists":return this.handlePluralArtistTag(t,o,"albumartist","albumartists");case"picture":return this.postFixPicture(o.value).then(a=>{a!==null&&(o.value=a,this.setGenericTag(t,o))});case"totaltracks":this.common.track.of=Br.toIntOrNull(o.value);return;case"totaldiscs":this.common.disk.of=Br.toIntOrNull(o.value);return;case"movementTotal":this.common.movementIndex.of=Br.toIntOrNull(o.value);return;case"track":case"disk":case"movementIndex":{let a=this.common[o.id].of;this.common[o.id]=Br.normalizeTrack(o.value),this.common[o.id].of=a??this.common[o.id].of;return}case"bpm":case"year":case"originalyear":o.value=Number.parseInt(o.value,10);break;case"date":{let a=Number.parseInt(o.value.substr(0,4),10);Number.isNaN(a)||(this.common.year=a);break}case"discogs_label_id":case"discogs_release_id":case"discogs_master_release_id":case"discogs_artist_id":case"discogs_votes":o.value=typeof o.value=="string"?Number.parseInt(o.value,10):o.value;break;case"replaygain_track_gain":case"replaygain_track_peak":case"replaygain_album_gain":case"replaygain_album_peak":o.value=iae(o.value);break;case"replaygain_track_minmax":o.value=o.value.split(",").map(a=>Number.parseInt(a,10));break;case"replaygain_undo":{let a=o.value.split(",").map(e=>Number.parseInt(e,10));o.value={leftChannel:a[0],rightChannel:a[1]};break}case"gapless":case"compilation":case"podcast":case"showMovement":o.value=o.value==="1"||o.value===1;break;case"isrc":{let a=this.common[o.id];if(a&&a.indexOf(o.value)!==-1)return;break}case"comment":typeof o.value=="string"&&(o.value={text:o.value}),o.value.descriptor==="iTunPGAP"&&this.setGenericTag(t,{id:"gapless",value:o.value.text==="1"});break;case"lyrics":typeof o.value=="string"&&(o.value=Bae(o.value));break;default:}o.value!==null&&this.setGenericTag(t,o)}toCommonMetadata(){return{format:this.format,native:this.native,quality:this.quality,common:this.common}}handleSingularArtistTag(t,o,a,e){if(this.commonOrigin[a]===this.originPriority[t])return this.postMap("artificial",{id:e,value:o.value});this.common[e]||this.setGenericTag("artificial",{id:e,value:o.value}),this.setGenericTag(t,o)}handlePluralArtistTag(t,o,a,e){if((!this.common[a]||this.commonOrigin[a]===this.originPriority.artificial)&&(!this.common[e]||this.common[e].indexOf(o.value)===-1)){let i=(this.common[e]||[]).concat([o.value]),A=iVe(i);this.setGenericTag("artificial",{id:a,value:A})}this.setGenericTag(t,o)}async postFixPicture(t){if(t.data&&t.data.length>0){if(!t.format){let o=await Mf(Uint8Array.from(t.data));if(o)t.format=o.mime;else return null}switch(t.format=t.format.toLocaleLowerCase(),t.format){case"image/jpg":t.format="image/jpeg"}return t}return this.addWarning("Empty picture tag found"),null}async toCommon(t,o,a){let e={id:o,value:a},i=this.tagMapper.mapTag(t,e,this);i&&await this.postMap(t,i)}setGenericTag(t,o){ld(`common.${o.id} = ${o.value}`);let a=this.commonOrigin[o.id]||1e3,e=this.originPriority[t];if(aae(o.id))if(e<=a)this.common[o.id]=o.value,this.commonOrigin[o.id]=e;else return ld(`Ignore native tag (singleton): ${t}.${o.id} = ${o.value}`);else if(e===a)!oae(o.id)||this.common[o.id].indexOf(o.value)===-1?this.common[o.id].push(o.value):ld(`Ignore duplicate value: ${t}.${o.id} = ${o.value}`);else if(e{Lt=class{constructor(t,o,a){this.metadata=t,this.tokenizer=o,this.options=a}}});var aVe,at,Da=ue(()=>{Zs();sr();nr();aVe=/^[\x21-\x7e©][\x20-\x7e\x00()]{3}/,at={len:4,get:(n,t)=>{let o=Tr(n.subarray(t,t+at.len),"latin1");if(!o.match(aVe))throw new In(`FourCC contains invalid characters: ${rae(o)} "${o}"`);return o},put:(n,t,o)=>{let a=hie(o,"latin1");if(a.length!==4)throw new cd("Invalid length");return n.set(a,t),t+4}}});function Sae(n){return{containsHeader:sb(n,31),containsFooter:sb(n,30),isHeader:sb(n,29),readOnly:sb(n,0),dataType:(n&6)>>1}}function sb(n,t){return(n&1<{DA();Da();Nf={text_utf8:0,binary:1,external_info:2,reserved:3},CU={len:52,get:(n,t)=>({ID:at.get(n,t),version:Le.get(n,t+4)/1e3,descriptorBytes:Le.get(n,t+8),headerBytes:Le.get(n,t+12),seekTableBytes:Le.get(n,t+16),headerDataBytes:Le.get(n,t+20),apeFrameDataBytes:Le.get(n,t+24),apeFrameDataBytesHigh:Le.get(n,t+28),terminatingDataBytes:Le.get(n,t+32),fileMD5:new _t(16).get(n,t+36)})},mae={len:24,get:(n,t)=>({compressionLevel:SA.get(n,t),formatFlags:SA.get(n,t+2),blocksPerFrame:Le.get(n,t+4),finalFrameBlocks:Le.get(n,t+8),totalFrames:Le.get(n,t+12),bitsPerSample:SA.get(n,t+16),channel:SA.get(n,t+18),sampleRate:Le.get(n,t+20)})},ro={len:32,get:(n,t)=>({ID:new We(8,"ascii").get(n,t),version:Le.get(n,t+8),size:Le.get(n,t+12),fields:Le.get(n,t+16),flags:Sae(Le.get(n,t+20))})},gb={len:8,get:(n,t)=>({size:Le.get(n,t),flags:Sae(Le.get(n,t+4))})}});var Mae={};Ur(Mae,{APEv2Parser:()=>RI,ApeContentError:()=>dE,tryParseApeHeader:()=>dd});function dd(n,t,o){return new RI(n,t,o).tryParseApeHeader()}var bae,NI,Dae,Oae,dE,RI,pd=ue(()=>{bae=ze(lt(),1);sn();DA();sr();to();wae();nr();Zs();NI=(0,bae.default)("music-metadata:parser:APEv2"),Dae="APEv2",Oae="APETAGEX",dE=class extends St("APEv2"){};RI=class n extends Lt{constructor(){super(...arguments),this.ape={}}static calculateDuration(t){let o=t.totalFrames>1?t.blocksPerFrame*(t.totalFrames-1):0;return o+=t.finalFrameBlocks,o/t.sampleRate}static async findApeFooterOffset(t,o){let a=new Uint8Array(ro.len),e=t.position;if(o<=ro.len){NI(`Offset is too small to read APE footer: offset=${o}`);return}if(o>ro.len){await t.readBuffer(a,{position:o-ro.len}),t.setPosition(e);let i=ro.get(a,0);if(i.ID==="APETAGEX")return i.flags.isHeader?NI(`APE Header found at offset=${o-ro.len}`):(NI(`APE Footer found at offset=${o-ro.len}`),o-=i.size),{footer:i,offset:o}}}static parseTagFooter(t,o,a){let e=ro.get(o,o.length-ro.len);if(e.ID!==Oae)throw new dE("Unexpected APEv2 Footer ID preamble value");return So(o),new n(t,So(o),a).parseTags(e)}async tryParseApeHeader(){if(this.tokenizer.fileInfo.size&&this.tokenizer.fileInfo.size-this.tokenizer.position0?this.parseDescriptorExpansion(o):this.parseHeader());return this.metadata.setAudioOnly(),await this.tokenizer.ignore(a.forwardBytes),this.tryParseApeHeader()}async parseTags(t){let o=new Uint8Array(256),a=t.size-ro.len;NI(`Parse APE tags at offset=${this.tokenizer.position}, size=${a}`);for(let e=0;ethis.metadata.addTag(Dae,r,c)));break}case Nf.binary:if(this.options.skipCovers)await this.tokenizer.ignore(i.size);else{let s=new Uint8Array(i.size);await this.tokenizer.readBuffer(s),A=ig(s);let g=Tr(s.subarray(0,A),"utf-8"),c=s.subarray(A+1);await this.metadata.addTag(Dae,r,{description:g,data:c})}break;case Nf.external_info:NI(`Ignore external info ${r}`),await this.tokenizer.ignore(i.size);break;case Nf.reserved:NI(`Ignore external info ${r}`),this.metadata.addWarning(`APEv2 header declares a reserved datatype for "${r}"`),await this.tokenizer.ignore(i.size);break}}}async parseDescriptorExpansion(t){return await this.tokenizer.ignore(t),this.parseHeader()}async parseHeader(){let t=await this.tokenizer.readToken(mae);if(this.metadata.setFormat("lossless",!0),this.metadata.setFormat("container","Monkey's Audio"),this.metadata.setFormat("bitsPerSample",t.bitsPerSample),this.metadata.setFormat("sampleRate",t.sampleRate),this.metadata.setFormat("numberOfChannels",t.channel),this.metadata.setFormat("duration",n.calculateDuration(t)),!this.ape.descriptor)throw new dE("Missing APE descriptor");return{forwardBytes:this.ape.descriptor.seekTableBytes+this.ape.descriptor.headerDataBytes+this.ape.descriptor.apeFrameDataBytes+this.ape.descriptor.terminatingDataBytes}}}});async function Tae(n){if(n.fileInfo.size>=128){let t=new Uint8Array(3),o=n.position;return await n.readBuffer(t,{position:n.fileInfo.size-128}),n.setPosition(o),Tr(t,"latin1")==="TAG"}return!1}var _ae,cb,pE,Ib,kI,lb,Rf=ue(()=>{_ae=ze(lt(),1);DA();sr();to();pd();Zs();cb=(0,_ae.default)("music-metadata:parser:ID3v1"),pE=["Blues","Classic Rock","Country","Dance","Disco","Funk","Grunge","Hip-Hop","Jazz","Metal","New Age","Oldies","Other","Pop","R&B","Rap","Reggae","Rock","Techno","Industrial","Alternative","Ska","Death Metal","Pranks","Soundtrack","Euro-Techno","Ambient","Trip-Hop","Vocal","Jazz+Funk","Fusion","Trance","Classical","Instrumental","Acid","House","Game","Sound Clip","Gospel","Noise","Alt. Rock","Bass","Soul","Punk","Space","Meditative","Instrumental Pop","Instrumental Rock","Ethnic","Gothic","Darkwave","Techno-Industrial","Electronic","Pop-Folk","Eurodance","Dream","Southern Rock","Comedy","Cult","Gangsta Rap","Top 40","Christian Rap","Pop/Funk","Jungle","Native American","Cabaret","New Wave","Psychedelic","Rave","Showtunes","Trailer","Lo-Fi","Tribal","Acid Punk","Acid Jazz","Polka","Retro","Musical","Rock & Roll","Hard Rock","Folk","Folk/Rock","National Folk","Swing","Fast-Fusion","Bebob","Latin","Revival","Celtic","Bluegrass","Avantgarde","Gothic Rock","Progressive Rock","Psychedelic Rock","Symphonic Rock","Slow Rock","Big Band","Chorus","Easy Listening","Acoustic","Humour","Speech","Chanson","Opera","Chamber Music","Sonata","Symphony","Booty Bass","Primus","Porn Groove","Satire","Slow Jam","Club","Tango","Samba","Folklore","Ballad","Power Ballad","Rhythmic Soul","Freestyle","Duet","Punk Rock","Drum Solo","A Cappella","Euro-House","Dance Hall","Goa","Drum & Bass","Club-House","Hardcore","Terror","Indie","BritPop","Negerpunk","Polsk Punk","Beat","Christian Gangsta Rap","Heavy Metal","Black Metal","Crossover","Contemporary Christian","Christian Rock","Merengue","Salsa","Thrash Metal","Anime","JPop","Synthpop","Abstract","Art Rock","Baroque","Bhangra","Big Beat","Breakbeat","Chillout","Downtempo","Dub","EBM","Eclectic","Electro","Electroclash","Emo","Experimental","Garage","Global","IDM","Illbient","Industro-Goth","Jam Band","Krautrock","Leftfield","Lounge","Math Rock","New Romantic","Nu-Breakz","Post-Punk","Post-Rock","Psytrance","Shoegaze","Space Rock","Trop Rock","World Music","Neoclassical","Audiobook","Audio Theatre","Neue Deutsche Welle","Podcast","Indie Rock","G-Funk","Dubstep","Garage Rock","Psybient"],Ib={len:128,get:(n,t)=>{let o=new kI(3).get(n,t);return o==="TAG"?{header:o,title:new kI(30).get(n,t+3),artist:new kI(30).get(n,t+33),album:new kI(30).get(n,t+63),year:new kI(4).get(n,t+93),comment:new kI(28).get(n,t+97),zeroByte:QA.get(n,t+127),track:QA.get(n,t+126),genre:QA.get(n,t+127)}:null}},kI=class{constructor(t){this.len=t,this.stringType=new We(t,"latin1")}get(t,o){let a=this.stringType.get(t,o);return a=zO(a),a=a.trim(),a.length>0?a:void 0}},lb=class n extends Lt{constructor(t,o,a){super(t,o,a),this.apeHeader=a.apeHeader}static getGenre(t){if(tt){cb("Already consumed the last 128 bytes");return}let o=await this.tokenizer.readToken(Ib,t);if(o){cb("ID3v1 header found at: pos=%s",this.tokenizer.fileInfo.size-Ib.len);let a=["title","artist","album","comment","track","year"];for(let i of a)o[i]&&o[i]!==""&&await this.addTag(i,o[i]);let e=n.getGenre(o.genre);e&&await this.addTag("genre",e)}else cb("ID3v1 header not found at: pos=%s",this.tokenizer.fileInfo.size-Ib.len)}async addTag(t,o){await this.metadata.addTag("ID3v1",t,o)}}});var BU,Nae=ue(()=>{DA();BU={len:16,get:(n,t)=>{let o=xe.get(n,t+8),a=xe.get(n,t+12);return{startTime:xe.get(n,t),endTime:xe.get(n,t+4),startOffset:o===4294967295?void 0:o,endOffset:a===4294967295?void 0:a}}}});function kf(n){switch(n){case 2:return 6;case 3:case 4:return 10;default:throw Rae(n)}}function oVe(n,t){return t===3?{status:{tag_alter_preservation:GA(n,0,7),file_alter_preservation:GA(n,0,6),read_only:GA(n,0,5)},format:{compression:GA(n,1,7),encryption:GA(n,1,6),grouping_identity:GA(n,1,5),unsynchronisation:!1,data_length_indicator:!1}}:{status:{tag_alter_preservation:GA(n,0,6),file_alter_preservation:GA(n,0,5),read_only:GA(n,0,4)},format:{grouping_identity:GA(n,1,6),compression:GA(n,1,3),encryption:GA(n,1,2),unsynchronisation:GA(n,1,1),data_length_indicator:GA(n,1,0)}}}function vf(n,t,o){switch(t){case 2:return nVe(n,t,o);case 3:case 4:return sVe(n,t,o);default:throw Rae(t)}}function nVe(n,t,o){let a={id:Tr(n.subarray(0,3),"ascii"),length:Fr.get(n,3)};return a.id.match(/^[A-Z0-9]{3}$/)||o.addWarning(`Invalid ID3v2.${t} frame-header-ID: ${a.id}`),a}function sVe(n,t,o){let a={id:Tr(n.subarray(0,4),"ascii"),length:(t===4?pU:xe).get(n,4),flags:oVe(n.subarray(8,10),t)};return a.id.match(/^[A-Z0-9]{4}$/)||o.addWarning(`Invalid ID3v2.${t} frame-header-ID: ${a.id}`),a}function Rae(n){throw new vI(`Unexpected majorVer: ${n}`)}var fU=ue(()=>{DA();sr();TI();Zs();QU()});function gVe(n){let t=[],o,a="";for(let e of n)if(typeof o=="string")if(e==="("&&o==="")a+="(",o=void 0;else if(e===")"){a!==""&&(t.push(a),a="");let i=kae(o);i&&t.push(i),o=void 0}else o+=e;else e==="("?o="":a+=e;return a&&(t.length===0&&a.match(/^\d*$/)&&(a=kae(a)),a&&t.push(a)),t}function kae(n){if(n==="RX")return"Remix";if(n==="CR")return"Cover";if(n.match(/^\d*$/))return pE[Number.parseInt(n,10)]}function cVe(n){throw new vI(`Unexpected majorVer: ${n}`)}var vae,db,pn,yU,pb,vI,QU=ue(()=>{vae=ze(lt(),1);DA();sr();TI();Rf();nr();sr();Nae();fU();db=(0,vae.default)("music-metadata:id3v2:frame-parser"),pn="latin1",yU={encoding:pn,bom:!1};pb=class n{constructor(t,o){this.major=t,this.warningCollector=o}readData(t,o,a){if(t.length===0){this.warningCollector.addWarning(`id3v2.${this.major} header has empty tag type=${o}`);return}let{encoding:e,bom:i}=IE.get(t,0),A=t.length,r=0,s=[],g=n.getNullTerminatorLength(e),c;switch(db(`Parsing tag type=${o}, encoding=${e}, bom=${i}`),o!=="TXXX"&&o[0]==="T"?"T*":o){case"T*":case"GRP1":case"GP1":case"IPLS":case"MVIN":case"MVNM":case"PCS":case"PCST":{let I;try{I=n.trimNullPadding(mi(t.subarray(1),e))}catch(d){if(d instanceof Error){this.warningCollector.addWarning(`id3v2.${this.major} type=${o} header has invalid string value: ${d.message}`);break}throw d}switch(o){case"TMCL":case"TIPL":case"IPLS":s=n.functionList(this.splitValue(o,I));break;case"TRK":case"TRCK":case"TPOS":case"TIT1":case"TIT2":case"TIT3":s=I;break;case"TCOM":case"TEXT":case"TOLY":case"TOPE":case"TPE1":case"TSRC":s=this.splitValue(o,I);break;case"TCO":case"TCON":s=this.splitValue(o,I).map(d=>gVe(d)).reduce((d,B)=>d.concat(B),[]);break;case"PCS":case"PCST":s=this.major>=4?this.splitValue(o,I):[I],s=Array.isArray(s)&&s[0]===""?1:0;break;default:s=this.major>=4?this.splitValue(o,I):[I]}break}case"TXXX":{let I=n.readIdentifierAndData(t.subarray(1),e);s={description:I.id,text:this.splitValue(o,mi(I.data,e).replace(/\x00+$/,""))};break}case"PIC":case"APIC":if(a){let I={};switch(t=t.subarray(1),this.major){case 2:I.format=mi(t.subarray(0,3),"latin1"),t=t.subarray(3);break;case 3:case 4:c=ig(t,pn),I.format=mi(t.subarray(0,c),pn),t=t.subarray(c+1);break;default:throw cVe(this.major)}I.format=n.fixPictureMimeType(I.format),I.type=sE[t[0]],t=t.subarray(1),c=ig(t,e),I.description=mi(t.subarray(0,c),e),t=t.subarray(c+g),I.data=t,s=I}break;case"CNT":case"PCNT":s=dU(t);break;case"SYLT":{let I=EU.get(t,0);t=t.subarray(EU.len);let d={descriptor:"",language:I.language,contentType:I.contentType,timeStampFormat:I.timeStampFormat,syncText:[]},B=!1;for(;t.length>0;){let f=n.readNullTerminatedString(t,I.encoding);if(t=t.subarray(f.len),B){let Q=xe.get(t,0);t=t.subarray(xe.len),d.syncText.push({text:f.text,timestamp:Q})}else d.descriptor=f.text,B=!0}s=d;break}case"ULT":case"USLT":case"COM":case"COMM":{let I=VO.get(t,r);r+=VO.len;let d=n.readNullTerminatedString(t.subarray(r),I.encoding);r+=d.len;let B=n.readNullTerminatedString(t.subarray(r),I.encoding);s={language:I.language,descriptor:d.text,text:B.text};break}case"UFID":{let I=n.readIdentifierAndData(t,pn);s={owner_identifier:I.id,identifier:I.data};break}case"PRIV":{let I=n.readIdentifierAndData(t,pn);s={owner_identifier:I.id,data:I.data};break}case"POPM":{t=t.subarray(r);let I=n.readNullTerminatedString(t,yU),d=I.text;if(t=t.subarray(I.len),t.length===0){this.warningCollector.addWarning(`id3v2.${this.major} type=${o} POPM frame missing rating byte`),s={email:d,rating:0,counter:void 0};break}let B=QA.get(t,0),f=t.subarray(QA.len);s={email:d,rating:B,counter:f.length>0?dU(f):void 0};break}case"GEOB":{let I=IE.get(t,0);t=t.subarray(1);let d=n.readNullTerminatedString(t,yU),B=d.text;t=t.subarray(d.len);let f=n.readNullTerminatedString(t,I),Q=f.text;t=t.subarray(f.len);let y=n.readNullTerminatedString(t,I),m=y.text;t=t.subarray(y.len),s={type:B,filename:Q,description:m,data:t};break}case"WCOM":case"WCOP":case"WOAF":case"WOAR":case"WOAS":case"WORS":case"WPAY":case"WPUB":s=n.readNullTerminatedString(t,yU).text;break;case"WXXX":{let I=IE.get(t,0);t=t.subarray(1);let d=n.readNullTerminatedString(t,I),B=d.text;t=t.subarray(d.len),s={description:B,url:n.trimNullPadding(mi(t,pn))};break}case"WFD":case"WFED":{let I=IE.get(t,0);t=t.subarray(1),s=n.readNullTerminatedString(t,I).text;break}case"MCDI":{s=t.subarray(0,A);break}case"CHAP":{db("Reading CHAP"),c=ig(t,pn);let I={label:mi(t.subarray(0,c),pn),info:BU.get(t,c+1),frames:new Map};for(r+=c+1+BU.len;r=i.length)return{text:mi(t,o.encoding),len:e};let r=t.subarray(0,a+A);return{text:mi(r,o.encoding),len:a+A+n.getNullTerminatorLength(o.encoding)}}static fixPictureMimeType(t){switch(t=t.toLocaleLowerCase(),t){case"jpg":return"image/jpeg";case"png":return"image/png"}return t}static functionList(t){let o={};for(let a=0;a+11?this.warningCollector.addWarning(`ID3v2.${this.major} ${t} uses non standard null-separator.`):a=o.split(/\//g)):a=o.split(/\x00/g),n.trimArray(a)}static trimArray(t){return t.map(o=>n.trimNullPadding(o).trim())}static trimNullPadding(t){let o=t.length;for(;o>0&&t.charCodeAt(o-1)===0;)o--;return o===t.length?t:t.slice(0,o)}static readIdentifierAndData(t,o){let a=n.readNullTerminatedString(t,{encoding:o,bom:!1});return{id:a.text,data:t.subarray(a.len)}}static getNullTerminatorLength(t){return t.startsWith("utf-16")?2:1}},vI=class extends St("id3v2"){}});function IVe(n){throw new vI(`Unexpected majorVer: ${n}`)}var hn,hE=ue(()=>{DA();QU();TI();fU();hn=class n{constructor(){this.tokenizer=void 0,this.id3Header=void 0,this.metadata=void 0,this.headerType=void 0,this.options=void 0}static removeUnsyncBytes(t){let o=0,a=0;for(;o0?this.parseExtendedHeaderData(o,t.size):this.parseId3Data(this.id3Header.size-t.size)}async parseExtendedHeaderData(t,o){return await this.tokenizer.ignore(t),this.parseId3Data(this.id3Header.size-o)}async parseId3Data(t){let o=await this.tokenizer.readToken(new _t(t));for(let a of this.parseMetadata(o))switch(a.id){case"TXXX":a.value&&await this.handleTag(a,a.value.text,()=>a.value.description);break;default:await(Array.isArray(a.value)?Promise.all(a.value.map(e=>this.addTag(a.id,e))):this.addTag(a.id,a.value))}}async handleTag(t,o,a,e=i=>i){await Promise.all(o.map(i=>this.addTag(n.makeDescriptionTagName(t.id,a(i)),e(i))))}async addTag(t,o){await this.metadata.addTag(this.headerType,t,o)}parseMetadata(t){let o=0,a=[];for(;o!==t.length;){let e=kf(this.id3Header.version.major);if(o+e>t.length){this.metadata.addWarning("Illegal ID3v2 tag length");break}let i=t.subarray(o,o+e);o+=e;let A=vf(i,this.id3Header.version.major,this.metadata),r=t.subarray(o,o+A.length);o+=A.length;let s=n.readFrameData(r,A,this.id3Header.version.major,!this.options.skipCovers,this.metadata);s&&a.push({id:A.id,value:s})}return a}static mapId3v2Chapters(t){if(!t)return;let o=t.filter(g=>g.id==="CHAP");if(!o?.length)return;let e=t.filter(g=>g.id==="CTOC")?.find(g=>g.value.flags?.topLevel),i=new Map;for(let g of o)i.set(g.value.label,g.value);let A=e?.value.childElementIds,r=[],s=A??[...i.keys()];for(let g of s){let c=i.get(g);if(!c)continue;let I=c.frames,d=I.get("TIT2");d&&r.push({id:g,title:d,url:I.get("WXXX"),start:c.info.startTime/1e3,end:c.info.endTime/1e3,image:I.get("APIC")})}return A||r.sort((g,c)=>g.start-c.start),r.length?r:void 0}}});var Pae,mU,ag,Pf=ue(()=>{sn();Pae=ze(lt(),1);TI();hE();Rf();to();mU=(0,Pae.default)("music-metadata:parser:ID3"),ag=class extends Lt{constructor(){super(...arguments),this.id3parser=new hn}static async startsWithID3v2Header(t){return(await t.peekToken(_f)).fileIdentifier==="ID3"}async parse(){try{await this.parseID3v2()}catch(t){if(t instanceof kA)mU("End-of-stream");else throw t}}finalize(){}async parseID3v2(){await this.tryReadId3v2Headers(),mU("End of ID3v2 header, go to MPEG-parser: pos=%s",this.tokenizer.position),await this.postId3v2Parse(),this.options.skipPostHeaders&&this.metadata.hasAny()?this.finalize():(await new lb(this.metadata,this.tokenizer,this.options).parse(),this.finalize())}async tryReadId3v2Headers(){if((await this.tokenizer.peekToken(_f)).fileIdentifier==="ID3")return mU("Found ID3v2 header, pos=%s",this.tokenizer.position),await this.id3parser.parse(this.metadata,this.tokenizer,this.options),this.tryReadId3v2Headers()}}});var SU,Gae=ue(()=>{sr();SU={len:2,get:(n,t)=>{let o=XA(n,t,0,3),a=XA(n,t,6,1),e=XA(n,t,7,9)/10;if(o>0)return{type:XA(n,t,0,3),origin:XA(n,t,3,3),adjustment:a?-e:e}}}});var Fae,Lae=ue(()=>{DA();sr();Gae();Fae={len:27,get:(n,t)=>{let o=xe.get(n,t+2);return{revision:XA(n,t,0,4),vbr_method:XA(n,t,4,4),lowpass_filter:100*QA.get(n,t+1),track_peak:o===0?null:o/2**23,track_gain:SU.get(n,6),album_gain:SU.get(n,8),music_length:xe.get(n,t+20),music_crc:QA.get(n,t+24),header_crc:LA.get(n,t+24)}}}});async function Uae(n){let t=await n.readToken(lVe),o={numFrames:null,streamSize:null,vbrScale:null};if(t.frames&&(o.numFrames=await n.readToken(xe)),t.bytes&&(o.streamSize=await n.readToken(xe)),t.toc&&(o.toc=new Uint8Array(100),await n.readBuffer(o.toc)),t.vbrScale&&(o.vbrScale=await n.readToken(xe)),await n.peekToken(new We(4,"ascii"))==="LAME"){await n.ignore(4),o.lame={version:await n.readToken(new We(5,"ascii"))};let e=o.lame.version.match(/\d+.\d+/g);if(e!==null){let A=e[0].split(".").map(r=>Number.parseInt(r,10));A[0]>=3&&A[1]>=90&&(o.lame.extended=await n.readToken(Fae))}}return o}var wU,hb,lVe,Hae=ue(()=>{DA();sr();Lae();wU=new We(4,"ascii"),hb=new We(6,"ascii"),lVe={len:4,get:(n,t)=>({frames:Ki(n,t,31),bytes:Ki(n,t,30),toc:Ki(n,t,29),vbrScale:Ki(n,t,28)})}});var Jae={};Ur(Jae,{MpegContentError:()=>hd,MpegParser:()=>DU});function pVe(n){return`V${Math.floor((100-n)/10)}`}var jae,wo,hd,Kae,xae,dVe,Do,Yae,DU,qae=ue(()=>{DA();sn();jae=ze(lt(),1);sr();Pf();Hae();nr();wo=(0,jae.default)("music-metadata:parser:mpeg"),hd=class extends St("MPEG"){},Kae=1024,xae={AudioObjectTypes:["AAC Main","AAC LC","AAC SSR","AAC LTP"],SamplingFrequencies:[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,null,null,null]},dVe=[void 0,["front-center"],["front-left","front-right"],["front-center","front-left","front-right"],["front-center","front-left","front-right","back-center"],["front-center","front-left","front-right","back-left","back-right"],["front-center","front-left","front-right","back-left","back-right","LFE-channel"],["front-center","front-left","front-right","side-left","side-right","back-left","back-right","LFE-channel"]],Do=class n{constructor(t,o){this.bitrateIndex=null,this.sampRateFreqIndex=null,this.padding=null,this.privateBit=null,this.channelModeIndex=null,this.modeExtension=null,this.isOriginalMedia=null,this.version=null,this.bitrate=null,this.samplingRate=null,this.frameLength=0,this.versionIndex=XA(t,o+1,3,2),this.layer=n.LayerDescription[XA(t,o+1,5,2)],this.versionIndex>1&&this.layer===0?this.parseAdtsHeader(t,o):this.parseMpegHeader(t,o),this.isProtectedByCRC=!Ki(t,o+1,7)}calcDuration(t){return this.samplingRate==null?null:t*this.calcSamplesPerFrame()/this.samplingRate}calcSamplesPerFrame(){return n.samplesInFrameTable[this.version===1?0:1][this.layer]}calculateSideInfoLength(){if(this.layer!==3)return 2;if(this.channelModeIndex===3){if(this.version===1)return 17;if(this.version===2||this.version===2.5)return 9}else{if(this.version===1)return 32;if(this.version===2||this.version===2.5)return 17}return null}calcSlotSize(){return[null,4,1,1][this.layer]}parseMpegHeader(t,o){this.container="MPEG",this.bitrateIndex=XA(t,o+2,0,4),this.sampRateFreqIndex=XA(t,o+2,4,2),this.padding=Ki(t,o+2,6),this.privateBit=Ki(t,o+2,7),this.channelModeIndex=XA(t,o+3,0,2),this.modeExtension=XA(t,o+3,2,2),this.isCopyrighted=Ki(t,o+3,4),this.isOriginalMedia=Ki(t,o+3,5),this.emphasis=XA(t,o+3,7,2),this.version=n.VersionID[this.versionIndex],this.channelMode=n.ChannelMode[this.channelModeIndex],this.codec=`MPEG ${this.version} Layer ${this.layer}`;let a=this.calcBitrate();if(!a)throw new hd("Cannot determine bit-rate");if(this.bitrate=a*1e3,this.samplingRate=this.calcSamplingRate(),this.samplingRate==null)throw new hd("Cannot determine sampling-rate")}parseAdtsHeader(t,o){wo("layer=0 => ADTS"),this.version=this.versionIndex===2?4:2,this.container=`ADTS/MPEG-${this.version}`;let a=XA(t,o+2,0,2);this.codec="AAC",this.codecProfile=xae.AudioObjectTypes[a],wo(`MPEG-4 audio-codec=${this.codec}`);let e=XA(t,o+2,2,4);this.samplingRate=xae.SamplingFrequencies[e],wo(`sampling-rate=${this.samplingRate}`);let i=XA(t,o+2,7,3);this.mp4ChannelConfig=dVe[i],wo(`channel-config=${this.mp4ChannelConfig?this.mp4ChannelConfig.join("+"):"?"}`),this.frameLength=XA(t,o+3,6,2)<<11}calcBitrate(){if(this.bitrateIndex===0||this.bitrateIndex===15)return null;if(this.version&&this.bitrateIndex){let t=10*Math.floor(this.version)+this.layer;return n.bitrate_index[this.bitrateIndex][t]}return null}calcSamplingRate(){return this.sampRateFreqIndex===3||this.version===null||this.sampRateFreqIndex==null?null:n.sampling_rate_freq_index[this.version][this.sampRateFreqIndex]}};Do.SyncByte1=255;Do.SyncByte2=224;Do.VersionID=[2.5,null,2,1];Do.LayerDescription=[0,3,2,1];Do.ChannelMode=["stereo","joint_stereo","dual_channel","mono"];Do.bitrate_index={1:{11:32,12:32,13:32,21:32,22:8,23:8},2:{11:64,12:48,13:40,21:48,22:16,23:16},3:{11:96,12:56,13:48,21:56,22:24,23:24},4:{11:128,12:64,13:56,21:64,22:32,23:32},5:{11:160,12:80,13:64,21:80,22:40,23:40},6:{11:192,12:96,13:80,21:96,22:48,23:48},7:{11:224,12:112,13:96,21:112,22:56,23:56},8:{11:256,12:128,13:112,21:128,22:64,23:64},9:{11:288,12:160,13:128,21:144,22:80,23:80},10:{11:320,12:192,13:160,21:160,22:96,23:96},11:{11:352,12:224,13:192,21:176,22:112,23:112},12:{11:384,12:256,13:224,21:192,22:128,23:128},13:{11:416,12:320,13:256,21:224,22:144,23:144},14:{11:448,12:384,13:320,21:256,22:160,23:160}};Do.sampling_rate_freq_index={1:{0:44100,1:48e3,2:32e3},2:{0:22050,1:24e3,2:16e3},2.5:{0:11025,1:12e3,2:8e3}};Do.samplesInFrameTable=[[0,384,1152,1152],[0,384,1152,576]];Yae={len:4,get:(n,t)=>new Do(n,t)};DU=class extends ag{constructor(){super(...arguments),this.frameCount=0,this.syncFrameCount=-1,this.totalDataLength=0,this.bitrates=[],this.offset=0,this.frame_size=0,this.calculateEofDuration=!1,this.samplesPerFrame=null,this.buf_frame_header=new Uint8Array(4),this.mpegOffset=null,this.syncPeek={buf:new Uint8Array(Kae),len:0}}async postId3v2Parse(){this.metadata.setFormat("lossless",!1),this.metadata.setAudioOnly();try{let t=!1;for(;!t;)await this.sync(),t=await this.parseCommonMpegHeader()}catch(t){if(t instanceof kA){if(wo("End-of-stream"),this.calculateEofDuration&&this.samplesPerFrame!==null){let o=this.frameCount*this.samplesPerFrame;if(this.metadata.setFormat("numberOfSamples",o),this.metadata.format.sampleRate){let a=o/this.metadata.format.sampleRate;wo(`Calculate duration at EOF: ${a} sec.`,a),this.metadata.setFormat("duration",a)}}}else throw t}}finalize(){let t=this.metadata.format,o=!!this.metadata.native.ID3v1;if(this.mpegOffset!==null){if(t.duration&&this.tokenizer.fileInfo.size){let a=this.tokenizer.fileInfo.size-this.mpegOffset-(o?128:0);t.codecProfile&&t.codecProfile[0]==="V"&&this.metadata.setFormat("bitrate",a*8/t.duration)}if(this.tokenizer.fileInfo.size&&t.codecProfile==="CBR"){let a=this.tokenizer.fileInfo.size-this.mpegOffset-(o?128:0);if(this.frame_size!==null&&this.samplesPerFrame!==null){let e=Math.round(a/this.frame_size)*this.samplesPerFrame;if(this.metadata.setFormat("numberOfSamples",e),t.sampleRate&&!t.duration){let i=e/t.sampleRate;wo("Calculate CBR duration based on file size: %s",i),this.metadata.setFormat("duration",i)}}}}}async sync(){let t=!1;for(;;){let o=0;if(this.syncPeek.len=await this.tokenizer.peekBuffer(this.syncPeek.buf,{length:Kae,mayBeLess:!0}),this.syncPeek.len<=163)throw new kA;for(;;){if(t&&(this.syncPeek.buf[o]&224)===224){this.buf_frame_header[0]=Do.SyncByte1,this.buf_frame_header[1]=this.syncPeek.buf[o],await this.tokenizer.ignore(o),wo(`Sync at offset=${this.tokenizer.position-1}, frameCount=${this.frameCount}`),this.syncFrameCount===this.frameCount&&(wo(`Re-synced MPEG stream, frameCount=${this.frameCount}`),this.frameCount=0,this.frame_size=0),this.syncFrameCount=this.frameCount;return}if(t=!1,o=this.syncPeek.buf.indexOf(Do.SyncByte1,o),o===-1){if(this.syncPeek.len=2&&t.layer===0?this.parseAdts(t):this.parseAudioFrameHeader(t)}async parseAudioFrameHeader(t){this.metadata.setFormat("numberOfChannels",t.channelMode==="mono"?1:2),this.metadata.setFormat("bitrate",t.bitrate),this.frameCount<20*1e4&&wo("offset=%s MP%s bitrate=%s sample-rate=%s",this.tokenizer.position-4,t.layer,t.bitrate,t.samplingRate);let o=t.calcSlotSize();if(o===null)throw new hd("invalid slot_size");let a=t.calcSamplesPerFrame();wo(`samples_per_frame=${a}`);let e=a/8;if(t.bitrate!==null&&t.samplingRate!=null){let i=e*t.bitrate/t.samplingRate+(t.padding?o:0);this.frame_size=Math.floor(i)}if(this.audioFrameHeader=t,t.bitrate!==null&&this.bitrates.push(t.bitrate),this.frameCount===1)return this.offset=Yae.len,await this.skipSideInformation(),!1;if(this.frameCount===4){if(this.areAllSame(this.bitrates)){if(this.samplesPerFrame=a,this.metadata.setFormat("codecProfile","CBR"),this.tokenizer.fileInfo.size)return!0}else if(this.metadata.format.duration)return!0;if(!this.options.duration)return!0}return this.options.duration&&this.frameCount===4&&(this.samplesPerFrame=a,this.calculateEofDuration=!0),this.offset=4,t.isProtectedByCRC?(await this.parseCrc(),!1):(await this.skipSideInformation(),!1)}async parseAdts(t){let o=new Uint8Array(3);if(await this.tokenizer.readBuffer(o),t.frameLength+=XA(o,0,0,11),this.totalDataLength+=t.frameLength,this.samplesPerFrame=1024,t.samplingRate!==null){let a=t.samplingRate/this.samplesPerFrame,i=8*(this.frameCount===0?0:this.totalDataLength/this.frameCount)*a+.5;this.metadata.setFormat("bitrate",i),wo(`frame-count=${this.frameCount}, size=${t.frameLength} bytes, bit-rate=${i}`)}if(await this.tokenizer.ignore(t.frameLength>7?t.frameLength-7:1),this.frameCount===3)if(this.metadata.setFormat("codecProfile",t.codecProfile),t.mp4ChannelConfig&&this.metadata.setFormat("numberOfChannels",t.mp4ChannelConfig.length),this.options.duration)this.calculateEofDuration=!0;else return!0;return!1}async parseCrc(){return await this.tokenizer.ignore(gn.len),this.offset+=gn.len,this.skipSideInformation()}async skipSideInformation(){if(this.audioFrameHeader){let t=this.audioFrameHeader.calculateSideInfoLength();if(t!==null){await this.tokenizer.readToken(new _t(t)),this.offset+=t,await this.readXtraInfoHeader();return}}}async readXtraInfoHeader(){let t=await this.tokenizer.readToken(wU);switch(this.offset+=wU.len,t){case"Info":return this.metadata.setFormat("codecProfile","CBR"),this.readXingInfoHeader();case"Xing":{let a=await this.readXingInfoHeader();if(a.vbrScale!==null){let e=pVe(a.vbrScale);this.metadata.setFormat("codecProfile",e)}return null}case"Xtra":break;case"LAME":{let a=await this.tokenizer.readToken(hb);if(this.frame_size!==null&&this.frame_size>=this.offset+hb.len)return this.offset+=hb.len,this.metadata.setFormat("tool",`LAME ${a}`),await this.skipFrameData(this.frame_size-this.offset),null;this.metadata.addWarning("Corrupt LAME header");break}}let o=this.frame_size-this.offset;return o<0?this.metadata.addWarning(`Frame ${this.frameCount}corrupt: negative frameDataLeft`):await this.skipFrameData(o),null}async readXingInfoHeader(){let t=this.tokenizer.position,o=await Uae(this.tokenizer);if(this.offset+=this.tokenizer.position-t,o.lame&&(this.metadata.setFormat("tool",`LAME ${ln(o.lame.version)}`),o.lame.extended&&(this.metadata.setFormat("trackPeakLevel",o.lame.extended.track_peak),o.lame.extended.track_gain&&this.metadata.setFormat("trackGain",o.lame.extended.track_gain.adjustment),o.lame.extended.album_gain&&this.metadata.setFormat("albumGain",o.lame.extended.album_gain.adjustment),this.metadata.setFormat("duration",o.lame.extended.music_length/1e3))),o.streamSize&&this.audioFrameHeader&&o.numFrames!==null){let e=this.audioFrameHeader.calcDuration(o.numFrames);return this.metadata.setFormat("duration",e),wo("Get duration from Xing header: %s",this.metadata.format.duration),o}let a=this.frame_size-this.offset;return await this.skipFrameData(a),o}async skipFrameData(t){if(t<0)throw new hd("frame-data-left cannot be negative");await this.tokenizer.ignore(t)}areAllSame(t){let o=t[0];return t.every(a=>a===o)}}});var zae,Vae=ue(()=>{zae={parserType:"mpeg",extensions:[".mp2",".mp3",".m2a",".aac","aacp"],mimeTypes:["audio/mpeg","audio/mp3","audio/aacs","audio/aacp"],async load(){return(await Promise.resolve().then(()=>(qae(),Jae))).MpegParser}}});var Wae,Zae=ue(()=>{Wae={parserType:"apev2",extensions:[".ape"],mimeTypes:["audio/ape","audio/monkeys-audio"],async load(){return(await Promise.resolve().then(()=>(pd(),Mae))).APEv2Parser}}});function OU(n){let t=n.trim();if(t.length!==36||t[8]!=="-"||t[13]!=="-"||t[18]!=="-"||t[23]!=="-")throw new Error(`Invalid GUID format: ${n}`);let o,a=new Uint8Array(16);o=parseInt(t.slice(0,8),16),a[0]=o&255,a[1]=o>>>8&255,a[2]=o>>>16&255,a[3]=o>>>24&255,o=parseInt(t.slice(9,13),16),a[4]=o&255,a[5]=o>>>8&255,o=parseInt(t.slice(14,18),16),a[6]=o&255,a[7]=o>>>8&255,o=parseInt(t.slice(19,23),16),a[8]=o>>>8&255,a[9]=o&255,o=parseInt(t.slice(24,32),16),a[10]=o>>>24&255,a[11]=o>>>16&255,a[12]=o>>>8&255,a[13]=o&255,o=parseInt(t.slice(32,36),16),a[14]=o>>>8&255,a[15]=o&255;for(let e=0;e<16;e++)if(!Number.isFinite(a[e]))throw new Error(`Invalid GUID format: ${n}`);if(!/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(t))throw new Error(`Invalid GUID format: ${n}`);return a}var Eb,Xae=ue(()=>{Eb=class n{constructor(t){if(t.length!==16)throw new Error("GUID must be exactly 16 bytes");this.bytes=t}static fromString(t){return new n(OU(t))}toString(){let t=this.bytes,o=s=>s.toString(16).padStart(2,"0"),a=o(t[3])+o(t[2])+o(t[1])+o(t[0]),e=o(t[5])+o(t[4]),i=o(t[7])+o(t[6]),A=o(t[8])+o(t[9]),r=o(t[10])+o(t[11])+o(t[12])+o(t[13])+o(t[14])+o(t[15]);return`${a}-${e}-${i}-${A}-${r}`.toUpperCase()}equals(t,o=0){if(o<0||t.length-o<16)return!1;let a=this.bytes;for(let e=0;e<16;e++)if(t[o+e]!==a[e])return!1;return!0}}});var Ye,gr,bU=ue(()=>{Xae();Ye=class n{static fromBin(t,o=0){return new n(n.decode(t,o))}static decode(t,o=0){return new Eb(t.subarray(o,o+16)).toString()}static decodeMediaType(t){switch(t.str){case n.AudioMedia.str:return"audio";case n.VideoMedia.str:return"video";case n.CommandMedia.str:return"command";case n.Degradable_JPEG_Media.str:return"degradable-jpeg";case n.FileTransferMedia.str:return"file-transfer";case n.BinaryMedia.str:return"binary"}}static encode(t){return OU(t)}constructor(t){this.str=t}equals(t){return this.str===t.str}toBin(){return n.encode(this.str)}};Ye.HeaderObject=new Ye("75B22630-668E-11CF-A6D9-00AA0062CE6C");Ye.DataObject=new Ye("75B22636-668E-11CF-A6D9-00AA0062CE6C");Ye.SimpleIndexObject=new Ye("33000890-E5B1-11CF-89F4-00A0C90349CB");Ye.IndexObject=new Ye("D6E229D3-35DA-11D1-9034-00A0C90349BE");Ye.MediaObjectIndexObject=new Ye("FEB103F8-12AD-4C64-840F-2A1D2F7AD48C");Ye.TimecodeIndexObject=new Ye("3CB73FD0-0C4A-4803-953D-EDF7B6228F0C");Ye.FilePropertiesObject=new Ye("8CABDCA1-A947-11CF-8EE4-00C00C205365");Ye.StreamPropertiesObject=new Ye("B7DC0791-A9B7-11CF-8EE6-00C00C205365");Ye.HeaderExtensionObject=new Ye("5FBF03B5-A92E-11CF-8EE3-00C00C205365");Ye.CodecListObject=new Ye("86D15240-311D-11D0-A3A4-00A0C90348F6");Ye.ScriptCommandObject=new Ye("1EFB1A30-0B62-11D0-A39B-00A0C90348F6");Ye.MarkerObject=new Ye("F487CD01-A951-11CF-8EE6-00C00C205365");Ye.BitrateMutualExclusionObject=new Ye("D6E229DC-35DA-11D1-9034-00A0C90349BE");Ye.ErrorCorrectionObject=new Ye("75B22635-668E-11CF-A6D9-00AA0062CE6C");Ye.ContentDescriptionObject=new Ye("75B22633-668E-11CF-A6D9-00AA0062CE6C");Ye.ExtendedContentDescriptionObject=new Ye("D2D0A440-E307-11D2-97F0-00A0C95EA850");Ye.ContentBrandingObject=new Ye("2211B3FA-BD23-11D2-B4B7-00A0C955FC6E");Ye.StreamBitratePropertiesObject=new Ye("7BF875CE-468D-11D1-8D82-006097C9A2B2");Ye.ContentEncryptionObject=new Ye("2211B3FB-BD23-11D2-B4B7-00A0C955FC6E");Ye.ExtendedContentEncryptionObject=new Ye("298AE614-2622-4C17-B935-DAE07EE9289C");Ye.DigitalSignatureObject=new Ye("2211B3FC-BD23-11D2-B4B7-00A0C955FC6E");Ye.PaddingObject=new Ye("1806D474-CADF-4509-A4BA-9AABCB96AAE8");Ye.ExtendedStreamPropertiesObject=new Ye("14E6A5CB-C672-4332-8399-A96952065B5A");Ye.AdvancedMutualExclusionObject=new Ye("A08649CF-4775-4670-8A16-6E35357566CD");Ye.GroupMutualExclusionObject=new Ye("D1465A40-5A79-4338-B71B-E36B8FD6C249");Ye.StreamPrioritizationObject=new Ye("D4FED15B-88D3-454F-81F0-ED5C45999E24");Ye.BandwidthSharingObject=new Ye("A69609E6-517B-11D2-B6AF-00C04FD908E9");Ye.LanguageListObject=new Ye("7C4346A9-EFE0-4BFC-B229-393EDE415C85");Ye.MetadataObject=new Ye("C5F8CBEA-5BAF-4877-8467-AA8C44FA4CCA");Ye.MetadataLibraryObject=new Ye("44231C94-9498-49D1-A141-1D134E457054");Ye.IndexParametersObject=new Ye("D6E229DF-35DA-11D1-9034-00A0C90349BE");Ye.MediaObjectIndexParametersObject=new Ye("6B203BAD-3F11-48E4-ACA8-D7613DE2CFA7");Ye.TimecodeIndexParametersObject=new Ye("F55E496D-9797-4B5D-8C8B-604DFE9BFB24");Ye.CompatibilityObject=new Ye("26F18B5D-4584-47EC-9F5F-0E651F0452C9");Ye.AdvancedContentEncryptionObject=new Ye("43058533-6981-49E6-9B74-AD12CB86D58C");Ye.AudioMedia=new Ye("F8699E40-5B4D-11CF-A8FD-00805F5C442B");Ye.VideoMedia=new Ye("BC19EFC0-5B4D-11CF-A8FD-00805F5C442B");Ye.CommandMedia=new Ye("59DACFC0-59E6-11D0-A3AC-00A0C90348F6");Ye.JFIF_Media=new Ye("B61BE100-5B4E-11CF-A8FD-00805F5C442B");Ye.Degradable_JPEG_Media=new Ye("35907DE0-E415-11CF-A917-00805F5C442B");Ye.FileTransferMedia=new Ye("91BD222C-F21C-497A-8B6D-5AA86BFC0185");Ye.BinaryMedia=new Ye("3AFB65E2-47EF-40F2-AC2C-70A90D71D343");Ye.ASF_Index_Placeholder_Object=new Ye("D9AADE20-7C17-4F9C-BC28-8555DD98E2A2");gr=Ye});function eoe(n){return hVe[n]}function Gf(n){return ln(mi(n,"utf-16le"))}function $ae(n){return new Uint8Array(n)}function EVe(n,t=0){return Aoe(n,t)===1}function uVe(n,t=0){return Le.get(n,t)}function CVe(n,t=0){return Lr.get(n,t)}function Aoe(n,t=0){return SA.get(n,t)}var hVe,toe=ue(()=>{DA();sr();hVe=[Gf,$ae,EVe,uVe,CVe,Aoe,$ae]});async function roe(n){let t=await n.readNumber(SA);return(await n.readToken(new We(t*2,"utf-16le"))).replace("\0","")}async function aoe(n){let t=await n.readToken(BVe),o=[];for(let a=0;a{DA();sr();bU();toe();TI();nr();EE=class extends St("ASF"){},ioe={len:30,get:(n,t)=>({objectId:gr.fromBin(n,t),objectSize:Number(Lr.get(n,t+16)),numberOfHeaderObjects:Le.get(n,t+24)})},PI={len:24,get:(n,t)=>({objectId:gr.fromBin(n,t),objectSize:Number(Lr.get(n,t+16))})},Ic=class{constructor(t){this.len=Number(t.objectSize)-PI.len}postProcessTag(t,o,a,e){if(o==="WM/Picture")t.push({id:o,value:MU.fromBuffer(e)});else{let i=eoe(a);if(!i)throw new EE(`unexpected value headerType: ${a}`);t.push({id:o,value:i(e)})}}},Ff=class extends Ic{get(t,o){return null}},uE=class extends Ic{get(t,o){return{fileId:gr.fromBin(t,o),fileSize:Lr.get(t,o+16),creationDate:Lr.get(t,o+24),dataPacketsCount:Lr.get(t,o+32),playDuration:Lr.get(t,o+40),sendDuration:Lr.get(t,o+48),preroll:Lr.get(t,o+56),flags:{broadcast:GA(t,o+64,24),seekable:GA(t,o+64,25)},minimumDataPacketSize:Le.get(t,o+68),maximumDataPacketSize:Le.get(t,o+72),maximumBitrate:Le.get(t,o+76)}}};uE.guid=gr.FilePropertiesObject;CE=class extends Ic{get(t,o){return{streamType:gr.decodeMediaType(gr.fromBin(t,o)),errorCorrectionType:gr.fromBin(t,o+8)}}};CE.guid=gr.StreamPropertiesObject;BE=class{constructor(){this.len=22}get(t,o){let a=new DataView(t.buffer,o);return{reserved1:gr.fromBin(t,o),reserved2:a.getUint16(16,!0),extensionDataSize:a.getUint16(18,!0)}}};BE.guid=gr.HeaderExtensionObject;BVe={len:20,get:(n,t)=>({entryCount:new DataView(n.buffer,t).getUint16(16,!0)})};Ed=class n extends Ic{get(t,o){let a=[],e=new DataView(t.buffer,o),i=10;for(let A=0;A0){let s=n.contentDescTags[A],g=i+r;a.push({id:s,value:Gf(t.subarray(o+i,o+g))}),i=g}}return a}};Ed.guid=gr.ContentDescriptionObject;Ed.contentDescTags=["Title","Author","Copyright","Description","Rating"];fE=class extends Ic{get(t,o){let a=[],e=new DataView(t.buffer,o),i=e.getUint16(0,!0),A=2;for(let r=0;rNU});var ooe,TU,mVe,NU,soe=ue(()=>{ooe=ze(lt(),1);Id();bU();_U();to();_U();TU=(0,ooe.default)("music-metadata:parser:ASF"),mVe="asf",NU=class extends Lt{async parse(){let t=await this.tokenizer.readToken(ioe);if(!t.objectId.equals(gr.HeaderObject))throw new EE(`expected asf header; but was not found; got: ${t.objectId.str}`);await this.parseObjectHeader(t.numberOfHeaderObjects)}async parseObjectHeader(t){let o;do{let a=await this.tokenizer.readToken(PI);switch(TU("header GUID=%s",a.objectId.str),a.objectId.str){case uE.guid.str:{let e=await this.tokenizer.readToken(new uE(a));this.metadata.setFormat("duration",Number(e.playDuration/BigInt(1e3))/1e4-Number(e.preroll)/1e3),this.metadata.setFormat("bitrate",e.maximumBitrate);break}case CE.guid.str:{let e=await this.tokenizer.readToken(new CE(a));this.metadata.setFormat("container",`ASF/${e.streamType}`);break}case BE.guid.str:{let e=await this.tokenizer.readToken(new BE);await this.parseExtensionObject(e.extensionDataSize);break}case Ed.guid.str:o=await this.tokenizer.readToken(new Ed(a)),await this.addTags(o);break;case fE.guid.str:o=await this.tokenizer.readToken(new fE(a)),await this.addTags(o);break;case gr.CodecListObject.str:{let e=await aoe(this.tokenizer);e.forEach(A=>{this.metadata.addStreamInfo({type:A.type.videoCodec?yi.video:yi.audio,codecName:A.codecName})});let i=e.filter(A=>A.type.audioCodec).map(A=>A.codecName).join("/");this.metadata.setFormat("codec",i);break}case gr.StreamBitratePropertiesObject.str:await this.tokenizer.ignore(a.objectSize-PI.len);break;case gr.PaddingObject.str:TU("Padding: %s bytes",a.objectSize-PI.len),await this.tokenizer.ignore(a.objectSize-PI.len);break;default:this.metadata.addWarning(`Ignore ASF-Object-GUID: ${a.objectId.str}`),TU("Ignore ASF-Object-GUID: %s",a.objectId.str),await this.tokenizer.readToken(new Ff(a))}}while(--t)}async addTags(t){await Promise.all(t.map(({id:o,value:a})=>this.metadata.addTag(mVe,o,a)))}async parseExtensionObject(t){do{let o=await this.tokenizer.readToken(PI),a=o.objectSize-PI.len;if(a<0)throw new EE(`Invalid ASF header object size: ${o.objectSize}`);switch(o.objectId.str){case QE.guid.str:await this.tokenizer.readToken(new QE(o));break;case ud.guid.str:{let e=await this.tokenizer.readToken(new ud(o));await this.addTags(e);break}case yE.guid.str:{let e=await this.tokenizer.readToken(new yE(o));await this.addTags(e);break}case gr.PaddingObject.str:await this.tokenizer.ignore(a);break;case gr.CompatibilityObject.str:await this.tokenizer.ignore(a);break;case gr.ASF_Index_Placeholder_Object.str:await this.tokenizer.ignore(a);break;default:this.metadata.addWarning(`Ignore ASF-Object-GUID: ${o.objectId.str}`),await this.tokenizer.readToken(new Ff(o));break}t-=o.objectSize}while(t>0)}}});var goe,coe=ue(()=>{goe={parserType:"asf",extensions:[".asf",".wma",".wmv"],mimeTypes:["audio/ms-wma","video/ms-wmv","audio/ms-asf","video/ms-asf","application/vnd.ms-asf"],async load(){return(await Promise.resolve().then(()=>(soe(),noe))).AsfParser}}});var Cd,Ioe=ue(()=>{DA();Da();Cd={len:12,get:(n,t)=>({chunkID:at.get(n,t),chunkSize:X2.get(n,t+4)})}});var doe={};Ur(doe,{DsdiffContentParseError:()=>mE,DsdiffParser:()=>RU});var loe,Oa,mE,RU,poe=ue(()=>{DA();loe=ze(lt(),1);sn();Da();to();hE();Ioe();nr();Oa=(0,loe.default)("music-metadata:parser:aiff"),mE=class extends St("DSDIFF"){},RU=class extends Lt{async parse(){let t=await this.tokenizer.readToken(Cd);if(t.chunkID!=="FRM8")throw new mE("Unexpected chunk-ID");this.metadata.setAudioOnly();let o=(await this.tokenizer.readToken(at)).trim();switch(o){case"DSD":return this.metadata.setFormat("container",`DSDIFF/${o}`),this.metadata.setFormat("lossless",!0),this.readFmt8Chunks(t.chunkSize-BigInt(at.len));default:throw new mE(`Unsupported DSDIFF type: ${o}`)}}async readFmt8Chunks(t){for(;t>=Cd.len;){let o=await this.tokenizer.readToken(Cd);Oa(`Chunk id=${o.chunkID}`),await this.readData(o),t-=BigInt(Cd.len)+o.chunkSize}}async readData(t){Oa(`Reading data of chunk[ID=${t.chunkID}, size=${t.chunkSize}]`);let o=this.tokenizer.position;switch(t.chunkID.trim()){case"FVER":{let e=await this.tokenizer.readToken(Le);Oa(`DSDIFF version=${e}`);break}case"PROP":{if(await this.tokenizer.readToken(at)!=="SND ")throw new mE("Unexpected PROP-chunk ID");await this.handleSoundPropertyChunks(t.chunkSize-BigInt(at.len));break}case"ID3":{let e=await this.tokenizer.readToken(new _t(Number(t.chunkSize))),i=So(e);await new hn().parse(this.metadata,i,this.options);break}case"DSD":this.metadata.format.numberOfChannels&&this.metadata.setFormat("numberOfSamples",Number(t.chunkSize*BigInt(8)/BigInt(this.metadata.format.numberOfChannels))),this.metadata.format.numberOfSamples&&this.metadata.format.sampleRate&&this.metadata.setFormat("duration",this.metadata.format.numberOfSamples/this.metadata.format.sampleRate);break;default:Oa(`Ignore chunk[ID=${t.chunkID}, size=${t.chunkSize}]`);break}let a=t.chunkSize-BigInt(this.tokenizer.position-o);a>0&&(Oa(`After Parsing chunk, remaining ${a} bytes`),await this.tokenizer.ignore(Number(a)))}async handleSoundPropertyChunks(t){for(Oa(`Parsing sound-property-chunks, remainingSize=${t}`);t>0;){let o=await this.tokenizer.readToken(Cd);Oa(`Sound-property-chunk[ID=${o.chunkID}, size=${o.chunkSize}]`);let a=this.tokenizer.position;switch(o.chunkID.trim()){case"FS":{let i=await this.tokenizer.readToken(xe);this.metadata.setFormat("sampleRate",i);break}case"CHNL":{let i=await this.tokenizer.readToken(LA);this.metadata.setFormat("numberOfChannels",i),await this.handleChannelChunks(o.chunkSize-BigInt(LA.len));break}case"CMPR":{let i=(await this.tokenizer.readToken(at)).trim(),A=await this.tokenizer.readToken(QA),r=await this.tokenizer.readToken(new We(A,"ascii"));i==="DSD"&&(this.metadata.setFormat("lossless",!0),this.metadata.setFormat("bitsPerSample",1)),this.metadata.setFormat("codec",`${i} (${r})`);break}case"ABSS":{let i=await this.tokenizer.readToken(LA),A=await this.tokenizer.readToken(QA),r=await this.tokenizer.readToken(QA),s=await this.tokenizer.readToken(xe);Oa(`ABSS ${i}:${A}:${r}.${s}`);break}case"LSCO":{let i=await this.tokenizer.readToken(LA);Oa(`LSCO lsConfig=${i}`);break}default:Oa(`Unknown sound-property-chunk[ID=${o.chunkID}, size=${o.chunkSize}]`),await this.tokenizer.ignore(Number(o.chunkSize))}let e=o.chunkSize-BigInt(this.tokenizer.position-a);e>0&&(Oa(`After Parsing sound-property-chunk ${o.chunkSize}, remaining ${e} bytes`),await this.tokenizer.ignore(Number(e))),t-=BigInt(Cd.len)+o.chunkSize,Oa(`Parsing sound-property-chunks, remainingSize=${t}`)}if(this.metadata.format.lossless&&this.metadata.format.sampleRate&&this.metadata.format.numberOfChannels&&this.metadata.format.bitsPerSample){let o=this.metadata.format.sampleRate*this.metadata.format.numberOfChannels*this.metadata.format.bitsPerSample;this.metadata.setFormat("bitrate",o)}}async handleChannelChunks(t){Oa(`Parsing channel-chunks, remainingSize=${t}`);let o=[];for(;t>=at.len;){let a=await this.tokenizer.readToken(at);Oa(`Channel[ID=${a}]`),o.push(a),t-=BigInt(at.len)}return Oa(`Channels: ${o.join(", ")}`),o}}});var hoe,Eoe=ue(()=>{hoe={parserType:"dsdiff",extensions:[".dff"],mimeTypes:["audio/dsf","audio/dsd"],async load(){return(await Promise.resolve().then(()=>(poe(),doe))).DsdiffParser}}});var uoe,GI,ub,kU=ue(()=>{DA();Da();nr();uoe={NONE:"not compressed PCM Apple Computer",sowt:"PCM (byte swapped)",fl32:"32-bit floating point IEEE 32-bit float",fl64:"64-bit floating point IEEE 64-bit float Apple Computer",alaw:"ALaw 2:1 8-bit ITU-T G.711 A-law",ulaw:"\xB5Law 2:1 8-bit ITU-T G.711 \xB5-law Apple Computer",ULAW:"CCITT G.711 u-law 8-bit ITU-T G.711 \xB5-law",ALAW:"CCITT G.711 A-law 8-bit ITU-T G.711 A-law",FL32:"Float 32 IEEE 32-bit float "},GI=class extends St("AIFF"){},ub=class{constructor(t,o){this.isAifc=o;let a=o?22:18;if(t.chunkSize>Math.abs(a):e<22){let A=QA.get(t,o+22);if(A>0){let r=(A+1)%2;if(23+A+r===this.len)i.compressionName=new We(A,"latin1").get(t,o+23);else throw new GI("Illegal pstring length")}else i.compressionName=void 0}}else i.compressionName="PCM";return i}}});var Cb,Coe=ue(()=>{DA();Da();Cb={len:8,get:(n,t)=>({chunkID:at.get(n,t),chunkSize:Number(BigInt(xe.get(n,t+4)))})}});var foe={};Ur(foe,{AIFFParser:()=>PU});var Boe,vU,PU,Qoe=ue(()=>{DA();Boe=ze(lt(),1);sn();hE();Da();to();kU();kU();Coe();vU=(0,Boe.default)("music-metadata:parser:aiff"),PU=class extends Lt{constructor(){super(...arguments),this.isCompressed=null}async parse(){if((await this.tokenizer.readToken(Cb)).chunkID!=="FORM")throw new GI("Invalid Chunk-ID, expected 'FORM'");let o=await this.tokenizer.readToken(at);switch(o){case"AIFF":this.metadata.setFormat("container",o),this.isCompressed=!1;break;case"AIFC":this.metadata.setFormat("container","AIFF-C"),this.isCompressed=!0;break;default:throw new GI(`Unsupported AIFF type: ${o}`)}this.metadata.setFormat("lossless",!this.isCompressed),this.metadata.setAudioOnly();try{for(;!this.tokenizer.fileInfo.size||this.tokenizer.fileInfo.size-this.tokenizer.position>=Cb.len;){vU(`Reading AIFF chunk at offset=${this.tokenizer.position}`);let a=await this.tokenizer.readToken(Cb),e=2*Math.round(a.chunkSize/2),i=await this.readData(a);await this.tokenizer.ignore(e-i)}}catch(a){if(a instanceof kA)vU("End-of-stream");else throw a}}async readData(t){switch(t.chunkID){case"COMM":{if(this.isCompressed===null)throw new GI("Failed to parse AIFF.COMM chunk when compression type is unknown");let o=await this.tokenizer.readToken(new ub(t,this.isCompressed));return this.metadata.setFormat("bitsPerSample",o.sampleSize),this.metadata.setFormat("sampleRate",o.sampleRate),this.metadata.setFormat("numberOfChannels",o.numChannels),this.metadata.setFormat("numberOfSamples",o.numSampleFrames),this.metadata.setFormat("duration",o.numSampleFrames/o.sampleRate),(o.compressionName||o.compressionType)&&this.metadata.setFormat("codec",o.compressionName??uoe[o.compressionType]),t.chunkSize}case"ID3 ":{let o=await this.tokenizer.readToken(new _t(t.chunkSize)),a=So(o);return await new hn().parse(this.metadata,a,this.options),t.chunkSize}case"SSND":return this.metadata.format.duration&&this.metadata.setFormat("bitrate",8*t.chunkSize/this.metadata.format.duration),0;case"NAME":case"AUTH":case"(c) ":case"ANNO":return this.readTextChunk(t);default:return vU(`Ignore chunk id=${t.chunkID}, size=${t.chunkSize}`),0}}async readTextChunk(t){let a=(await this.tokenizer.readToken(new We(t.chunkSize,"ascii"))).split("\0").map(e=>e.trim()).filter(e=>e?.length);return await Promise.all(a.map(e=>this.metadata.addTag("AIFF",t.chunkID,e))),t.chunkSize}}});var yoe,moe=ue(()=>{yoe={parserType:"aiff",extensions:[".aif","aiff","aifc"],mimeTypes:["audio/aiff","audio/aif","audio/aifc","application/aiff"],async load(){return(await Promise.resolve().then(()=>(Qoe(),foe))).AIFFParser}}});var Lf,Soe,woe,Doe=ue(()=>{DA();Da();Lf={len:12,get:(n,t)=>({id:at.get(n,t),size:Lr.get(n,t+4)})},Soe={len:16,get:(n,t)=>({fileSize:mf.get(n,t),metadataPointer:mf.get(n,t+8)})},woe={len:40,get:(n,t)=>({formatVersion:Cr.get(n,t),formatID:Cr.get(n,t+4),channelType:Cr.get(n,t+8),channelNum:Cr.get(n,t+12),samplingFrequency:Cr.get(n,t+16),bitsPerSample:Cr.get(n,t+20),sampleCount:mf.get(n,t+24),blockSizePerChannel:Cr.get(n,t+32)})}});var boe={};Ur(boe,{DsdContentParseError:()=>Bb,DsfParser:()=>FU});var Ooe,GU,Bb,FU,Moe=ue(()=>{Ooe=ze(lt(),1);Pf();Doe();hE();nr();GU=(0,Ooe.default)("music-metadata:parser:DSF"),Bb=class extends St("DSD"){},FU=class extends ag{async postId3v2Parse(){let t=this.tokenizer.position,o=await this.tokenizer.readToken(Lf);if(o.id!=="DSD ")throw new Bb("Invalid chunk signature");this.metadata.setFormat("container","DSF"),this.metadata.setFormat("lossless",!0),this.metadata.setAudioOnly();let a=await this.tokenizer.readToken(Soe);if(a.metadataPointer===BigInt(0))GU("No ID3v2 tag present");else return GU(`expect ID3v2 at offset=${a.metadataPointer}`),await this.parseChunks(a.fileSize-o.size),await this.tokenizer.ignore(Number(a.metadataPointer)-this.tokenizer.position-t),new hn().parse(this.metadata,this.tokenizer,this.options)}async parseChunks(t){for(;t>=Lf.len;){let o=await this.tokenizer.readToken(Lf);switch(GU(`Parsing chunk name=${o.id} size=${o.size}`),o.id){case"fmt ":{let a=await this.tokenizer.readToken(woe);this.metadata.setFormat("numberOfChannels",a.channelNum),this.metadata.setFormat("sampleRate",a.samplingFrequency),this.metadata.setFormat("bitsPerSample",a.bitsPerSample),this.metadata.setFormat("numberOfSamples",a.sampleCount),this.metadata.setFormat("duration",Number(a.sampleCount)/a.samplingFrequency);let e=a.bitsPerSample*a.samplingFrequency*a.channelNum;this.metadata.setFormat("bitrate",e);return}default:this.tokenizer.ignore(Number(o.size)-Lf.len);break}t-=o.size}}}});var _oe,Toe=ue(()=>{_oe={parserType:"dsf",extensions:[".dsf"],mimeTypes:["audio/dsf"],async load(){return(await Promise.resolve().then(()=>(Moe(),boe))).DsfParser}}});var FI,Uf,Noe,fb=ue(()=>{DA();TI();FI=class n{static fromBase64(t){return n.fromBuffer(Uint8Array.from(atob(t),o=>o.charCodeAt(0)))}static fromBuffer(t){return new n(t.length).get(t,0)}constructor(t){this.len=t}get(t,o){let a=sE[xe.get(t,o)];o+=4;let e=xe.get(t,o);o+=4;let i=new We(e,"utf-8").get(t,o);o+=e;let A=xe.get(t,o);o+=4;let r=new We(A,"utf-8").get(t,o);o+=A;let s=xe.get(t,o);o+=4;let g=xe.get(t,o);o+=4;let c=xe.get(t,o);o+=4;let I=xe.get(t,o);o+=4;let d=xe.get(t,o);o+=4;let B=t.slice(o,o+d);return{type:a,format:i,description:r,width:s,height:g,colour_depth:c,indexed_color:I,data:B}}},Uf={len:7,get:(n,t)=>({packetType:QA.get(n,t),vorbis:new We(6,"ascii").get(n,t+1)})},Noe={len:23,get:(n,t)=>({version:Le.get(n,t+0),channelMode:QA.get(n,t+4),sampleRate:Le.get(n,t+5),bitrateMax:Le.get(n,t+9),bitrateNominal:Le.get(n,t+13),bitrateMin:Le.get(n,t+17)})}});var SE,LU=ue(()=>{DA();Zs();SE=class{constructor(t,o){this.data=t,this.offset=o}readInt32(){let t=Le.get(this.data,this.offset);return this.offset+=4,t}readStringUtf8(){let t=this.readInt32(),o=Tr(this.data.subarray(this.offset,this.offset+t),"utf-8");return this.offset+=t,o}parseUserComment(){let t=this.offset,o=this.readStringUtf8(),a=o.indexOf("=");return{key:o.substring(0,a).toUpperCase(),value:o.substring(a+1),len:this.offset-t}}}});var Roe,wE,Hf,og,Kf=ue(()=>{DA();Roe=ze(lt(),1);LU();fb();nr();wE=(0,Roe.default)("music-metadata:parser:ogg:vorbis1"),Hf=class extends St("Vorbis"){},og=class n{constructor(t,o){this.pageSegments=[],this.durationOnLastPage=!0,this.metadata=t,this.options=o}async parsePage(t,o){if(this.lastPageHeader=t,t.headerType.firstPage)this.parseFirstPage(t,o);else{if(t.headerType.continued){if(this.pageSegments.length===0)throw new Hf("Cannot continue on previous page");this.pageSegments.push(o)}if(t.headerType.lastPage||!t.headerType.continued){if(this.pageSegments.length>0){let a=n.mergeUint8Arrays(this.pageSegments);await this.parseFullPage(a)}this.pageSegments=t.headerType.lastPage?[]:[o]}}}static mergeUint8Arrays(t){let o=t.reduce((e,i)=>e+i.length,0),a=new Uint8Array(o);return t.forEach((e,i,A)=>{let r=A.slice(0,i).reduce((s,g)=>s+g.length,0);a.set(e,r)}),a}async flush(){await this.parseFullPage(n.mergeUint8Arrays(this.pageSegments))}async parseUserComment(t,o){let e=new SE(t,o).parseUserComment();return await this.addTag(e.key,e.value),e.len}async addTag(t,o){if(t==="METADATA_BLOCK_PICTURE"&&typeof o=="string"){if(this.options.skipCovers){wE("Ignore picture");return}o=FI.fromBase64(o),wE(`Push picture: id=${t}, format=${o.format}`)}else wE(`Push tag: id=${t}, value=${o}`);await this.metadata.addTag("vorbis",t,o)}calculateDuration(t){this.lastPageHeader&&(t||this.lastPageHeader.headerType.lastPage)&&this.metadata.format.sampleRate&&this.lastPageHeader.absoluteGranulePosition>=0&&(this.metadata.setFormat("numberOfSamples",this.lastPageHeader.absoluteGranulePosition),this.metadata.setFormat("duration",this.lastPageHeader.absoluteGranulePosition/this.metadata.format.sampleRate))}parseFirstPage(t,o){this.metadata.setFormat("codec","Vorbis I"),this.metadata.setFormat("hasAudio",!0),wE("Parse first page");let a=Uf.get(o,0);if(a.vorbis!=="vorbis")throw new Hf("Metadata does not look like Vorbis");if(a.packetType===1){let e=Noe.get(o,Uf.len);this.metadata.setFormat("sampleRate",e.sampleRate),this.metadata.setFormat("bitrate",e.bitrateNominal),this.metadata.setFormat("numberOfChannels",e.channelMode),wE("sample-rate=%s[hz], bitrate=%s[b/s], channel-mode=%s",e.sampleRate,e.bitrateNominal,e.channelMode)}else throw new Hf("First Ogg page should be type 1: the identification header")}async parseFullPage(t){let o=Uf.get(t,0);switch(wE("Parse full page: type=%s, byteLength=%s",o.packetType,t.byteLength),o.packetType){case 3:return this.parseUserCommentList(t,Uf.len);case 1:case 5:break}}async parseUserCommentList(t,o){let a=Le.get(t,o);o+=4,o+=a;let e=Le.get(t,o);for(o+=4;e-- >0;)o+=await this.parseUserComment(t,o)}}});var ba,xf,Yf,UU=ue(()=>{sr();DA();ba={STREAMINFO:0,PADDING:1,APPLICATION:2,SEEKTABLE:3,VORBIS_COMMENT:4,CUESHEET:5,PICTURE:6},xf={len:4,get:(n,t)=>({lastBlock:GA(n,t,7),type:XA(n,t,1,7),length:Fr.get(n,t+1)})},Yf={len:34,get:(n,t)=>({minimumBlockSize:LA.get(n,t),maximumBlockSize:LA.get(n,t+2)/1e3,minimumFrameSize:Fr.get(n,t+4),maximumFrameSize:Fr.get(n,t+7),sampleRate:Fr.get(n,t+10)>>4,channels:XA(n,t+12,4,3)+1,bitsPerSample:XA(n,t+12,7,5)+1,totalSamples:XA(n,t+13,4,36),fileMD5:new _t(16).get(n,t+18)})}});var Poe={};Ur(Poe,{FlacParser:()=>jf});var voe,DVe,Qb,jf,HU=ue(()=>{voe=ze(lt(),1);DA();fb();Pf();Da();Kf();LU();nr();UU();DVe=(0,voe.default)("music-metadata:parser:FLAC"),Qb=class extends St("FLAC"){},jf=class extends ag{constructor(){super(...arguments),this.vorbisParser=new og(this.metadata,this.options)}async postId3v2Parse(){if((await this.tokenizer.readToken(at)).toString()!=="fLaC")throw new Qb("Invalid FLAC preamble");let o;do o=await this.tokenizer.readToken(xf),await this.parseDataBlock(o);while(!o.lastBlock);if(this.tokenizer.fileInfo.size&&this.metadata.format.duration){let a=this.tokenizer.fileInfo.size-this.tokenizer.position;this.metadata.setFormat("bitrate",8*a/this.metadata.format.duration)}}async parseDataBlock(t){switch(DVe(`blockHeader type=${t.type}, length=${t.length}`),t.type){case ba.STREAMINFO:return this.readBlockStreamInfo(t.length);case ba.PADDING:break;case ba.APPLICATION:break;case ba.SEEKTABLE:break;case ba.VORBIS_COMMENT:return this.readComment(t.length);case ba.CUESHEET:break;case ba.PICTURE:await this.parsePicture(t.length);return;default:this.metadata.addWarning(`Unknown block type: ${t.type}`)}return this.tokenizer.ignore(t.length).then()}async readBlockStreamInfo(t){if(t!==Yf.len)throw new Qb("Unexpected block-stream-info length");let o=await this.tokenizer.readToken(Yf);this.metadata.setFormat("container","FLAC"),this.processsStreamInfo(o)}processsStreamInfo(t){this.metadata.setFormat("codec","FLAC"),this.metadata.setFormat("hasAudio",!0),this.metadata.setFormat("lossless",!0),this.metadata.setFormat("numberOfChannels",t.channels),this.metadata.setFormat("bitsPerSample",t.bitsPerSample),this.metadata.setFormat("sampleRate",t.sampleRate),t.totalSamples>0&&this.metadata.setFormat("duration",t.totalSamples/t.sampleRate)}async readComment(t){let o=await this.tokenizer.readToken(new _t(t));return this.parseComment(o)}async parseComment(t){let o=new SE(t,0),a=o.readStringUtf8();a.length>0&&this.metadata.setFormat("tool",a);let e=o.readInt32(),i=new Array(e);for(let A=0;A(A.key==="ENCODER"&&this.metadata.setFormat("tool",A.value),this.addTag(A.key,A.value))))}async parsePicture(t){return this.options.skipCovers?this.tokenizer.ignore(t):this.addPictureTag(await this.tokenizer.readToken(new FI(t)))}addPictureTag(t){return this.addTag("METADATA_BLOCK_PICTURE",t)}addTag(t,o){return this.vorbisParser.addTag(t,o)}}});var Goe,Foe=ue(()=>{Goe={parserType:"flac",extensions:[".flac"],mimeTypes:["audio/flac"],async load(){return(await Promise.resolve().then(()=>(HU(),Poe))).FlacParser}}});var _e,KU=ue(()=>{_e={string:0,uint:1,uid:2,bool:3,binary:4,float:5}});var Loe,Uoe=ue(()=>{KU();Loe={name:"dtd",container:{440786851:{name:"ebml",container:{17030:{name:"ebmlVersion",value:_e.uint},17143:{name:"ebmlReadVersion",value:_e.uint},17138:{name:"ebmlMaxIDWidth",value:_e.uint},17139:{name:"ebmlMaxSizeWidth",value:_e.uint},17026:{name:"docType",value:_e.string},17031:{name:"docTypeVersion",value:_e.uint},17029:{name:"docTypeReadVersion",value:_e.uint}}},408125543:{name:"segment",container:{290298740:{name:"seekHead",container:{19899:{name:"seek",multiple:!0,container:{21419:{name:"id",value:_e.binary},21420:{name:"position",value:_e.uint}}}}},357149030:{name:"info",container:{29604:{name:"uid",value:_e.uid},29572:{name:"filename",value:_e.string},3979555:{name:"prevUID",value:_e.uid},3965867:{name:"prevFilename",value:_e.string},4110627:{name:"nextUID",value:_e.uid},4096955:{name:"nextFilename",value:_e.string},2807729:{name:"timecodeScale",value:_e.uint},17545:{name:"duration",value:_e.float},17505:{name:"dateUTC",value:_e.uint},31657:{name:"title",value:_e.string},19840:{name:"muxingApp",value:_e.string},22337:{name:"writingApp",value:_e.string}}},524531317:{name:"cluster",multiple:!0,container:{231:{name:"timecode",value:_e.uid},22743:{name:"silentTracks ",multiple:!0},167:{name:"position",value:_e.uid},171:{name:"prevSize",value:_e.uid},160:{name:"blockGroup"},163:{name:"simpleBlock"}}},374648427:{name:"tracks",container:{174:{name:"entries",multiple:!0,container:{215:{name:"trackNumber",value:_e.uint},29637:{name:"uid",value:_e.uid},131:{name:"trackType",value:_e.uint},185:{name:"flagEnabled",value:_e.bool},136:{name:"flagDefault",value:_e.bool},21930:{name:"flagForced",value:_e.bool},156:{name:"flagLacing",value:_e.bool},28135:{name:"minCache",value:_e.uint},28136:{name:"maxCache",value:_e.uint},2352003:{name:"defaultDuration",value:_e.uint},2306383:{name:"timecodeScale",value:_e.float},21358:{name:"name",value:_e.string},2274716:{name:"language",value:_e.string},134:{name:"codecID",value:_e.string},25506:{name:"codecPrivate",value:_e.binary},2459272:{name:"codecName",value:_e.string},3839639:{name:"codecSettings",value:_e.string},3883072:{name:"codecInfoUrl",value:_e.string},2536e3:{name:"codecDownloadUrl",value:_e.string},170:{name:"codecDecodeAll",value:_e.bool},28587:{name:"trackOverlay",value:_e.uint},224:{name:"video",container:{154:{name:"flagInterlaced",value:_e.bool},21432:{name:"stereoMode",value:_e.uint},176:{name:"pixelWidth",value:_e.uint},186:{name:"pixelHeight",value:_e.uint},21680:{name:"displayWidth",value:_e.uint},21690:{name:"displayHeight",value:_e.uint},21683:{name:"aspectRatioType",value:_e.uint},3061028:{name:"colourSpace",value:_e.uint},3126563:{name:"gammaValue",value:_e.float}}},225:{name:"audio",container:{181:{name:"samplingFrequency",value:_e.float},30901:{name:"outputSamplingFrequency",value:_e.float},159:{name:"channels",value:_e.uint},148:{name:"channels",value:_e.uint},32123:{name:"channelPositions",value:_e.binary},25188:{name:"bitDepth",value:_e.uint}}},28032:{name:"contentEncodings",container:{25152:{name:"contentEncoding",container:{20529:{name:"order",value:_e.uint},20530:{name:"scope",value:_e.bool},20531:{name:"type",value:_e.uint},20532:{name:"contentEncoding",container:{16980:{name:"contentCompAlgo",value:_e.uint},16981:{name:"contentCompSettings",value:_e.binary}}},20533:{name:"contentEncoding",container:{18401:{name:"contentEncAlgo",value:_e.uint},18402:{name:"contentEncKeyID",value:_e.binary},18403:{name:"contentSignature ",value:_e.binary},18404:{name:"ContentSigKeyID ",value:_e.binary},18405:{name:"contentSigAlgo ",value:_e.uint},18406:{name:"contentSigHashAlgo ",value:_e.uint}}},25188:{name:"bitDepth",value:_e.uint}}}}}}}}},475249515:{name:"cues",container:{187:{name:"cuePoint",container:{179:{name:"cueTime",value:_e.uid},183:{name:"positions",container:{247:{name:"track",value:_e.uint},241:{name:"clusterPosition",value:_e.uint},21368:{name:"blockNumber",value:_e.uint},234:{name:"codecState",value:_e.uint},219:{name:"reference",container:{150:{name:"time",value:_e.uint},151:{name:"cluster",value:_e.uint},21343:{name:"number",value:_e.uint},235:{name:"codecState",value:_e.uint}}},240:{name:"relativePosition",value:_e.uint}}}}}}},423732329:{name:"attachments",container:{24999:{name:"attachedFiles",multiple:!0,container:{18046:{name:"description",value:_e.string},18030:{name:"name",value:_e.string},18016:{name:"mimeType",value:_e.string},18012:{name:"data",value:_e.binary},18094:{name:"uid",value:_e.uid}}}}},272869232:{name:"chapters",container:{17849:{name:"editionEntry",container:{182:{name:"chapterAtom",container:{29636:{name:"uid",value:_e.uid},145:{name:"timeStart",value:_e.uint},146:{name:"timeEnd",value:_e.uid},152:{name:"hidden",value:_e.bool},17816:{name:"enabled",value:_e.uid},143:{name:"track",container:{137:{name:"trackNumber",value:_e.uid},128:{name:"display",container:{133:{name:"string",value:_e.string},17276:{name:"language ",value:_e.string},17278:{name:"country ",value:_e.string}}}}}}}}}}},307544935:{name:"tags",container:{29555:{name:"tag",multiple:!0,container:{25536:{name:"target",container:{25541:{name:"tagTrackUID",value:_e.uid},25540:{name:"tagChapterUID",value:_e.uint},25542:{name:"tagAttachmentUID",value:_e.uid},25546:{name:"targetType",value:_e.string},26826:{name:"targetTypeValue",value:_e.uint},25545:{name:"tagEditionUID",value:_e.uid}}},26568:{name:"simpleTags",multiple:!0,container:{17827:{name:"name",value:_e.string},17543:{name:"string",value:_e.string},17541:{name:"binary",value:_e.binary},17530:{name:"language",value:_e.string},17531:{name:"languageIETF",value:_e.string},17540:{name:"default",value:_e.bool}}}}}}}}}}}});function xU(n,t){return Number(OVe(n,t))}function OVe(n,t){let o=new Uint8Array(8),a=n.subarray(0,t);try{return o.set(a,8-t),eg.get(o,0)}catch{return BigInt(-1)}}function Koe(n){return n.container&&Object.keys(n.container).map(t=>{let o=n.container[t];return o.id=Number.parseInt(t,10),o}).forEach(t=>{t.parent=n,Koe(t)}),n}function Bd(n){let t="";return n.parent&&n.parent.name!=="dtd"&&(t+=`${Bd(n.parent)}/`),t+n.name}var Hoe,DE,yb,ng,mb,xoe=ue(()=>{DA();Hoe=ze(lt(),1);sn();KU();DA();nr();DE=(0,Hoe.default)("music-metadata:parser:ebml"),yb=class extends St("EBML"){},ng={ReadNext:0,IgnoreElement:2,SkipSiblings:3,TerminateParsing:4,SkipElement:5},mb=class{constructor(t){this.parserMap=new Map,this.ebmlMaxIDLength=4,this.ebmlMaxSizeLength=8,this.tokenizer=t,this.parserMap.set(_e.uint,o=>this.readUint(o)),this.parserMap.set(_e.string,o=>this.readString(o)),this.parserMap.set(_e.binary,o=>this.readBuffer(o)),this.parserMap.set(_e.uid,async o=>this.readBuffer(o)),this.parserMap.set(_e.bool,o=>this.readFlag(o)),this.parserMap.set(_e.float,o=>this.readFloat(o))}async iterate(t,o,a){return this.parseContainer(Koe(t),o,a)}async parseContainer(t,o,a){let e={};for(;this.tokenizer.position=0?this.tokenizer.position+i.len:-1,a);r.multiple?(e[r.name]||(e[r.name]=[]),e[r.name].push(g)):e[r.name]=g,await a.elementValue(r,g,A)}else{let g=this.parserMap.get(r.value);if(typeof g=="function"){let c=await g(i);e[r.name]=c,await a.elementValue(r,c,A)}}break;case ng.SkipElement:DE(`Go to next element: name=${Bd(r)}, element.id=0x${i.id}, container=${!!r.container} at position=${A}`);break;case ng.IgnoreElement:DE(`Ignore element: name=${Bd(r)}, element.id=0x${i.id}, container=${!!r.container} at position=${A}`),await this.tokenizer.ignore(i.len);break;case ng.SkipSiblings:DE(`Ignore remaining container, at: name=${Bd(r)}, element.id=0x${i.id}, container=${!!r.container} at position=${A}`),await this.tokenizer.ignore(o-this.tokenizer.position);break;case ng.TerminateParsing:return DE(`Terminate parsing at element: name=${Bd(r)}, element.id=0x${i.id}, container=${!!r.container} at position=${A}`),e}else switch(i.id){case 236:await this.tokenizer.ignore(i.len);break;default:DE(`parseEbml: parent=${Bd(t)}, unknown child: id=${i.id.toString(16)} at position=${A}`),await this.tokenizer.ignore(i.len)}}return e}async readVintData(t){let o=await this.tokenizer.peekNumber(QA),a=128,e=1;for(;(o&a)===0;){if(e>t)throw new yb("VINT value exceeding maximum size");++e,a>>=1}let i=new Uint8Array(e);return await this.tokenizer.readBuffer(i),i}async readElement(){let t=await this.readVintData(this.ebmlMaxIDLength),o=await this.readVintData(this.ebmlMaxSizeLength);return o[0]^=128>>o.length-1,{id:xU(t,t.length),len:xU(o,o.length)}}async readFloat(t){switch(t.len){case 0:return 0;case 4:return this.tokenizer.readNumber($2);case 8:return this.tokenizer.readNumber(KO);case 10:return this.tokenizer.readNumber(KO);default:throw new yb(`Invalid IEEE-754 float length: ${t.len}`)}}async readFlag(t){return await this.readUint(t)===1}async readUint(t){let o=await this.readBuffer(t);return xU(o,t.len)}async readString(t){return(await this.tokenizer.readToken(new We(t.len,"utf-8"))).replace(/\x00.*$/g,"")}async readBuffer(t){let o=new Uint8Array(t.len);return await this.tokenizer.readBuffer(o),o}}});var joe={};Ur(joe,{MatroskaParser:()=>YU});var Yoe,Sb,YU,Joe=ue(()=>{Yoe=ze(lt(),1);to();Uoe();IU();xoe();Sb=(0,Yoe.default)("music-metadata:parser:matroska"),YU=class extends Lt{constructor(){super(...arguments),this.seekHeadOffset=0,this.flagUseIndexToSkipClusters=this.options.mkvUseIndex??!1}async parse(){let t=this.tokenizer.fileInfo.size??Number.MAX_SAFE_INTEGER,o=new mb(this.tokenizer);Sb("Initializing DTD end MatroskaIterator"),await o.iterate(Loe,t,{startNext:a=>{switch(a.id){case 475249515:return Sb(`Skip element: name=${a.name}, id=0x${a.id.toString(16)}`),ng.IgnoreElement;case 524531317:if(this.flagUseIndexToSkipClusters&&this.seekHead){let e=this.seekHead.seek.find(i=>i.position+this.seekHeadOffset>this.tokenizer.position);if(e){let i=e.position+this.seekHeadOffset-this.tokenizer.position;return Sb(`Use index to go to next position, ignoring ${i} bytes`),this.tokenizer.ignore(i),ng.SkipElement}}return ng.IgnoreElement;default:return ng.ReadNext}},elementValue:async(a,e,i)=>{switch(Sb(`Received: name=${a.name}, value=${e}`),a.id){case 17026:this.metadata.setFormat("container",`EBML/${e}`);break;case 290298740:this.seekHead=e,this.seekHeadOffset=i;break;case 357149030:{let A=e,r=A.timecodeScale?A.timecodeScale:1e6;if(typeof A.duration=="number"){let s=A.duration*r/1e9;await this.addTag("segment:title",A.title),this.metadata.setFormat("duration",Number(s))}}break;case 374648427:{let A=e;if(A?.entries){A.entries.forEach(s=>{let g={codecName:s.codecID.replace("A_","").replace("V_",""),codecSettings:s.codecSettings,flagDefault:s.flagDefault,flagLacing:s.flagLacing,flagEnabled:s.flagEnabled,language:s.language,name:s.name,type:s.trackType,audio:s.audio,video:s.video};this.metadata.addStreamInfo(g)});let r=A.entries.filter(s=>s.trackType===yi.audio).reduce((s,g)=>!s||g.flagDefault&&!s.flagDefault||g.trackNumber{let s=r.target,g=s?.targetTypeValue?Aae[s.targetTypeValue]:s?.targetType?s.targetType:"track";await Promise.all(r.simpleTags.map(async c=>{let I=c.string?c.string:c.binary;await this.addTag(`${g}:${c.name}`,I)}))}))}break;case 423732329:{let A=e;await Promise.all(A.attachedFiles.filter(r=>r.mimeType.startsWith("image/")).map(r=>this.addTag("picture",{data:r.data,format:r.mimeType,description:r.description,name:r.name})))}break}}})}async addTag(t,o){await this.metadata.addTag("matroska",t,o)}}});var qoe,zoe=ue(()=>{qoe={parserType:"matroska",extensions:[".mka",".mkv",".mk3d",".mks","webm"],mimeTypes:["audio/matroska","video/matroska","audio/webm","video/webm"],async load(){return(await Promise.resolve().then(()=>(Joe(),joe))).MatroskaParser}}});function $oe(n,t,o,a,e){if(JU(`remainingLen=${a}, numberOfEntries=${e} * token-len=${t.len}`),a===0)return[];if(a!==e*t.len)throw new lc("mismatch number-of-entries with remaining atom-length");let i=[];for(let A=0;A{DA();Woe=ze(lt(),1);Da();nr();sr();nr();JU=(0,Woe.default)("music-metadata:parser:MP4:atom"),lc=class extends St("MP4"){},fd={len:8,get:(n,t)=>{let o=xe.get(n,t);if(o<0)throw new lc("Invalid atom header length");return{length:BigInt(o),name:new We(4,"latin1").get(n,t+4)}},put:(n,t,o)=>(xe.put(n,t,Number(o.length)),at.put(n,t+4,o.name))},Zoe=eg,qU={len:4,get:(n,t)=>({type:new We(4,"ascii").get(n,t)})},wb=class{constructor(t,o,a){if(to&&JU(`Warning: atom ${a} expected to be ${o}, but was actually ${t} bytes long.`),this.len=t}},OE={len:4,get:(n,t)=>{let o=xe.get(n,t)-2082844800;return new Date(o*1e3)}},bE={len:8,get:(n,t)=>{let o=Number(eg.get(n,t))-2082844800;return new Date(o*1e3)}},Db=class extends wb{constructor(t){super(t,24,"mdhd")}get(t,o){let a=QA.get(t,o+0),e=Fr.get(t,o+1);switch(a){case 0:return{version:a,flags:e,creationTime:OE.get(t,o+4),modificationTime:OE.get(t,o+8),timeScale:xe.get(t,o+12),duration:xe.get(t,o+16),language:LA.get(t,o+20),quality:LA.get(t,o+22)};case 1:return{version:a,flags:e,creationTime:bE.get(t,o+4),modificationTime:bE.get(t,o+12),timeScale:xe.get(t,o+20),duration:Number(eg.get(t,o+24)),language:LA.get(t,o+32),quality:LA.get(t,o+34)};default:throw new In("Invalid mdhd version header")}}},Ob=class extends wb{constructor(t){super(t,100,"mvhd")}get(t,o){let a=QA.get(t,o),e=Fr.get(t,o+1);return a===1?{version:a,flags:e,creationTime:bE.get(t,o+4),modificationTime:bE.get(t,o+12),timeScale:xe.get(t,o+20),duration:Number(eg.get(t,o+24)),preferredRate:xe.get(t,o+32),preferredVolume:LA.get(t,o+36),previewTime:xe.get(t,o+84),previewDuration:xe.get(t,o+88),posterTime:xe.get(t,o+92),selectionTime:xe.get(t,o+96),selectionDuration:xe.get(t,o+100),currentTime:xe.get(t,o+104),nextTrackID:xe.get(t,o+108)}:{version:a,flags:e,creationTime:OE.get(t,o+4),modificationTime:OE.get(t,o+8),timeScale:xe.get(t,o+12),duration:xe.get(t,o+16),preferredRate:xe.get(t,o+20),preferredVolume:LA.get(t,o+24),previewTime:xe.get(t,o+72),previewDuration:xe.get(t,o+76),posterTime:xe.get(t,o+80),selectionTime:xe.get(t,o+84),selectionDuration:xe.get(t,o+88),currentTime:xe.get(t,o+92),nextTrackID:xe.get(t,o+96)}}},bb=class{constructor(t){this.len=t}get(t,o){return{type:{set:QA.get(t,o+0),type:Fr.get(t,o+1)},locale:Fr.get(t,o+4),value:new _t(this.len-8).get(t,o+8)}}},Mb=class{constructor(t){this.len=t}get(t,o){return{version:QA.get(t,o),flags:Fr.get(t,o+1),name:new We(this.len-4,"utf-8").get(t,o+4)}}},_b=class{constructor(t){this.len=t}get(t,o){let a=QA.get(t,o),e=Fr.get(t,o+1);switch(a){case 0:return{version:a,flags:e,creationTime:OE.get(t,o+4),modificationTime:OE.get(t,o+8),trackId:xe.get(t,o+12),duration:xe.get(t,o+20),layer:LA.get(t,o+32),alternateGroup:LA.get(t,o+34),volume:LA.get(t,o+36)};case 1:return{version:a,flags:e,creationTime:bE.get(t,o+4),modificationTime:bE.get(t,o+12),trackId:xe.get(t,o+20),duration:Number(eg.get(t,o+28)),layer:LA.get(t,o+44),alternateGroup:LA.get(t,o+46),volume:LA.get(t,o+48)};default:throw new In("Invalid tkhd version header")}}},Voe={len:8,get:(n,t)=>({version:QA.get(n,t),flags:Fr.get(n,t+1),numberOfEntries:xe.get(n,t+4)})},jU=class{constructor(t){this.len=t}get(t,o){let a=this.len-12;return{dataFormat:at.get(t,o),dataReferenceIndex:LA.get(t,o+10),description:a>0?new _t(a).get(t,o+12):void 0}}},Jf=class{constructor(t){this.len=t}get(t,o){let a=Voe.get(t,o);o+=Voe.len;let e=[];for(let i=0;i=this.len){JU("TrackRunBox size mismatch");break}let r={};e.flags.sampleDurationPresent&&(r.sampleDuration=xe.get(t,i),i+=4),e.flags.sampleSizePresent&&(r.sampleSize=xe.get(t,i),i+=4),e.flags.sampleFlagsPresent&&(r.sampleFlags=xe.get(t,i),i+=4),e.flags.sampleCompositionTimeOffsetsPresent&&(r.sampleCompositionTimeOffset=xe.get(t,i),i+=4),e.samples.push(r)}return e}},Gb=class{constructor(t){this.len=t}get(t,o){let a=o+1,e=new We(4,"utf-8");return{version:$s.get(t,o),flags:Fr.get(t,o+1),componentType:e.get(t,o+4),handlerType:e.get(t,o+8),componentName:new We(this.len-28,"utf-8").get(t,o+28)}}},Fb=class{constructor(t){this.len=t}get(t,o){let a=0,e=[];for(;a{tne=ze(lt(),1);Vf();Vf();Ane=(0,tne.default)("music-metadata:parser:MP4:Atom"),Lb=class n{static async readAtom(t,o,a,e){let i=t.position;Ane(`Reading next token on offset=${i}...`);let A=await t.readToken(fd),r=A.length===1n;r&&(A.length=await t.readToken(Zoe));let s=new n(A,r,a),g=s.getPayloadLength(e);return Ane(`parse atom name=${s.atomPath}, extended=${s.extended}, offset=${i}, len=${s.header.length}`),await s.readData(t,o,g),s}constructor(t,o,a){this.header=t,this.extended=o,this.parent=a,this.children=[],this.atomPath=(this.parent?`${this.parent.atomPath}.`:"")+this.header.name}getHeaderLength(){return this.extended?16:8}getPayloadLength(t){return(this.header.length===0n?t:Number(this.header.length))-this.getHeaderLength()}async readAtoms(t,o,a){for(;a>0;){let e=await n.readAtom(t,o,this,a);this.children.push(e),a-=e.header.length===0n?a:Number(e.header.length)}}async readData(t,o,a){switch(this.header.name){case"moov":case"udta":case"mdia":case"minf":case"stbl":case"":case"ilst":case"tref":case"moof":return this.readAtoms(t,o,this.getPayloadLength(a));case"meta":{let i=(await t.peekToken(fd)).name==="hdlr"?0:4;return await t.ignore(i),this.readAtoms(t,o,this.getPayloadLength(a)-i)}default:return o(this,a)}}}});var nne={};Ur(nne,{MP4Parser:()=>VU});function ane(n,t,o){return o.indexOf(n)===t}var one,io,_Ve,ine,VU,sne=ue(()=>{one=ze(lt(),1);DA();to();Rf();rne();Vf();Vf();Id();Df();Zs();io=(0,one.default)("music-metadata:parser:MP4"),_Ve="iTunes",ine={raw:{lossy:!1,format:"raw"},MAC3:{lossy:!0,format:"MACE 3:1"},MAC6:{lossy:!0,format:"MACE 6:1"},ima4:{lossy:!0,format:"IMA 4:1"},ulaw:{lossy:!0,format:"uLaw 2:1"},alaw:{lossy:!0,format:"uLaw 2:1"},Qclp:{lossy:!0,format:"QUALCOMM PureVoice"},".mp3":{lossy:!0,format:"MPEG-1 layer 3"},alac:{lossy:!1,format:"ALAC"},"ac-3":{lossy:!0,format:"AC-3"},mp4a:{lossy:!0,format:"MPEG-4/AAC"},mp4s:{lossy:!0,format:"MP4S"},c608:{lossy:!0,format:"CEA-608"},c708:{lossy:!0,format:"CEA-708"}};VU=class n extends Lt{constructor(){super(...arguments),this.tracks=new Map,this.hasVideoTrack=!1,this.hasAudioTrack=!0,this.atomParsers={mvhd:async t=>{let o=await this.tokenizer.readToken(new Ob(t));this.metadata.setFormat("creationTime",o.creationTime),this.metadata.setFormat("modificationTime",o.modificationTime)},chap:async t=>{let o=this.getTrackDescription(),a=[];for(;t>=xe.len;)a.push(await this.tokenizer.readNumber(xe)),t-=xe.len;o.chapterList=a},mdat:async t=>{if(this.options.includeChapters){let o=[...this.tracks.values()].filter(a=>a.chapterList);if(o.length===1){let a=o[0].chapterList,e=[...this.tracks.values()].filter(i=>a.indexOf(i.header.trackId)!==-1);if(e.length===1)return this.parseChapterTrack(e[0],o[0],t)}}await this.tokenizer.ignore(t)},ftyp:async t=>{let o=[];for(;t>0;){let e=await this.tokenizer.readToken(qU);t-=qU.len;let i=e.type.replace(/\W/g,"");i.length>0&&o.push(i)}io(`ftyp: ${o.join("/")}`);let a=o.filter(ane).join("/");this.metadata.setFormat("container",a)},stsd:async t=>{let o=await this.tokenizer.readToken(new Jf(t)),a=this.getTrackDescription();a.soundSampleDescription=o.table.map(e=>this.parseSoundSampleDescription(e))},stsz:async t=>{let o=await this.tokenizer.readToken(new zf(t)),a=this.getTrackDescription();a.sampleSize=o.sampleSize,a.sampleSizeTable=o.entries},date:async t=>{let o=await this.tokenizer.readToken(new We(t,"utf-8"));await this.addTag("date",o)}}}static read_BE_Integer(t,o){let a=(o?"INT":"UINT")+t.length*8+(t.length>1?"_BE":""),e=VA[a];if(!e)throw new lc(`Token for integer type not found: "${a}"`);return Number(e.get(t,0))}async parse(){this.hasVideoTrack=!1,this.hasAudioTrack=!0,this.tracks.clear();let t=this.tokenizer.fileInfo.size||0;for(;!this.tokenizer.fileInfo.size||t>0;){try{if((await this.tokenizer.peekToken(fd)).name==="\0\0\0\0"){let A=`Error at offset=${this.tokenizer.position}: box.id=0`;io(A),this.addWarning(A);break}}catch(i){if(i instanceof Error){let A=`Error at offset=${this.tokenizer.position}: ${i.message}`;io(A),this.addWarning(A)}else throw i;break}let e=await Lb.readAtom(this.tokenizer,(i,A)=>this.handleAtom(i,A),null,t);t-=e.header.length===BigInt(0)?t:Number(e.header.length)}let o=[];this.tracks.forEach(e=>{let i=[];e.soundSampleDescription.forEach(A=>{let r={},s=ine[A.dataFormat];if(s?(i.push(s.format),r.codecName=s.format):r.codecName=`<${A.dataFormat}>`,A.description){let{description:g}=A;g.sampleRate>0&&(r.type=yi.audio,r.audio={samplingFrequency:g.sampleRate,bitDepth:g.sampleSize,channels:g.numAudioChannels})}this.metadata.addStreamInfo(r)}),i.length>=1&&o.push(i.join("/"))}),o.length>0&&this.metadata.setFormat("codec",o.filter(ane).join("+"));let a=[...this.tracks.values()].filter(e=>e.soundSampleDescription.length>=1&&e.soundSampleDescription[0].description&&e.soundSampleDescription[0].description.numAudioChannels>0);for(let e of a){if(e.media.header&&e.media.header.timeScale>0)if(e.sampleRate=e.media.header.timeScale,e.media.header.duration>0&&(io("Using duration defined on audio track"),e.samples=e.media.header.duration,e.duration=e.samples/e.sampleRate),e.fragments.length>0){io("Calculate duration defined in track fragments");let r=0;e.sizeInBytes=0;for(let s of e.fragments)for(let g of s.trackRun.samples){let c=g.sampleDuration??s.header.defaultSampleDuration??0,I=g.sampleSize??s.header.defaultSampleSize??0;if(c===0)throw new Error("Missing sampleDuration and no defaultSampleDuration in track fragment header");if(I===0)throw new Error("Missing sampleSize and no defaultSampleSize in track fragment header");r+=c,e.sizeInBytes+=I}e.samples||(e.samples=r),e.duration||(e.duration=r/e.sampleRate)}else e.sampleSizeTable.length>0&&(e.sizeInBytes=e.sampleSizeTable.reduce((r,s)=>r+s,0));let i=e.soundSampleDescription[0];if(i.description&&e.media.header&&(this.metadata.setFormat("sampleRate",i.description.sampleRate),this.metadata.setFormat("bitsPerSample",i.description.sampleSize),this.metadata.setFormat("numberOfChannels",i.description.numAudioChannels),e.media.header.timeScale===0&&e.timeToSampleTable.length>0)){let r=e.timeToSampleTable.map(s=>s.count*s.duration).reduce((s,g)=>s+g);e.duration=r/i.description.sampleRate}let A=ine[i.dataFormat];A&&this.metadata.setFormat("lossless",!A.lossy)}if(a.length>=1){let e=a[0];e.duration&&(this.metadata.setFormat("duration",e.duration),e.sizeInBytes&&this.metadata.setFormat("bitrate",8*e.sizeInBytes/e.duration))}this.metadata.setFormat("hasAudio",this.hasAudioTrack),this.metadata.setFormat("hasVideo",this.hasVideoTrack)}async handleAtom(t,o){if(t.parent)switch(t.parent.header.name){case"ilst":case"":return this.parseMetadataItemData(t);case"moov":switch(t.header.name){case"trak":return this.parseTrackBox(t);case"udta":return this.parseTrackBox(t)}break;case"moof":switch(t.header.name){case"traf":return this.parseTrackFragmentBox(t)}}if(this.atomParsers[t.header.name])return this.atomParsers[t.header.name](o);io(`No parser for atom path=${t.atomPath}, payload-len=${o}, ignoring atom`),await this.tokenizer.ignore(o)}getTrackDescription(){let t=[...this.tracks.values()];return t[t.length-1]}async addTag(t,o){await this.metadata.addTag(_Ve,t,o)}addWarning(t){io(`Warning: ${t}`),this.metadata.addWarning(t)}parseMetadataItemData(t){let o=t.header.name;return t.readAtoms(this.tokenizer,async(a,e)=>{let i=a.getPayloadLength(e);switch(a.header.name){case"data":return this.parseValueAtom(o,a);case"name":case"mean":case"rate":{let A=await this.tokenizer.readToken(new Mb(i));o+=`:${A.name}`;break}default:{let A=await this.tokenizer.readToken(new _t(i));this.addWarning(`Unsupported meta-item: ${o}[${a.header.name}] => value=${YO(A)} ascii=${Tr(A,"ascii")}`)}}},t.getPayloadLength(0))}async parseValueAtom(t,o){let a=await this.tokenizer.readToken(new bb(Number(o.header.length)-fd.len));if(a.type.set!==0)throw new lc(`Unsupported type-set != 0: ${a.type.set}`);switch(a.type.type){case 0:switch(t){case"trkn":case"disk":{let e=QA.get(a.value,3),i=QA.get(a.value,5);await this.addTag(t,`${e}/${i}`);break}case"gnre":{let e=QA.get(a.value,1),i=pE[e-1];await this.addTag(t,i);break}case"rate":{let e=Tr(a.value,"ascii");await this.addTag(t,e);break}default:io(`unknown proprietary value type for: ${o.atomPath}`)}break;case 1:case 18:await this.addTag(t,Tr(a.value));break;case 13:if(this.options.skipCovers)break;await this.addTag(t,{format:"image/jpeg",data:Uint8Array.from(a.value)});break;case 14:if(this.options.skipCovers)break;await this.addTag(t,{format:"image/png",data:Uint8Array.from(a.value)});break;case 21:await this.addTag(t,n.read_BE_Integer(a.value,!0));break;case 22:await this.addTag(t,n.read_BE_Integer(a.value,!1));break;case 65:await this.addTag(t,QA.get(a.value,0));break;case 66:await this.addTag(t,LA.get(a.value,0));break;case 67:await this.addTag(t,xe.get(a.value,0));break;default:this.addWarning(`atom key=${t}, has unknown well-known-type (data-type): ${a.type.type}`)}}async parseTrackBox(t){let o={media:{},fragments:[]};await t.readAtoms(this.tokenizer,async(a,e)=>{let i=a.getPayloadLength(e);switch(a.header.name){case"chap":{let A=await this.tokenizer.readToken(new Fb(e));o.chapterList=A;break}case"tkhd":o.header=await this.tokenizer.readToken(new _b(i));break;case"hdlr":o.handler=await this.tokenizer.readToken(new Gb(i)),o.isAudio=()=>o.handler.handlerType==="audi"||o.handler.handlerType==="soun",o.isVideo=()=>o.handler.handlerType==="vide",o.isAudio()?this.hasAudioTrack=!0:o.isVideo()&&(this.hasVideoTrack=!0);break;case"mdhd":{let A=await this.tokenizer.readToken(new Db(i));o.media.header=A;break}case"stco":{let A=await this.tokenizer.readToken(new Rb(i));o.chunkOffsetTable=A.entries;break}case"stsc":{let A=await this.tokenizer.readToken(new Nb(i));o.sampleToChunkTable=A.entries;break}case"stsd":{let A=await this.tokenizer.readToken(new Jf(i));o.soundSampleDescription=A.table.map(r=>this.parseSoundSampleDescription(r));break}case"stts":{let A=await this.tokenizer.readToken(new Tb(i));o.timeToSampleTable=A.entries;break}case"stsz":{let A=await this.tokenizer.readToken(new zf(i));o.sampleSize=A.sampleSize,o.sampleSizeTable=A.entries;break}case"dinf":case"vmhd":case"smhd":io(`Ignoring: ${a.header.name}`),await this.tokenizer.ignore(i);break;default:io(`Unexpected track box: ${a.header.name}`),await this.tokenizer.ignore(i)}},t.getPayloadLength(0)),this.tracks.set(o.header.trackId,o)}parseTrackFragmentBox(t){let o;return t.readAtoms(this.tokenizer,async(a,e)=>{let i=a.getPayloadLength(e);switch(a.header.name){case"tfhd":{let A=new vb(a.getPayloadLength(e));o=await this.tokenizer.readToken(A);break}case"tfdt":await this.tokenizer.ignore(i);break;case"trun":{let A=new Pb(i),r=await this.tokenizer.readToken(A);o&&this.tracks.get(o.trackId)?.fragments.push({header:o,trackRun:r});break}default:io(`Unexpected box: ${a.header.name}`),await this.tokenizer.ignore(i)}},t.getPayloadLength(0))}parseSoundSampleDescription(t){let o={dataFormat:t.dataFormat,dataReferenceIndex:t.dataReferenceIndex},a=0;if(t.description){let e=zU.get(t.description,a);a+=zU.len,e.version===0||e.version===1?o.description=Xoe.get(t.description,a):io(`Warning: sound-sample-description ${e} not implemented`)}return o}async parseChapterTrack(t,o,a){if(!t.sampleSize&&t.chunkOffsetTable.length!==t.sampleSizeTable.length)throw new Error("Expected equal chunk-offset-table & sample-size-table length.");let e=[];for(let i=0;i0;++i){let A=t.timeToSampleTable.slice(0,i).reduce((d,B)=>d+B.duration,0),s=t.chunkOffsetTable[i]-this.tokenizer.position,g=t.sampleSize>0?t.sampleSize:t.sampleSizeTable[i];if(a-=s+g,a<0)throw new lc("Chapter chunk exceeding token length");await this.tokenizer.ignore(s);let c=await this.tokenizer.readToken(new kb(g));io(`Chapter ${i+1}: ${c}`);let I={title:c,timeScale:t.media.header?t.media.header.timeScale:0,start:A,sampleOffset:this.findSampleOffset(o,this.tokenizer.position)};io(`Chapter title=${I.title}, offset=${I.sampleOffset}/${o.header.duration}`),e.push(I)}this.metadata.setFormat("chapters",e),await this.tokenizer.ignore(a)}findSampleOffset(t,o){let a=0;for(;a=o[a].firstChunk&&t{gne={parserType:"mp4",extensions:[".mp4",".m4a",".m4b",".m4pa","m4v","m4r","3gp",".mov",".movie",".qt"],mimeTypes:["audio/mp4","audio/m4a","video/m4v","video/mp4","video/quicktime"],async load(){return(await Promise.resolve().then(()=>(sne(),nne))).MP4Parser}}});var pne,Ine,TVe,lne,dne,Ub,hne=ue(()=>{DA();pne=ze(lt(),1);sr();Ine=(0,pne.default)("music-metadata:parser:musepack:sv8"),TVe=new We(2,"latin1"),lne={len:5,get:(n,t)=>({crc:Le.get(n,t),streamVersion:QA.get(n,t+4)})},dne={len:2,get:(n,t)=>({sampleFrequency:[44100,48e3,37800,32e3][XA(n,t,0,3)],maxUsedBands:XA(n,t,3,5),channelCount:XA(n,t+1,0,4)+1,msUsed:Ki(n,t+1,4),audioBlockFrames:XA(n,t+1,5,3)})},Ub=class{get tokenizer(){return this._tokenizer}set tokenizer(t){this._tokenizer=t}constructor(t){this._tokenizer=t}async readPacketHeader(){let t=await this.tokenizer.readToken(TVe),o=await this.readVariableSizeField();return{key:t,payloadLength:o.value-2-o.len}}async readStreamHeader(t){let o={};Ine(`Reading SH at offset=${this.tokenizer.position}`);let a=await this.tokenizer.readToken(lne);t-=lne.len,Object.assign(o,a),Ine(`SH.streamVersion = ${a.streamVersion}`);let e=await this.readVariableSizeField();t-=e.len,o.sampleCount=e.value;let i=await this.readVariableSizeField();t-=i.len,o.beginningOfSilence=i.value;let A=await this.tokenizer.readToken(dne);return t-=dne.len,Object.assign(o,A),await this.tokenizer.ignore(t),o}async readVariableSizeField(t=1,o=0){let a=await this.tokenizer.readNumber(QA);return(a&128)===0?{len:t,value:o+a}:(a&=127,a+=o,this.readVariableSizeField(t+1,a<<7))}}});var dc,Hb=ue(()=>{nr();dc=class extends St("Musepack"){}});var Ene,RVe,Kb,une=ue(()=>{Ene=ze(lt(),1);to();pd();Da();hne();Hb();RVe=(0,Ene.default)("music-metadata:parser:musepack"),Kb=class extends Lt{constructor(){super(...arguments),this.audioLength=0}async parse(){if(await this.tokenizer.readToken(at)!=="MPCK")throw new dc("Invalid Magic number");return this.metadata.setFormat("container","Musepack, SV8"),this.parsePacket()}async parsePacket(){let t=new Ub(this.tokenizer);do{let o=await t.readPacketHeader();switch(RVe(`packet-header key=${o.key}, payloadLength=${o.payloadLength}`),o.key){case"SH":{let a=await t.readStreamHeader(o.payloadLength);this.metadata.setFormat("numberOfSamples",a.sampleCount),this.metadata.setFormat("sampleRate",a.sampleFrequency),this.metadata.setFormat("duration",a.sampleCount/a.sampleFrequency),this.metadata.setFormat("numberOfChannels",a.channelCount);break}case"AP":this.audioLength+=o.payloadLength,await this.tokenizer.ignore(o.payloadLength);break;case"RG":case"EI":case"SO":case"ST":case"CT":await this.tokenizer.ignore(o.payloadLength);break;case"SE":return this.metadata.format.duration&&this.metadata.setFormat("bitrate",this.audioLength*8/this.metadata.format.duration),dd(this.metadata,this.tokenizer,this.options);default:throw new dc(`Unexpected header: ${o.key}`)}}while(!0)}}});var xb,Cne=ue(()=>{DA();xb=class{constructor(t){this.pos=0,this.dword=null,this.tokenizer=t}async read(t){for(;this.dword===null;)this.dword=await this.tokenizer.readToken(Le);let o=this.dword;return this.pos+=t,this.pos<32?(o>>>=32-this.pos,o&(1<>>32-this.pos),o&(1<0){let e=32-this.pos;this.dword=null,t-=e,this.pos=0}let o=t%32,a=(t-o)/32;return await this.tokenizer.ignore(a*4),this.read(o)}}});var Bne,fne=ue(()=>{DA();sr();Zs();Bne={len:24,get:(n,t)=>{let o={signature:Tr(n.subarray(t,t+3),"latin1"),streamMinorVersion:XA(n,t+3,0,4),streamMajorVersion:XA(n,t+3,4,4),frameCount:Le.get(n,t+4),maxLevel:SA.get(n,t+8),sampleFrequency:[44100,48e3,37800,32e3][XA(n,t+10,0,2)],link:XA(n,t+10,2,2),profile:XA(n,t+10,4,4),maxBand:XA(n,t+11,0,6),intensityStereo:Ki(n,t+11,6),midSideStereo:Ki(n,t+11,7),titlePeak:SA.get(n,t+12),titleGain:SA.get(n,t+14),albumPeak:SA.get(n,t+16),albumGain:SA.get(n,t+18),lastFrameLength:Le.get(n,t+20)>>>20&2047,trueGapless:Ki(n,t+23,0)};return o.lastFrameLength=o.trueGapless?Le.get(n,20)>>>20&2047:0,o}}});var yne,Qne,Yb,mne=ue(()=>{yne=ze(lt(),1);to();pd();Cne();fne();Hb();Qne=(0,yne.default)("music-metadata:parser:musepack"),Yb=class extends Lt{constructor(){super(...arguments),this.bitreader=null,this.audioLength=0,this.duration=null}async parse(){let t=await this.tokenizer.readToken(Bne);if(t.signature!=="MP+")throw new dc("Unexpected magic number");Qne(`stream-version=${t.streamMajorVersion}.${t.streamMinorVersion}`),this.metadata.setFormat("container","Musepack, SV7"),this.metadata.setFormat("sampleRate",t.sampleFrequency);let o=1152*(t.frameCount-1)+t.lastFrameLength;this.metadata.setFormat("numberOfSamples",o),this.duration=o/t.sampleFrequency,this.metadata.setFormat("duration",this.duration),this.bitreader=new xb(this.tokenizer),this.metadata.setFormat("numberOfChannels",t.midSideStereo||t.intensityStereo?2:1);let a=await this.bitreader.read(8);return this.metadata.setFormat("codec",(a/100).toFixed(2)),await this.skipAudioData(t.frameCount),Qne(`End of audio stream, switching to APEv2, offset=${this.tokenizer.position}`),dd(this.metadata,this.tokenizer,this.options)}async skipAudioData(t){for(;t-- >0;){let a=await this.bitreader.read(20);this.audioLength+=20+a,await this.bitreader.ignore(a)}let o=await this.bitreader.read(11);this.audioLength+=o,this.duration!==null&&this.metadata.setFormat("bitrate",this.audioLength/this.duration)}}});var Dne={};Ur(Dne,{MusepackParser:()=>WU});var wne,Sne,WU,One=ue(()=>{wne=ze(lt(),1);DA();Pf();une();mne();Hb();Sne=(0,wne.default)("music-metadata:parser:musepack"),WU=class extends ag{async postId3v2Parse(){let t=await this.tokenizer.peekToken(new We(3,"latin1")),o;switch(t){case"MP+":{Sne("Stream-version 7"),o=new Yb(this.metadata,this.tokenizer,this.options);break}case"MPC":{Sne("Stream-version 8"),o=new Kb(this.metadata,this.tokenizer,this.options);break}default:throw new dc("Invalid signature prefix")}return this.metadata.setAudioOnly(),o.parse()}}});var bne,Mne=ue(()=>{bne={parserType:"musepack",extensions:[".mpc"],mimeTypes:["audio/musepack"],async load(){return(await Promise.resolve().then(()=>(One(),Dne))).MusepackParser}}});var Wf,jb,ZU=ue(()=>{DA();nr();Wf=class extends St("Opus"){},jb=class{constructor(t){if(t<19)throw new Wf("ID-header-page 0 should be at least 19 bytes long");this.len=t}get(t,o){return{magicSignature:new We(8,"ascii").get(t,o+0),version:QA.get(t,o+8),channelCount:QA.get(t,o+9),preSkip:SA.get(t,o+10),inputSampleRate:Le.get(t,o+12),outputGain:SA.get(t,o+16),channelMapping:QA.get(t,o+18)}}}});var Jb,_ne=ue(()=>{DA();Kf();ZU();ZU();Jb=class extends og{constructor(t,o,a){super(t,o),this.idHeader=null,this.lastPos=-1,this.tokenizer=a,this.durationOnLastPage=!0}parseFirstPage(t,o){if(this.metadata.setFormat("codec","Opus"),this.idHeader=new jb(o.length).get(o,0),this.idHeader.magicSignature!=="OpusHead")throw new Wf("Illegal ogg/Opus magic-signature");this.metadata.setFormat("sampleRate",this.idHeader.inputSampleRate),this.metadata.setFormat("numberOfChannels",this.idHeader.channelCount),this.metadata.setAudioOnly()}async parseFullPage(t){switch(new We(8,"ascii").get(t,0)){case"OpusTags":await this.parseUserCommentList(t,8),this.lastPos=this.tokenizer.position-t.length;break;default:break}}calculateDuration(t){if(this.lastPageHeader&&(t||this.lastPageHeader.headerType.lastPage)&&this.metadata.format.sampleRate&&this.lastPageHeader.absoluteGranulePosition>=0){let o=this.lastPageHeader.absoluteGranulePosition-this.idHeader.preSkip;if(this.metadata.setFormat("numberOfSamples",o),this.metadata.setFormat("duration",o/48e3),this.lastPos!==-1&&this.tokenizer.fileInfo.size&&this.metadata.format.duration){let a=this.tokenizer.fileInfo.size-this.lastPos;this.metadata.setFormat("bitrate",8*a/this.metadata.format.duration)}}}}});var Tne,Nne=ue(()=>{DA();sr();Tne={len:80,get:(n,t)=>({speex:new We(8,"ascii").get(n,t+0),version:zO(new We(20,"ascii").get(n,t+8)),version_id:Cr.get(n,t+28),header_size:Cr.get(n,t+32),rate:Cr.get(n,t+36),mode:Cr.get(n,t+40),mode_bitstream_version:Cr.get(n,t+44),nb_channels:Cr.get(n,t+48),bitrate:Cr.get(n,t+52),frame_size:Cr.get(n,t+56),vbr:Cr.get(n,t+60),frames_per_packet:Cr.get(n,t+64),extra_headers:Cr.get(n,t+68),reserved1:Cr.get(n,t+72),reserved2:Cr.get(n,t+76)})}});var Rne,GVe,qb,kne=ue(()=>{Rne=ze(lt(),1);Kf();Nne();GVe=(0,Rne.default)("music-metadata:parser:ogg:speex"),qb=class extends og{constructor(t,o,a){super(t,o)}parseFirstPage(t,o){GVe("First Ogg/Speex page");let a=Tne.get(o,0);this.metadata.setFormat("codec",`Speex ${a.version}`),this.metadata.setFormat("numberOfChannels",a.nb_channels),this.metadata.setFormat("sampleRate",a.rate),a.bitrate!==-1&&this.metadata.setFormat("bitrate",a.bitrate),this.metadata.setAudioOnly()}}});var vne,Pne=ue(()=>{DA();vne={len:42,get:(n,t)=>({id:new We(7,"ascii").get(n,t),vmaj:QA.get(n,t+7),vmin:QA.get(n,t+8),vrev:QA.get(n,t+9),vmbw:LA.get(n,t+10),vmbh:LA.get(n,t+17),nombr:Fr.get(n,t+37),nqual:QA.get(n,t+40)})}});var Fne,Gne,zb,Lne=ue(()=>{Fne=ze(lt(),1);Pne();Gne=(0,Fne.default)("music-metadata:parser:ogg:theora"),zb=class{constructor(t,o,a){this.durationOnLastPage=!1,this.metadata=t}async parsePage(t,o){t.headerType.firstPage&&await this.parseFirstPage(t,o)}calculateDuration(){Gne("duration calculation not implemented")}async parseFirstPage(t,o){Gne("First Ogg/Theora page"),this.metadata.setFormat("codec","Theora");let a=vne.get(o,0);this.metadata.setFormat("bitrate",a.nombr),this.metadata.setFormat("hasVideo",!0)}flush(){return Promise.resolve()}}});var Une,Vb,Hne=ue(()=>{DA();sr();DA();Une={len:27,get:(n,t)=>({capturePattern:new We(4,"latin1").get(n,t),version:QA.get(n,t+4),headerType:{continued:GA(n,t+5,0),firstPage:GA(n,t+5,1),lastPage:GA(n,t+5,2)},absoluteGranulePosition:Number(Lr.get(n,t+6)),streamSerialNumber:Le.get(n,t+14),pageSequenceNo:Le.get(n,t+18),pageChecksum:Le.get(n,t+22),page_segments:QA.get(n,t+26)})},Vb=class n{static sum(t,o,a){let e=new DataView(t.buffer,0),i=0;for(let A=o;A{Kne=ze(lt(),1);UU();HU();Da();fb();XU=(0,Kne.default)("music-metadata:parser:ogg:theora"),Wb=class{constructor(t,o,a){this.durationOnLastPage=!1,this.metadata=t,this.options=o,this.tokenizer=a,this.flacParser=new jf(this.metadata,this.tokenizer,o)}async parsePage(t,o){t.headerType.firstPage&&await this.parseFirstPage(t,o)}calculateDuration(){XU("duration calculation not implemented")}async parseFirstPage(t,o){if(XU("First Ogg/FLAC page"),(await at.get(o,9)).toString()!=="fLaC")throw new Error("Invalid FLAC preamble");let e=await xf.get(o,13);await this.parseDataBlock(e,o.subarray(13+xf.len))}async parseDataBlock(t,o){switch(XU(`blockHeader type=${t.type}, length=${t.length}`),t.type){case ba.STREAMINFO:{let a=Yf.get(o,0);return this.flacParser.processsStreamInfo(a)}case ba.PADDING:break;case ba.APPLICATION:break;case ba.SEEKTABLE:break;case ba.VORBIS_COMMENT:return this.flacParser.parseComment(o);case ba.PICTURE:if(!this.options.skipCovers){let a=new FI(o.length).get(o,0);return this.flacParser.addPictureTag(a)}break;default:this.metadata.addWarning(`Unknown block type: ${t.type}`)}return this.tokenizer.ignore(t.length).then()}flush(){return Promise.resolve()}}});var jne={};Ur(jne,{OggContentError:()=>ME,OggParser:()=>eH});var Yne,ME,sg,$U,eH,Jne=ue(()=>{DA();sn();Yne=ze(lt(),1);to();Kf();_ne();kne();Lne();nr();Hne();xne();ME=class extends St("Ogg"){},sg=(0,Yne.default)("music-metadata:parser:ogg"),$U=class{constructor(t,o,a){this.pageNumber=0,this.closed=!1,this.metadata=t,this.streamSerial=o,this.options=a}async parsePage(t,o){this.pageNumber=o.pageSequenceNo,sg("serial=%s page#=%s, Ogg.id=%s",o.streamSerialNumber,o.pageSequenceNo,o.capturePattern);let a=await t.readToken(new Vb(o));sg("totalPageSize=%s",a.totalPageSize);let e=await t.readToken(new _t(a.totalPageSize));if(sg("firstPage=%s, lastPage=%s, continued=%s",o.headerType.firstPage,o.headerType.lastPage,o.headerType.continued),o.headerType.firstPage){this.metadata.setFormat("container","Ogg");let i=e.subarray(0,7),A=Array.from(i).filter(r=>r>=32&&r<=126).map(r=>String.fromCharCode(r)).join("");switch(A){case"vorbis":sg(`Set Ogg stream serial ${o.streamSerialNumber}, codec=Vorbis`),this.pageConsumer=new og(this.metadata,this.options);break;case"OpusHea":sg("Set page consumer to Ogg/Opus"),this.pageConsumer=new Jb(this.metadata,this.options,t);break;case"Speex ":sg("Set page consumer to Ogg/Speex"),this.pageConsumer=new qb(this.metadata,this.options,t);break;case"fishead":case"theora":sg("Set page consumer to Ogg/Theora"),this.pageConsumer=new zb(this.metadata,this.options,t);break;case"FLAC":sg("Set page consumer to Vorbis"),this.pageConsumer=new Wb(this.metadata,this.options,t);break;default:throw new ME(`Ogg codec not recognized (id=${A}`)}}if(o.headerType.lastPage&&(this.closed=!0),this.pageConsumer)await this.pageConsumer.parsePage(o,e);else throw new Error("pageConsumer should be initialized")}},eH=class extends Lt{constructor(){super(...arguments),this.streams=new Map}async parse(){this.streams=new Map;let t=!1,o;try{do{if(o=await this.tokenizer.readToken(Une),o.capturePattern!=="OggS")throw new ME("Invalid Ogg capture pattern");let a=this.streams.get(o.streamSerialNumber);if(a||(a=new $U(this.metadata,o.streamSerialNumber,this.options),this.streams.set(o.streamSerialNumber,a)),await a.parsePage(this.tokenizer,o),a.pageNumber>12&&!(this.options.duration&&[...this.streams.values()].find(e=>e.pageConsumer?.durationOnLastPage))){sg("Stop processing Ogg stream");break}}while(![...this.streams.values()].every(a=>a.closed))}catch(a){if(a instanceof kA)sg("Reached end-of-stream"),t=!0;else if(a instanceof ME)this.metadata.addWarning(`Corrupt Ogg content at ${this.tokenizer.position}`);else throw a}for(let a of this.streams.values())a.closed||(this.metadata.addWarning(`End-of-stream reached before reaching last page in Ogg stream serial=${a.streamSerial}`),await a.pageConsumer?.flush()),a.pageConsumer?.calculateDuration(t)}}});var qne,zne=ue(()=>{qne={parserType:"ogg",extensions:[".ogg",".ogv",".oga",".ogm",".ogx",".opus",".spx"],mimeTypes:["audio/ogg","audio/opus","audio/speex","video/ogg"],async load(){return(await Promise.resolve().then(()=>(Jne(),jne))).OggParser}}});function gg(n,t){return Zb(n,t,1)===1}function Zb(n,t,o){return n>>>t&4294967295>>>32-o}var FVe,Zf,Xb,Vne=ue(()=>{DA();Da();FVe=[6e3,8e3,9600,11025,12e3,16e3,22050,24e3,32e3,44100,48e3,64e3,88200,96e3,192e3,-1],Zf={len:32,get:(n,t)=>{let o=Le.get(n,t+24),a={BlockID:at.get(n,t),blockSize:Le.get(n,t+4),version:SA.get(n,t+8),totalSamples:Le.get(n,t+12),blockIndex:Le.get(n,t+16),blockSamples:Le.get(n,t+20),flags:{bitsPerSample:(1+Zb(o,0,2))*8,isMono:gg(o,2),isHybrid:gg(o,3),isJointStereo:gg(o,4),crossChannel:gg(o,5),hybridNoiseShaping:gg(o,6),floatingPoint:gg(o,7),samplingRate:FVe[Zb(o,23,4)],isDSD:gg(o,31)},crc:new _t(4).get(n,t+28)};return a.flags.isDSD&&(a.totalSamples*=8),a}},Xb={len:1,get:(n,t)=>({functionId:Zb(n[t],0,6),isOptional:gg(n[t],5),isOddSize:gg(n[t],6),largeBlock:gg(n[t],7)})}});var Zne={};Ur(Zne,{WavPackContentError:()=>_E,WavPackParser:()=>AH});var Wne,Qd,_E,AH,Xne=ue(()=>{DA();pd();Da();to();Vne();Wne=ze(lt(),1);Df();nr();Qd=(0,Wne.default)("music-metadata:parser:WavPack"),_E=class extends St("WavPack"){},AH=class extends Lt{constructor(){super(...arguments),this.audioDataSize=0}async parse(){return this.metadata.setAudioOnly(),this.audioDataSize=0,await this.parseWavPackBlocks(),dd(this.metadata,this.tokenizer,this.options)}async parseWavPackBlocks(){do{if(await this.tokenizer.peekToken(at)!=="wvpk")break;let o=await this.tokenizer.readToken(Zf);if(o.BlockID!=="wvpk")throw new _E("Invalid WavPack Block-ID");Qd(`WavPack header blockIndex=${o.blockIndex}, len=${Zf.len}`),o.blockIndex===0&&!this.metadata.format.container&&(this.metadata.setFormat("container","WavPack"),this.metadata.setFormat("lossless",!o.flags.isHybrid),this.metadata.setFormat("bitsPerSample",o.flags.bitsPerSample),o.flags.isDSD||(this.metadata.setFormat("sampleRate",o.flags.samplingRate),this.metadata.setFormat("duration",o.totalSamples/o.flags.samplingRate)),this.metadata.setFormat("numberOfChannels",o.flags.isMono?1:2),this.metadata.setFormat("numberOfSamples",o.totalSamples),this.metadata.setFormat("codec",o.flags.isDSD?"DSD":"PCM"));let a=o.blockSize-(Zf.len-8);await(o.blockIndex===0?this.parseMetadataSubBlock(o,a):this.tokenizer.ignore(a)),o.blockSamples>0&&(this.audioDataSize+=o.blockSize)}while(!this.tokenizer.fileInfo.size||this.tokenizer.fileInfo.size-this.tokenizer.position>=Zf.len);this.metadata.format.duration&&this.metadata.setFormat("bitrate",this.audioDataSize*8/this.metadata.format.duration)}async parseMetadataSubBlock(t,o){let a=o;for(;a>Xb.len;){let e=await this.tokenizer.readToken(Xb),i=await this.tokenizer.readNumber(e.largeBlock?yf:QA),A=new Uint8Array(i*2-(e.isOddSize?1:0));switch(await this.tokenizer.readBuffer(A),Qd(`Metadata Sub-Blocks functionId=0x${e.functionId.toString(16)}, id.largeBlock=${e.largeBlock},data-size=${A.length}`),e.functionId){case 0:break;case 14:{Qd("ID_DSD_BLOCK");let r=1<{$ne={parserType:"wavpack",extensions:[".wv",".wvp"],mimeTypes:["audio/wavpack"],async load(){return(await Promise.resolve().then(()=>(Xne(),Zne))).WavPackParser}}});var TE,$b,Ase=ue(()=>{DA();TE={len:8,get:(n,t)=>({chunkID:new We(4,"latin1").get(n,t),chunkSize:Le.get(n,t+4)})},$b=class{constructor(t){this.tagHeader=t,this.len=t.chunkSize,this.len+=this.len&1}get(t,o){return new We(this.tagHeader.chunkSize,"ascii").get(t,o)}}});var yd,Si,tse,eM,AM,tH=ue(()=>{DA();nr();yd=class extends St("Wave"){},Si={PCM:1,ADPCM:2,IEEE_FLOAT:3,ALAW:6,MULAW:7,DVI_ADPCM:17,GSM610:49,MPEG_ADTS_AAC:5632,MPEG_LOAS:5634,RAW_AAC1:255,DOLBY_AC3_SPDIF:146,DVM:8192,RAW_SPORT:576,ESST_AC3:577,DRM:9,DTS2:8193,MPEG:80,MPEGLAYER3:85},tse={[Si.PCM]:"PCM",[Si.ADPCM]:"ADPCM",[Si.IEEE_FLOAT]:"IEEE_FLOAT",[Si.ALAW]:"ALAW",[Si.MULAW]:"MULAW",[Si.DVI_ADPCM]:"DVI_ADPCM",[Si.GSM610]:"GSM610",[Si.MPEG_ADTS_AAC]:"MPEG_ADTS_AAC",[Si.MPEG_LOAS]:"MPEG_LOAS",[Si.RAW_AAC1]:"RAW_AAC1",[Si.DOLBY_AC3_SPDIF]:"DOLBY_AC3_SPDIF",[Si.DVM]:"DVM",[Si.RAW_SPORT]:"RAW_SPORT",[Si.ESST_AC3]:"ESST_AC3",[Si.DRM]:"DRM",[Si.DTS2]:"DTS2",[Si.MPEG]:"MPEG",[Si.MPEGLAYER3]:"MPEGLAYER3"},eM=class{constructor(t){if(t.chunkSize<16)throw new yd("Invalid chunk size");this.len=t.chunkSize}get(t,o){return{wFormatTag:SA.get(t,o),nChannels:SA.get(t,o+2),nSamplesPerSec:Le.get(t,o+4),nAvgBytesPerSec:Le.get(t,o+8),nBlockAlign:SA.get(t,o+12),wBitsPerSample:SA.get(t,o+14)}}},AM=class{constructor(t){if(t.chunkSize<4)throw new yd("Invalid fact chunk size.");this.len=t.chunkSize}get(t,o){return{dwSampleLength:Le.get(t,o)}}}});var rH,rse=ue(()=>{DA();sr();rH={len:420,get:(n,t)=>({description:ln(new We(256,"ascii").get(n,t)).trim(),originator:ln(new We(32,"ascii").get(n,t+256)).trim(),originatorReference:ln(new We(32,"ascii").get(n,t+288)).trim(),originationDate:ln(new We(10,"ascii").get(n,t+320)).trim(),originationTime:ln(new We(8,"ascii").get(n,t+330)).trim(),timeReferenceLow:Le.get(n,t+338),timeReferenceHigh:Le.get(n,t+342),version:SA.get(n,t+346),umid:new _t(64).get(n,t+348),loudnessValue:SA.get(n,t+412),maxTruePeakLevel:SA.get(n,t+414),maxMomentaryLoudness:SA.get(n,t+416),maxShortTermLoudness:SA.get(n,t+418)})}});var ase={};Ur(ase,{WaveParser:()=>iH});var ise,LI,iH,ose=ue(()=>{sn();DA();ise=ze(lt(),1);Ase();tH();hE();sr();Da();to();rse();tH();LI=(0,ise.default)("music-metadata:parser:RIFF"),iH=class extends Lt{constructor(){super(...arguments),this.blockAlign=0,this.avgBytesPerSec=0}async parse(){let t=await this.tokenizer.readToken(TE);if(LI(`pos=${this.tokenizer.position}, parse: chunkID=${t.chunkID}`),t.chunkID==="RIFF")return this.metadata.setAudioOnly(),this.parseRiffChunk(t.chunkSize).catch(o=>{if(!(o instanceof kA))throw o})}async parseRiffChunk(t){let o=await this.tokenizer.readToken(at);switch(this.metadata.setFormat("container",o),o){case"WAVE":return this.readWaveChunk(t-at.len);default:throw new yd(`Unsupported RIFF format: RIFF/${o}`)}}async readWaveChunk(t){for(;t>=TE.len;){let o=await this.tokenizer.readToken(TE);switch(t-=TE.len+o.chunkSize,o.chunkSize>t&&this.metadata.addWarning("Data chunk size exceeds file size"),this.header=o,LI(`pos=${this.tokenizer.position}, readChunk: chunkID=RIFF/WAVE/${o.chunkID}`),o.chunkID){case"LIST":await this.parseListTag(o);break;case"fact":this.metadata.setFormat("lossless",!1),this.fact=await this.tokenizer.readToken(new AM(o));break;case"fmt ":{let a=await this.tokenizer.readToken(new eM(o)),e=tse[a.wFormatTag];e||(LI(`WAVE/non-PCM format=${a.wFormatTag}`),e=`non-PCM (${a.wFormatTag})`),this.metadata.setFormat("codec",e),this.metadata.setFormat("bitsPerSample",a.wBitsPerSample),this.metadata.setFormat("sampleRate",a.nSamplesPerSec),this.metadata.setFormat("numberOfChannels",a.nChannels),this.blockAlign=a.nBlockAlign,this.avgBytesPerSec=a.nAvgBytesPerSec;break}case"id3 ":case"ID3 ":{let a=await this.tokenizer.readToken(new _t(o.chunkSize)),e=So(a);await new hn().parse(this.metadata,e,this.options);break}case"data":{this.metadata.format.lossless!==!1&&this.metadata.setFormat("lossless",!0);let a=o.chunkSize;if(this.tokenizer.fileInfo.size){let i=this.tokenizer.fileInfo.size-this.tokenizer.position;i0?this.metadata.setFormat("bitrate",this.avgBytesPerSec*8):this.metadata.format.duration&&this.metadata.setFormat("bitrate",a*8/this.metadata.format.duration),await this.tokenizer.ignore(o.chunkSize);break}case"bext":{let a=await this.tokenizer.readToken(rH);Object.keys(a).forEach(i=>{this.metadata.addTag("exif",`bext.${i}`,a[i])});let e=o.chunkSize-rH.len;await this.tokenizer.ignore(e);break}case"\0\0\0\0":LI(`Ignore padding chunk: RIFF/${o.chunkID} of ${o.chunkSize} bytes`),this.metadata.addWarning(`Ignore chunk: RIFF/${o.chunkID}`),await this.tokenizer.ignore(o.chunkSize);break;default:LI(`Ignore chunk: RIFF/${o.chunkID} of ${o.chunkSize} bytes`),this.metadata.addWarning(`Ignore chunk: RIFF/${o.chunkID}`),await this.tokenizer.ignore(o.chunkSize)}this.header.chunkSize%2===1&&(LI("Read odd padding byte"),await this.tokenizer.ignore(1))}}async parseListTag(t){let o=await this.tokenizer.readToken(new We(4,"latin1"));switch(LI("pos=%s, parseListTag: chunkID=RIFF/WAVE/LIST/%s",this.tokenizer.position,o),o){case"INFO":return this.parseRiffInfoTags(t.chunkSize-4);default:return this.metadata.addWarning(`Ignore chunk: RIFF/WAVE/LIST/${o}`),LI(`Ignoring chunkID=RIFF/WAVE/LIST/${o}`),this.tokenizer.ignore(t.chunkSize-4).then()}}async parseRiffInfoTags(t){for(;t>=8;){let o=await this.tokenizer.readToken(TE),a=new $b(o),e=await this.tokenizer.readToken(a);this.addTag(o.chunkID,ln(e)),t-=8+a.len}if(t!==0)throw new yd(`Illegal remaining size: ${t}`)}addTag(t,o){this.metadata.addTag("exif",t,o)}}});var nse,sse=ue(()=>{nse={parserType:"riff",extensions:[".wav","wave",".bwf"],mimeTypes:["audio/vnd.wave","audio/wav","audio/wave"],async load(){return(await Promise.resolve().then(()=>(ose(),ase))).WaveParser}}});function HVe(n){let t=gse.default.parse(n),o=$ie(t.type);return{type:o.type,subtype:o.subtype,suffix:o.suffix,parameters:t.parameters}}function KVe(n){let t=n.lastIndexOf(".");return t===-1?"":n.substring(t)}var gse,cse,md,Sd,aH=ue(()=>{oU();gse=ze(Xie(),1);eae();cse=ze(lt(),1);yae();Id();Vae();nr();Zae();coe();Eoe();moe();Toe();Foe();zoe();cne();Mne();zne();ese();sse();tM();md=(0,cse.default)("music-metadata:parser:factory");Sd=class{constructor(){this.parsers=[],[Goe,zae,Wae,gne,qoe,nse,qne,goe,yoe,$ne,bne,_oe,hoe].forEach(t=>{this.registerParser(t)})}registerParser(t){this.parsers.push(t)}async parse(t,o,a){if(t.supportsRandomAccess()?(md("tokenizer supports random-access, scanning for appending headers"),await oH(t,a)):md("tokenizer does not support random-access, cannot scan for appending headers"),!o){let r=new Uint8Array(4100);if(t.fileInfo.mimeType&&(o=this.findLoaderForContentType(t.fileInfo.mimeType)),!o&&t.fileInfo.path&&(o=this.findLoaderForExtension(t.fileInfo.path)),!o){md("Guess parser on content..."),await t.peekBuffer(r,{mayBeLess:!0});let s=await Mf(r,{mpegOffsetTolerance:10});if(!s||!s.mime)throw new MI("Failed to determine audio format");if(md(`Guessed file type is mime=${s.mime}, extension=${s.ext}`),o=this.findLoaderForContentType(s.mime),!o)throw new _I(`Guessed MIME-type not supported: ${s.mime}`)}}md(`Loading ${o.parserType} parser...`);let e=new nb(a),i=await o.load(),A=new i(e,t,a??{});return md(`Parser ${o.parserType} loaded`),await A.parse(),e.format.trackInfo&&(e.format.hasAudio===void 0&&e.setFormat("hasAudio",!!e.format.trackInfo.find(r=>r.type===yi.audio)),e.format.hasVideo===void 0&&e.setFormat("hasVideo",!!e.format.trackInfo.find(r=>r.type===yi.video))),e.toCommonMetadata()}findLoaderForExtension(t){if(!t)return;let o=KVe(t).toLocaleLowerCase()||t;return this.parsers.find(a=>a.extensions.indexOf(o)!==-1)}findLoaderForContentType(t){let o;if(!t)return;try{o=HVe(t)}catch{md(`Invalid HTTP Content-Type header value: ${t}`);return}let a=o.subtype.indexOf("x-")===0?o.subtype.substring(2):o.subtype;return this.parsers.find(e=>e.mimeTypes.find(i=>i.indexOf(`${o.type}/${a}`)!==-1))}getSupportedMimeTypes(){let t=new Set;return this.parsers.forEach(o=>{o.mimeTypes.forEach(a=>{t.add(a),t.add(a.replace("/","/x-"))})}),Array.from(t)}}});async function Ise(n){let t=n.fileInfo.size;if(t>=143){let o=new Uint8Array(15),a=n.position;await n.readBuffer(o,{position:t-143}),n.setPosition(a);let e=Tr(o,"latin1");if(e.substring(6)===xVe)return Number.parseInt(e.substring(0,6),10)+15}return 0}var xVe,lse=ue(()=>{Zs();xVe="LYRICS200"});async function YVe(n,t={}){let o=GO(n);try{return await NE(o,t)}finally{await o.close()}}async function jVe(n,t,o={}){let a=PO(n,{fileInfo:typeof t=="string"?{mimeType:t}:t});try{return await NE(a,o)}finally{await a.close()}}async function JVe(n,t,o={}){let a=So(n,{fileInfo:typeof t=="string"?{mimeType:t}:t});return NE(a,o)}function NE(n,t){return new Sd().parse(n,void 0,t)}function qVe(n){let t={};for(let{id:o,value:a}of n)(t[o]||(t[o]=[])).push(a);return t}function zVe(n){return n===void 0?0:1+Math.round(n*4)}function VVe(n){return n?n.reduce((t,o)=>o.name&&o.name.toLowerCase()in["front","cover","cover (front)"]?o:t):null}async function oH(n,t={}){let o=n.fileInfo.size;if(await Tae(n)){o-=128;let a=await Ise(n);o-=a}t.apeHeader=await RI.findApeFooterOffset(n,o)}function WVe(){return new Sd().getSupportedMimeTypes()}var tM=ue(()=>{sn();aH();pd();Rf();lse();Id();nr();nr()});var hse={};Ur(hse,{CouldNotDetermineFileTypeError:()=>MI,FieldDecodingError:()=>In,InternalParserError:()=>cd,LyricsContentType:()=>gE,TimestampFormat:()=>cE,UnsupportedFileTypeError:()=>_I,getSupportedMimeTypes:()=>WVe,makeParseError:()=>nE,makeUnexpectedFileContentError:()=>St,orderTags:()=>qVe,parseBlob:()=>YVe,parseBuffer:()=>JVe,parseFile:()=>XVe,parseFromTokenizer:()=>NE,parseStream:()=>ZVe,parseWebStream:()=>jVe,ratingToStars:()=>zVe,scanAppendingHeaders:()=>oH,selectCover:()=>VVe});async function ZVe(n,t,o={}){let a=await J2(n,{fileInfo:typeof t=="string"?{mimeType:t}:t});try{return await NE(a,o)}finally{await a.close()}}async function XVe(n,t={}){dse(`parseFile: ${n}`);let o=await lie(n),a=new Sd;try{let e=a.findLoaderForExtension(n);e||dse("Parser could not be determined by file extension");try{return await a.parse(o,e,t)}catch(i){throw(i instanceof MI||i instanceof _I)&&(i.message+=`: ${n}`),i}}finally{await o.close()}}var pse,dse,Ese=ue(()=>{sn();pse=ze(lt(),1);tM();aH();tM();dse=(0,pse.default)("music-metadata:parser")});var _ge=ee((xPA,UH)=>{"use strict";var n6e=Object.prototype.hasOwnProperty,Ma="~";function cQ(){}Object.create&&(cQ.prototype=Object.create(null),new cQ().__proto__||(Ma=!1));function s6e(n,t,o){this.fn=n,this.context=t,this.once=o||!1}function Mge(n,t,o,a,e){if(typeof o!="function")throw new TypeError("The listener must be a function");var i=new s6e(o,a||n,e),A=Ma?Ma+t:t;return n._events[A]?n._events[A].fn?n._events[A]=[n._events[A],i]:n._events[A].push(i):(n._events[A]=i,n._eventsCount++),n}function EM(n,t){--n._eventsCount===0?n._events=new cQ:delete n._events[t]}function la(){this._events=new cQ,this._eventsCount=0}la.prototype.eventNames=function(){var t=[],o,a;if(this._eventsCount===0)return t;for(a in o=this._events)n6e.call(o,a)&&t.push(Ma?a.slice(1):a);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o)):t};la.prototype.listeners=function(t){var o=Ma?Ma+t:t,a=this._events[o];if(!a)return[];if(a.fn)return[a.fn];for(var e=0,i=a.length,A=new Array(i);e{"use strict";var pQ=n=>n&&typeof n.message=="string",eK=n=>{if(!n)return;let t=n.cause;if(typeof t=="function"){let o=n.cause();return pQ(o)?o:void 0}else return pQ(t)?t:void 0},ice=(n,t)=>{if(!pQ(n))return"";let o=n.stack||"";if(t.has(n))return o+` causes have become circular...`;let a=eK(n);return a?(t.add(n),o+` -caused by: `+Ace(a,t)):o},L6e=n=>Ace(n,new Set),tce=(n,t,o)=>{if(!pQ(n))return"";let a=o?"":n.message||"";if(t.has(n))return a+": ...";let e=eK(n);if(e){t.add(n);let i=typeof n.cause=="function";return a+(i?"":": ")+tce(e,t,i)}else return a},U6e=n=>tce(n,new Set);rce.exports={isErrorLike:pQ,getErrorCause:eK,stackWithCauses:L6e,messageWithCauses:U6e}});var tK=ee((cLA,ace)=>{"use strict";var H6e=Symbol("circular-ref-tag"),OM=Symbol("pino-raw-err-ref"),ice=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[OM]},set:function(n){this[OM]=n}}});Object.defineProperty(ice,OM,{writable:!0,value:{}});ace.exports={pinoErrProto:ice,pinoErrorSymbols:{seen:H6e,rawSymbol:OM}}});var sce=ee((ILA,nce)=>{"use strict";nce.exports=iK;var{messageWithCauses:K6e,stackWithCauses:x6e,isErrorLike:oce}=AK(),{pinoErrProto:Y6e,pinoErrorSymbols:j6e}=tK(),{seen:rK}=j6e,{toString:J6e}=Object.prototype;function iK(n){if(!oce(n))return n;n[rK]=void 0;let t=Object.create(Y6e);t.type=J6e.call(n.constructor)==="[object Function]"?n.constructor.name:n.name,t.message=K6e(n),t.stack=x6e(n),Array.isArray(n.errors)&&(t.aggregateErrors=n.errors.map(o=>iK(o)));for(let o in n)if(t[o]===void 0){let a=n[o];oce(a)?o!=="cause"&&!Object.prototype.hasOwnProperty.call(a,rK)&&(t[o]=iK(a)):t[o]=a}return delete n[rK],t.raw=n,t}});var cce=ee((lLA,gce)=>{"use strict";gce.exports=MM;var{isErrorLike:aK}=AK(),{pinoErrProto:q6e,pinoErrorSymbols:z6e}=tK(),{seen:bM}=z6e,{toString:V6e}=Object.prototype;function MM(n){if(!aK(n))return n;n[bM]=void 0;let t=Object.create(q6e);t.type=V6e.call(n.constructor)==="[object Function]"?n.constructor.name:n.name,t.message=n.message,t.stack=n.stack,Array.isArray(n.errors)&&(t.aggregateErrors=n.errors.map(o=>MM(o))),aK(n.cause)&&!Object.prototype.hasOwnProperty.call(n.cause,bM)&&(t.cause=MM(n.cause));for(let o in n)if(t[o]===void 0){let a=n[o];aK(a)?Object.prototype.hasOwnProperty.call(a,bM)||(t[o]=MM(a)):t[o]=a}return delete n[bM],t.raw=n,t}});var pce=ee((dLA,dce)=>{"use strict";dce.exports={mapHttpRequest:W6e,reqSerializer:lce};var oK=Symbol("pino-raw-req-ref"),Ice=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[oK]},set:function(n){this[oK]=n}}});Object.defineProperty(Ice,oK,{writable:!0,value:{}});function lce(n){let t=n.info||n.socket,o=Object.create(Ice);if(o.id=typeof n.id=="function"?n.id():n.id||(n.info?n.info.id:void 0),o.method=n.method,n.originalUrl)o.url=n.originalUrl;else{let a=n.path;o.url=typeof a=="string"?a:n.url?n.url.path||n.url:void 0}return n.query&&(o.query=n.query),n.params&&(o.params=n.params),o.headers=n.headers,o.remoteAddress=t&&t.remoteAddress,o.remotePort=t&&t.remotePort,o.raw=n.raw||n,o}function W6e(n){return{req:lce(n)}}});var Cce=ee((pLA,uce)=>{"use strict";uce.exports={mapHttpResponse:Z6e,resSerializer:Ece};var nK=Symbol("pino-raw-res-ref"),hce=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[nK]},set:function(n){this[nK]=n}}});Object.defineProperty(hce,nK,{writable:!0,value:{}});function Ece(n){let t=Object.create(hce);return t.statusCode=n.headersSent?n.statusCode:null,t.headers=n.getHeaders?n.getHeaders():n._headers,t.raw=n,t}function Z6e(n){return{res:Ece(n)}}});var gK=ee((hLA,Bce)=>{"use strict";var sK=sce(),X6e=cce(),_M=pce(),TM=Cce();Bce.exports={err:sK,errWithCause:X6e,mapHttpRequest:_M.mapHttpRequest,mapHttpResponse:TM.mapHttpResponse,req:_M.reqSerializer,res:TM.resSerializer,wrapErrorSerializer:function(t){return t===sK?t:function(a){return t(sK(a))}},wrapRequestSerializer:function(t){return t===_M.reqSerializer?t:function(a){return t(_M.reqSerializer(a))}},wrapResponseSerializer:function(t){return t===TM.resSerializer?t:function(a){return t(TM.resSerializer(a))}}}});var cK=ee((ELA,fce)=>{"use strict";function $6e(n,t){return t}fce.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=$6e;let o=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(o))return;let a=o.slice(2),e=[];for(let i of a)i&&e.push(i.getFileName());return e}});var Dce=ee((uLA,wce)=>{"use strict";function IK(n){if(n===null||typeof n!="object")return n;if(n instanceof Date)return new Date(n.getTime());if(n instanceof Array){let t=[];for(let o=0;o{let Q=[...s.slice(0,I),...f];return o(B,Q)}:o,e,i);else if(i)mce(c,r);else{let d=typeof o=="function"?o(A5e(c,r),[...s.slice(0,I),...r]):o;yce(c,r,d)}}if(A.length===0)g(n,0);else{let c=n;for(let I=0;I0)o?i===a&&(o=!1,a=""):(o=!0,a=i);else if(i==="["&&!o)t++;else if(i==="]"&&!o&&(t--,t<0))throw new Error(`Invalid redaction path (${n})`)}if(t!==0)throw new Error(`Invalid redaction path (${n})`)}function n5e(n){if(!Array.isArray(n))throw new TypeError("paths must be an array");for(let t of n)o5e(t)}function s5e(n={}){let{paths:t=[],censor:o="[REDACTED]",serialize:a=JSON.stringify,strict:e=!0,remove:i=!1}=n;n5e(t);let A=i5e(t);return function(s){if(e&&(s===null||typeof s!="object")&&(s==null||typeof s!="object"))return a?a(s):s;let g=a5e(s,A),c=s,I=o;return typeof o=="function"&&(I=o),t5e(g,t,I,i),a===!1?(g.restore=function(){return IK(c)},g):typeof a=="function"?a(g):JSON.stringify(g)}}wce.exports=s5e});var jE=ee((CLA,Oce)=>{"use strict";var g5e=Symbol("pino.setLevel"),c5e=Symbol("pino.getLevel"),I5e=Symbol("pino.levelVal"),l5e=Symbol("pino.levelComp"),d5e=Symbol("pino.useLevelLabels"),p5e=Symbol("pino.useOnlyCustomLevels"),h5e=Symbol("pino.mixin"),E5e=Symbol("pino.lsCache"),u5e=Symbol("pino.chindings"),C5e=Symbol("pino.asJson"),B5e=Symbol("pino.write"),f5e=Symbol("pino.redactFmt"),Q5e=Symbol("pino.time"),y5e=Symbol("pino.timeSliceIndex"),m5e=Symbol("pino.stream"),S5e=Symbol("pino.stringify"),w5e=Symbol("pino.stringifySafe"),D5e=Symbol("pino.stringifiers"),O5e=Symbol("pino.end"),b5e=Symbol("pino.formatOpts"),M5e=Symbol("pino.messageKey"),_5e=Symbol("pino.errorKey"),T5e=Symbol("pino.nestedKey"),N5e=Symbol("pino.nestedKeyStr"),R5e=Symbol("pino.mixinMergeStrategy"),k5e=Symbol("pino.msgPrefix"),v5e=Symbol("pino.wildcardFirst"),P5e=Symbol.for("pino.serializers"),G5e=Symbol.for("pino.formatters"),F5e=Symbol.for("pino.hooks"),L5e=Symbol.for("pino.metadata");Oce.exports={setLevelSym:g5e,getLevelSym:c5e,levelValSym:I5e,levelCompSym:l5e,useLevelLabelsSym:d5e,mixinSym:h5e,lsCacheSym:E5e,chindingsSym:u5e,asJsonSym:C5e,writeSym:B5e,serializersSym:P5e,redactFmtSym:f5e,timeSym:Q5e,timeSliceIndexSym:y5e,streamSym:m5e,stringifySym:S5e,stringifySafeSym:w5e,stringifiersSym:D5e,endSym:O5e,formatOptsSym:b5e,messageKeySym:M5e,errorKeySym:_5e,nestedKeySym:T5e,wildcardFirstSym:v5e,needsMetadataGsym:L5e,useOnlyCustomLevelsSym:p5e,formattersSym:G5e,hooksSym:F5e,nestedKeyStrSym:N5e,mixinMergeStrategySym:R5e,msgPrefixSym:k5e}});var dK=ee((BLA,Tce)=>{"use strict";var bce=Dce(),{redactFmtSym:U5e,wildcardFirstSym:RM}=jE(),lK=/[^.[\]]+|\[([^[\]]*?)\]/g,Mce="[Redacted]",_ce=!1;function H5e(n,t){let{paths:o,censor:a,remove:e}=K5e(n),i=o.reduce((s,g)=>{lK.lastIndex=0;let c=lK.exec(g),I=lK.exec(g),d=c[1]!==void 0?c[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):c[0];if(d==="*"&&(d=RM),I===null)return s[d]=null,s;if(s[d]===null)return s;let{index:B}=I,f=`${g.substr(B,g.length-1)}`;return s[d]=s[d]||[],d!==RM&&s[d].length===0&&s[d].push(...s[RM]||[]),d===RM&&Object.keys(s).forEach(function(Q){s[Q]&&s[Q].push(f)}),s[d].push(f),s},{}),A={[U5e]:bce({paths:o,censor:a,serialize:t,strict:_ce,remove:e})},r=(...s)=>t(typeof a=="function"?a(...s):a);return[...Object.keys(i),...Object.getOwnPropertySymbols(i)].reduce((s,g)=>{if(i[g]===null)s[g]=c=>r(c,[g]);else{let c=typeof a=="function"?(I,d)=>a(I,[g,...d]):a;s[g]=bce({paths:i[g],censor:c,serialize:t,strict:_ce,remove:e})}return s},A)}function K5e(n){if(Array.isArray(n))return n={paths:n,censor:Mce},n;let{paths:t,censor:o=Mce,remove:a}=n;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return a===!0&&(o=void 0),{paths:t,censor:o,remove:a}}Tce.exports=H5e});var kce=ee((fLA,Rce)=>{"use strict";var x5e=()=>"",Y5e=()=>`,"time":${Date.now()}`,j5e=()=>`,"time":${Math.round(Date.now()/1e3)}`,J5e=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,q5e=1000000n,Nce=1000000000n,z5e=BigInt(Date.now())*q5e,V5e=process.hrtime.bigint(),W5e=()=>{let n=process.hrtime.bigint()-V5e,t=z5e+n,o=t/Nce,a=t%Nce,e=Number(o*1000n+a/1000000n),i=new Date(e),A=i.getUTCFullYear(),r=(i.getUTCMonth()+1).toString().padStart(2,"0"),s=i.getUTCDate().toString().padStart(2,"0"),g=i.getUTCHours().toString().padStart(2,"0"),c=i.getUTCMinutes().toString().padStart(2,"0"),I=i.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${A}-${r}-${s}T${g}:${c}:${I}.${a.toString().padStart(9,"0")}Z"`};Rce.exports={nullTime:x5e,epochTime:Y5e,unixTime:j5e,isoTime:J5e,isoTimeNano:W5e}});var Pce=ee((QLA,vce)=>{"use strict";function Z5e(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}vce.exports=X5e;function X5e(n,t,o){var a=o&&o.stringify||Z5e,e=1;if(typeof n=="object"&&n!==null){var i=t.length+e;if(i===1)return n;var A=new Array(i);A[0]=a(n);for(var r=1;r-1?I:0,n.charCodeAt(B+1)){case 100:case 102:if(c>=s||t[c]==null)break;I=s||t[c]==null)break;I=s||t[c]===void 0)break;I",I=B+2,B++;break}g+=a(t[c]),I=B+2,B++;break;case 115:if(c>=s)break;I{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let t=function(o){if((o>0&&o<1/0)===!1)throw typeof o!="number"&&typeof o!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(n,0,0,Number(o))},n=new Int32Array(new SharedArrayBuffer(4));pK.exports=t}else{let n=function(t){if((t>0&&t<1/0)===!1)throw typeof t!="number"&&typeof t!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let a=Date.now()+Number(t);for(;a>Date.now(););};pK.exports=n}});var Yce=ee((mLA,xce)=>{"use strict";var er=$e("fs"),$5e=$e("events"),eZe=$e("util").inherits,Gce=$e("path"),uK=hK(),AZe=$e("assert"),kM=100,vM=Buffer.allocUnsafe(0),tZe=16*1024,Fce="buffer",Lce="utf8",[rZe,iZe]=(process.versions.node||"0.0").split(".").map(Number),aZe=rZe>=22&&iZe>=7;function Uce(n,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function o(i,A){if(i){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",i)}):t.emit("error",i);return}let r=t._reopening;t.fd=A,t.file=n,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t.destroyed&&(!t._writing&&t._len>t.minLength||t._flushPending?t._actualWrite():r&&process.nextTick(()=>t.emit("drain")))}let a=t.append?"a":"w",e=t.mode;if(t.sync)try{t.mkdir&&er.mkdirSync(Gce.dirname(n),{recursive:!0});let i=er.openSync(n,a,e);o(null,i)}catch(i){throw o(i),i}else t.mkdir?er.mkdir(Gce.dirname(n),{recursive:!0},i=>{if(i)return o(i);er.open(n,a,e,o)}):er.open(n,a,e,o)}function is(n){if(!(this instanceof is))return new is(n);let{fd:t,dest:o,minLength:a,maxLength:e,maxWrite:i,periodicFlush:A,sync:r,append:s=!0,mkdir:g,retryEAGAIN:c,fsync:I,contentMode:d,mode:B}=n||{};t=t||o,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(a||0,16387),this.file=null,this.destroyed=!1,this.minLength=a||0,this.maxLength=e||0,this.maxWrite=i||tZe,this._periodicFlush=A||0,this._periodicFlushTimer=void 0,this.sync=r||!1,this.writable=!0,this._fsync=I||!1,this.append=s||!1,this.mode=B,this.retryEAGAIN=c||(()=>!0),this.mkdir=g||!1;let f,Q;if(d===Fce)this._writingBuf=vM,this.write=sZe,this.flush=cZe,this.flushSync=lZe,this._actualWrite=pZe,f=()=>er.writeSync(this.fd,this._writingBuf),Q=()=>er.write(this.fd,this._writingBuf,this.release);else if(d===void 0||d===Lce)this._writingBuf="",this.write=nZe,this.flush=gZe,this.flushSync=IZe,this._actualWrite=dZe,f=()=>Buffer.isBuffer(this._writingBuf)?er.writeSync(this.fd,this._writingBuf):er.writeSync(this.fd,this._writingBuf,"utf8"),Q=()=>Buffer.isBuffer(this._writingBuf)?er.write(this.fd,this._writingBuf,this.release):er.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${Lce}" and "${Fce}", but passed ${d}`);if(typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")Uce(t,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(y,m)=>{if(y){if((y.code==="EAGAIN"||y.code==="EBUSY")&&this.retryEAGAIN(y,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{uK(kM),this.release(void 0,0)}catch(R){this.release(R)}else setTimeout(Q,kM);else this._writing=!1,this.emit("error",y);return}this.emit("write",m);let _=EK(this._writingBuf,this._len,m);if(this._len=_.len,this._writingBuf=_.writingBuf,this._writingBuf.length){if(!this.sync){Q();return}try{do{let R=f(),L=EK(this._writingBuf,this._len,R);this._len=L.len,this._writingBuf=L.writingBuf}while(this._writingBuf.length)}catch(R){this.release(R);return}}this._fsync&&er.fsyncSync(this.fd);let T=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):T>this.minLength?this._actualWrite():this._ending?T>0?this._actualWrite():(this._writing=!1,PM(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(oZe,this)):this.emit("drain"))},this.on("newListener",function(y){y==="drain"&&(this._asyncDrainScheduled=!1)}),this._periodicFlush!==0&&(this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref())}function EK(n,t,o){return typeof n=="string"&&(n=Buffer.from(n)),t=Math.max(t-o,0),n=n.subarray(o),{writingBuf:n,len:t}}function oZe(n){n.listenerCount("drain")>0&&(n._asyncDrainScheduled=!1,n.emit("drain"))}eZe(is,$5e);function Hce(n,t){return n.length===0?vM:n.length===1?n[0]:Buffer.concat(n,t)}function nZe(n){if(this.destroyed)throw new Error("SonicBoom destroyed");n=""+n;let t=Buffer.byteLength(n),o=this._len+t,a=this._bufs;return this.maxLength&&o>this.maxLength?(this.emit("drop",n),this._lenthis.maxWrite?a.push(n):a[a.length-1]+=n,this._len=o,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._lenthis.maxLength?(this.emit("drop",n),this._lenthis.maxWrite?(o.push([n]),a.push(n.length)):(o[o.length-1].push(n),a[a.length-1]+=n.length),this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len{if(this._fsync)this._flushPending=!1,n();else try{er.fsync(this.fd,a=>{this._flushPending=!1,n(a)})}catch(a){n(a)}this.off("error",o)},o=a=>{this._flushPending=!1,n(a),this.off("drain",t)};this.once("drain",t),this.once("error",o)}function gZe(n){if(n!=null&&typeof n!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(n){n(t);return}throw t}if(this.minLength<=0){n?.();return}n&&Kce.call(this,n),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function cZe(n){if(n!=null&&typeof n!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(n){n(t);return}throw t}if(this.minLength<=0){n?.();return}n&&Kce.call(this,n),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}is.prototype.reopen=function(n){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(n)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(n&&(this.file=n),this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&er.close(t,o=>{if(o)return this.emit("error",o)})}),Uce(this.file,this)};is.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():PM(this)))};function IZe(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let n="";for(;this._bufs.length||n.length;){n.length<=0&&(n=this._bufs[0]);try{let t=Buffer.isBuffer(n)?er.writeSync(this.fd,n):er.writeSync(this.fd,n,"utf8"),o=EK(n,this._len,t);n=o.writingBuf,this._len=o.len,n.length<=0&&this._bufs.shift()}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,n.length,this._len-n.length))throw t;uK(kM)}}try{er.fsyncSync(this.fd)}catch{}}function lZe(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=vM);let n=vM;for(;this._bufs.length||n.length;){n.length<=0&&(n=Hce(this._bufs[0],this._lens[0]));try{let t=er.writeSync(this.fd,n);n=n.subarray(t),this._len=Math.max(this._len-t,0),n.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,n.length,this._len-n.length))throw t;uK(kM)}}}is.prototype.destroy=function(){this.destroyed||PM(this)};function dZe(){let n=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:this._bufs.shift()||"",this.sync)try{let t=Buffer.isBuffer(this._writingBuf)?er.writeSync(this.fd,this._writingBuf):er.writeSync(this.fd,this._writingBuf,"utf8");n(null,t)}catch(t){n(t)}else er.write(this.fd,this._writingBuf,n)}function pZe(){let n=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:Hce(this._bufs.shift(),this._lens.shift()),this.sync)try{let t=er.writeSync(this.fd,this._writingBuf);n(null,t)}catch(t){n(t)}else aZe&&(this._writingBuf=Buffer.from(this._writingBuf)),er.write(this.fd,this._writingBuf,n)}function PM(n){if(n.fd===-1){n.once("ready",PM.bind(null,n));return}n._periodicFlushTimer!==void 0&&clearInterval(n._periodicFlushTimer),n.destroyed=!0,n._bufs=[],n._lens=[],AZe(typeof n.fd=="number",`sonic.fd must be a number, got ${typeof n.fd}`);try{er.fsync(n.fd,t)}catch{}function t(){n.fd!==1&&n.fd!==2?er.close(n.fd,o):o()}function o(a){if(a){n.emit("error",a);return}n._ending&&!n._writing&&n.emit("finish"),n.emit("close")}}is.SonicBoom=is;is.default=is;xce.exports=is});var CK=ee((SLA,Vce)=>{"use strict";var as={exit:[],beforeExit:[]},jce={exit:uZe,beforeExit:CZe},JE;function hZe(){JE===void 0&&(JE=new FinalizationRegistry(BZe))}function EZe(n){as[n].length>0||process.on(n,jce[n])}function Jce(n){as[n].length>0||(process.removeListener(n,jce[n]),as.exit.length===0&&as.beforeExit.length===0&&(JE=void 0))}function uZe(){qce("exit")}function CZe(){qce("beforeExit")}function qce(n){for(let t of as[n]){let o=t.deref(),a=t.fn;o!==void 0&&a(o,n)}as[n]=[]}function BZe(n){for(let t of["exit","beforeExit"]){let o=as[t].indexOf(n);as[t].splice(o,o+1),Jce(t)}}function zce(n,t,o){if(t===void 0)throw new Error("the object can't be undefined");EZe(n);let a=new WeakRef(t);a.fn=o,hZe(),JE.register(t,a),as[n].push(a)}function fZe(n,t){zce("exit",n,t)}function QZe(n,t){zce("beforeExit",n,t)}function yZe(n){if(JE!==void 0){JE.unregister(n);for(let t of["exit","beforeExit"])as[t]=as[t].filter(o=>{let a=o.deref();return a&&a!==n}),Jce(t)}}Vce.exports={register:fZe,registerBeforeExit:QZe,unregister:yZe}});var Wce=ee((wLA,mZe)=>{mZe.exports={name:"thread-stream",version:"3.2.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",dependencies:{"real-require":"^0.2.0"},devDependencies:{"@types/node":"^20.1.0","@types/tap":"^15.0.0","@yao-pkg/pkg":"^5.11.5",desm:"^1.3.0",fastbench:"^1.0.1",husky:"^9.0.6","pino-elasticsearch":"^8.0.0","sonic-boom":"^4.0.1",standard:"^17.0.0",tap:"^16.2.0","ts-node":"^10.8.0",typescript:"^5.3.2","why-is-node-running":"^2.2.2"},scripts:{build:"tsc --noEmit",test:'standard && npm run build && npm run transpile && tap "test/**/*.test.*js" && tap --ts test/*.test.*ts',"test:ci":"standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts","test:ci:js":'tap --no-check-coverage --timeout=120 --coverage-report=lcovonly "test/**/*.test.*js"',"test:ci:ts":'tap --ts --no-check-coverage --coverage-report=lcovonly "test/**/*.test.*ts"',"test:yarn":'npm run transpile && tap "test/**/*.test.js" --no-check-coverage',transpile:"sh ./test/ts/transpile.sh",prepare:"husky install"},standard:{ignore:["test/ts/**/*","test/syntax-error.mjs"]},repository:{type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords:["worker","thread","threads","stream"],author:"Matteo Collina ",license:"MIT",bugs:{url:"https://github.com/mcollina/thread-stream/issues"},homepage:"https://github.com/mcollina/thread-stream#readme"}});var Xce=ee((DLA,Zce)=>{"use strict";function SZe(n,t,o,a,e){let i=Date.now()+a,A=Atomics.load(n,t);if(A===o){e(null,"ok");return}let r=A,s=g=>{Date.now()>i?e(null,"timed-out"):setTimeout(()=>{r=A,A=Atomics.load(n,t),A===r?s(g>=1e3?1e3:g*2):A===o?e(null,"ok"):e(null,"not-equal")},g)};s(1)}function wZe(n,t,o,a,e){let i=Date.now()+a,A=Atomics.load(n,t);if(A!==o){e(null,"ok");return}let r=s=>{Date.now()>i?e(null,"timed-out"):setTimeout(()=>{A=Atomics.load(n,t),A!==o?e(null,"ok"):r(s>=1e3?1e3:s*2)},s)};r(1)}Zce.exports={wait:SZe,waitDiff:wZe}});var eIe=ee((OLA,$ce)=>{"use strict";$ce.exports={WRITE_INDEX:4,READ_INDEX:8,SEQ_INDEX:2}});var aIe=ee((bLA,iIe)=>{"use strict";var{version:DZe}=Wce(),{EventEmitter:OZe}=$e("events"),{Worker:bZe}=$e("worker_threads"),{join:MZe}=$e("path"),{pathToFileURL:_Ze}=$e("url"),{wait:TZe}=Xce(),{WRITE_INDEX:un,READ_INDEX:ao,SEQ_INDEX:BK}=eIe(),NZe=$e("buffer"),RZe=$e("assert"),Te=Symbol("kImpl"),kZe=NZe.constants.MAX_STRING_LENGTH;function qE(n,t){Atomics.add(n[Te].state,BK,1),t(),Atomics.add(n[Te].state,BK,1),Atomics.notify(n[Te].state,BK)}var hQ=class{constructor(t){this._value=t}deref(){return this._value}},FM=class{register(){}unregister(){}},vZe=process.env.NODE_V8_COVERAGE?FM:global.FinalizationRegistry||FM,PZe=process.env.NODE_V8_COVERAGE?hQ:global.WeakRef||hQ,AIe=new vZe(n=>{n.exited||n.terminate()});function GZe(n,t){let{filename:o,workerData:a}=t,i=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||MZe(__dirname,"lib","worker.js"),A=new bZe(i,{...t.workerOpts,trackUnmanagedFds:!1,workerData:{filename:o.indexOf("file://")===0?o:_Ze(o).href,dataBuf:n[Te].dataBuf,stateBuf:n[Te].stateBuf,workerData:{$context:{threadStreamVersion:DZe},...a}}});return A.stream=new hQ(n),A.on("message",FZe),A.on("exit",rIe),AIe.register(n,A),A}function tIe(n){RZe(!n[Te].sync),n[Te].needDrain&&(n[Te].needDrain=!1,n.emit("drain"))}function GM(n){let t=Atomics.load(n[Te].state,un),o=n[Te].data.length-t;if(o>0){if(n[Te].buf.length===0){n[Te].flushing=!1,n[Te].ending?SK(n):n[Te].needDrain&&process.nextTick(tIe,n);return}let a=n[Te].buf.slice(0,o),e=Buffer.byteLength(a);e<=o?(n[Te].buf=n[Te].buf.slice(o),LM(n,a,GM.bind(null,n))):n.flush(()=>{if(!n.destroyed){for(qE(n,()=>{Atomics.store(n[Te].state,ao,0),Atomics.store(n[Te].state,un,0)}),Atomics.notify(n[Te].state,ao);e>n[Te].data.length;)o=o/2,a=n[Te].buf.slice(0,o),e=Buffer.byteLength(a);n[Te].buf=n[Te].buf.slice(o),LM(n,a,GM.bind(null,n))}})}else if(o===0){if(t===0&&n[Te].buf.length===0)return;n.flush(()=>{qE(n,()=>{Atomics.store(n[Te].state,ao,0),Atomics.store(n[Te].state,un,0)}),Atomics.notify(n[Te].state,ao),GM(n)})}else dg(n,new Error("overwritten"))}function FZe(n){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}if(n?.code!=null)switch(n.code){case"READY":this.stream=new PZe(t),t.flush(()=>{t[Te].ready=!0,t.emit("ready")});break;case"ERROR":dg(t,n.err);break;case"EVENT":Array.isArray(n.args)?t.emit(n.name,...n.args):t.emit(n.name,n.args);break;case"WARNING":process.emitWarning(n.err);break;default:dg(t,new Error("this should not happen: "+n.code))}}function rIe(n){let t=this.stream.deref();t!==void 0&&(AIe.unregister(t),t.worker.exited=!0,t.worker.off("exit",rIe),dg(t,n!==0?new Error("the worker thread exited"):null))}var QK=class extends OZe{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[Te]={},this[Te].stateBuf=new SharedArrayBuffer(128),this[Te].state=new Int32Array(this[Te].stateBuf),this[Te].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[Te].data=Buffer.from(this[Te].dataBuf),this[Te].sync=t.sync||!1,this[Te].ending=!1,this[Te].ended=!1,this[Te].needDrain=!1,this[Te].destroyed=!1,this[Te].flushing=!1,this[Te].ready=!1,this[Te].finished=!1,this[Te].errored=null,this[Te].closed=!1,this[Te].buf="",this.worker=GZe(this,t),this.on("message",(o,a)=>{this.worker.postMessage(o,a)})}write(t){if(this[Te].destroyed)return yK(this,new Error("the worker has exited")),!1;if(this[Te].ending)return yK(this,new Error("the worker is ending")),!1;if(this[Te].flushing&&this[Te].buf.length+t.length>=kZe)try{fK(this),this[Te].flushing=!0}catch(o){return dg(this,o),!1}if(this[Te].buf+=t,this[Te].sync)try{return fK(this),!0}catch(o){return dg(this,o),!1}return this[Te].flushing||(this[Te].flushing=!0,setImmediate(GM,this)),this[Te].needDrain=this[Te].data.length-this[Te].buf.length-Atomics.load(this[Te].state,un)<=0,!this[Te].needDrain}end(){this[Te].destroyed||(this[Te].ending=!0,SK(this))}flush(t){if(this[Te].destroyed){typeof t=="function"&&process.nextTick(t,new Error("the worker has exited"));return}let o=Atomics.load(this[Te].state,un);TZe(this[Te].state,ao,o,1/0,(a,e)=>{if(a){dg(this,a),process.nextTick(t,a);return}if(e==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[Te].destroyed||(fK(this),mK(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[Te].ready}get destroyed(){return this[Te].destroyed}get closed(){return this[Te].closed}get writable(){return!this[Te].destroyed&&!this[Te].ending}get writableEnded(){return this[Te].ending}get writableFinished(){return this[Te].finished}get writableNeedDrain(){return this[Te].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[Te].errored}};function yK(n,t){setImmediate(()=>{n.emit("error",t)})}function dg(n,t){n[Te].destroyed||(n[Te].destroyed=!0,t&&(n[Te].errored=t,yK(n,t)),n.worker.exited?setImmediate(()=>{n[Te].closed=!0,n.emit("close")}):n.worker.terminate().catch(()=>{}).then(()=>{n[Te].closed=!0,n.emit("close")}))}function LM(n,t,o){let a=Atomics.load(n[Te].state,un),e=Buffer.byteLength(t);return n[Te].data.write(t,a),qE(n,()=>{Atomics.store(n[Te].state,un,a+e)}),o(),!0}function SK(n){if(!(n[Te].ended||!n[Te].ending||n[Te].flushing)){n[Te].ended=!0;try{n.flushSync();let t=Atomics.load(n[Te].state,ao);qE(n,()=>{Atomics.store(n[Te].state,un,-1)});let o=0;for(;t!==-1;){if(Atomics.wait(n[Te].state,ao,t,1e3),t=Atomics.load(n[Te].state,ao),t===-2){dg(n,new Error("end() failed"));return}if(++o===10){dg(n,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{n[Te].finished=!0,n.emit("finish")})}catch(t){dg(n,t)}}}function fK(n){let t=()=>{n[Te].ending?SK(n):n[Te].needDrain&&process.nextTick(tIe,n)};for(n[Te].flushing=!1;n[Te].buf.length!==0;){let o=Atomics.load(n[Te].state,un),a=n[Te].data.length-o;if(a===0){mK(n),qE(n,()=>{Atomics.store(n[Te].state,ao,0),Atomics.store(n[Te].state,un,0)}),Atomics.notify(n[Te].state,ao);continue}else if(a<0)throw new Error("overwritten");let e=n[Te].buf.slice(0,a),i=Buffer.byteLength(e);if(i<=a)n[Te].buf=n[Te].buf.slice(a),LM(n,e,t);else{for(mK(n),qE(n,()=>{Atomics.store(n[Te].state,ao,0),Atomics.store(n[Te].state,un,0)}),Atomics.notify(n[Te].state,ao);i>n[Te].buf.length;)a=a/2,e=n[Te].buf.slice(0,a),i=Buffer.byteLength(e);n[Te].buf=n[Te].buf.slice(a),LM(n,e,t)}}}function mK(n){if(n[Te].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(n[Te].state,un),o=0;for(;;){let a=Atomics.load(n[Te].state,ao);if(a===-2)throw Error("_flushSync failed");if(a!==t)Atomics.wait(n[Te].state,ao,a,1e3);else break;if(++o===10)throw new Error("_flushSync took too long (10s)")}}iIe.exports=QK});var OK=ee((MLA,oIe)=>{"use strict";var{createRequire:LZe}=$e("module"),UZe=cK(),{join:wK,isAbsolute:HZe,sep:KZe}=$e("node:path"),xZe=hK(),DK=CK(),YZe=aIe();function jZe(n){DK.register(n,qZe),DK.registerBeforeExit(n,zZe),n.on("close",function(){DK.unregister(n)})}function JZe(n,t,o,a){let e=new YZe({filename:n,workerData:t,workerOpts:o,sync:a});e.on("ready",i),e.on("close",function(){process.removeListener("exit",A)}),process.on("exit",A);function i(){process.removeListener("exit",A),e.unref(),o.autoEnd!==!1&&jZe(e)}function A(){e.closed||(e.flushSync(),xZe(100),e.end())}return e}function qZe(n){n.ref(),n.flushSync(),n.end(),n.once("close",function(){n.unref()})}function zZe(n){n.flushSync()}function VZe(n){let{pipeline:t,targets:o,levels:a,dedupe:e,worker:i={},caller:A=UZe(),sync:r=!1}=n,s={...n.options},g=typeof A=="string"?[A]:A,c="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},I=n.target;if(I&&o)throw new Error("only one of target or targets can be specified");return o?(I=c["pino-worker"]||wK(__dirname,"worker.js"),s.targets=o.filter(B=>B.target).map(B=>({...B,target:d(B.target)})),s.pipelines=o.filter(B=>B.pipeline).map(B=>B.pipeline.map(f=>({...f,level:B.level,target:d(f.target)})))):t&&(I=c["pino-worker"]||wK(__dirname,"worker.js"),s.pipelines=[t.map(B=>({...B,target:d(B.target)}))]),a&&(s.levels=a),e&&(s.dedupe=e),s.pinoWillSendConfig=!0,JZe(d(I),s,i,r);function d(B){if(B=c[B]||B,HZe(B)||B.indexOf("file://")===0)return B;if(B==="pino/file")return wK(__dirname,"..","file.js");let f;for(let Q of g)try{let y=Q==="node:repl"?process.cwd()+KZe:Q;f=LZe(y).resolve(B);break}catch{continue}if(!f)throw new Error(`unable to determine transport target for "${B}"`);return f}}oIe.exports=VZe});var xM=ee((_LA,BIe)=>{"use strict";var nIe=$e("node:diagnostics_channel"),sIe=Pce(),{mapHttpRequest:WZe,mapHttpResponse:ZZe}=gK(),MK=Yce(),gIe=CK(),{lsCacheSym:XZe,chindingsSym:dIe,writeSym:cIe,serializersSym:pIe,formatOptsSym:IIe,endSym:$Ze,stringifiersSym:hIe,stringifySym:EIe,stringifySafeSym:_K,wildcardFirstSym:uIe,nestedKeySym:e9e,formattersSym:CIe,messageKeySym:A9e,errorKeySym:t9e,nestedKeyStrSym:r9e,msgPrefixSym:UM}=jE(),{isMainThread:i9e}=$e("worker_threads"),a9e=OK(),KM;typeof nIe.tracingChannel=="function"?KM=nIe.tracingChannel("pino_asJson"):KM={hasSubscribers:!1,traceSync(n,t,o,...a){return n.call(o,...a)}};function zE(){}function o9e(n,t){if(!t)return o;return function(...e){t.call(this,e,o,n)};function o(a,...e){if(typeof a=="object"){let i=a;a!==null&&(a.method&&a.headers&&a.socket?a=WZe(a):typeof a.setHeader=="function"&&(a=ZZe(a)));let A;i===null&&e.length===0?A=[null]:(i=e.shift(),A=e),typeof this[UM]=="string"&&i!==void 0&&i!==null&&(i=this[UM]+i),this[cIe](a,sIe(i,A,this[IIe]),n)}else{let i=a===void 0?e.shift():a;typeof this[UM]=="string"&&i!==void 0&&i!==null&&(i=this[UM]+i),this[cIe](null,sIe(i,e,this[IIe]),n)}}}function bK(n){let t="",o=0,a=!1,e=255,i=n.length;if(i>100)return JSON.stringify(n);for(var A=0;A=32;A++)e=n.charCodeAt(A),(e===34||e===92)&&(t+=n.slice(o,A)+"\\",o=A,a=!0);return a?t+=n.slice(o):t=n,e<32?JSON.stringify(n):'"'+t+'"'}function n9e(n,t,o,a){if(KM.hasSubscribers===!1)return lIe.call(this,n,t,o,a);let e={instance:this,arguments};return KM.traceSync(lIe,e,this,n,t,o,a)}function lIe(n,t,o,a){let e=this[EIe],i=this[_K],A=this[hIe],r=this[$Ze],s=this[dIe],g=this[pIe],c=this[CIe],I=this[A9e],d=this[t9e],B=this[XZe][o]+a;B=B+s;let f;c.log&&(n=c.log(n));let Q=A[uIe],y="";for(let _ in n)if(f=n[_],Object.prototype.hasOwnProperty.call(n,_)&&f!==void 0){g[_]?f=g[_](f):_===d&&g.err&&(f=g.err(f));let T=A[_]||Q;switch(typeof f){case"undefined":case"function":continue;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":T&&(f=T(f));break;case"string":f=(T||bK)(f);break;default:f=(T||e)(f,i)}if(f===void 0)continue;let R=bK(_);y+=","+R+":"+f}let m="";if(t!==void 0){f=g[I]?g[I](t):t;let _=A[I]||Q;switch(typeof f){case"function":break;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":_&&(f=_(f)),m=',"'+I+'":'+f;break;case"string":f=(_||bK)(f),m=',"'+I+'":'+f;break;default:f=(_||e)(f,i),m=',"'+I+'":'+f}}return this[e9e]&&y?B+this[r9e]+y.slice(1)+"}"+m+r:B+y+m+r}function s9e(n,t){let o,a=n[dIe],e=n[EIe],i=n[_K],A=n[hIe],r=A[uIe],s=n[pIe],g=n[CIe].bindings;t=g(t);for(let c in t)if(o=t[c],((c.length<5||c!=="level"&&c!=="serializers"&&c!=="formatters"&&c!=="customLevels")&&t.hasOwnProperty(c)&&o!==void 0)===!0){if(o=s[c]?s[c](o):o,o=(A[c]||r||e)(o,i),o===void 0)continue;a+=',"'+c+'":'+o}return a}function g9e(n){return n.write!==n.constructor.prototype.write}function HM(n){let t=new MK(n);return t.on("error",o),!n.sync&&i9e&&(gIe.register(t,c9e),t.on("close",function(){gIe.unregister(t)})),t;function o(a){if(a.code==="EPIPE"){t.write=zE,t.end=zE,t.flushSync=zE,t.destroy=zE;return}t.removeListener("error",o),t.emit("error",a)}}function c9e(n,t){n.destroyed||(t==="beforeExit"?(n.flush(),n.on("drain",function(){n.end()})):n.flushSync())}function I9e(n){return function(o,a,e={},i){if(typeof e=="string")i=HM({dest:e}),e={};else if(typeof i=="string"){if(e&&e.transport)throw Error("only one of option.transport or stream can be specified");i=HM({dest:i})}else if(e instanceof MK||e.writable||e._writableState)i=e,e={};else if(e.transport){if(e.transport instanceof MK||e.transport.writable||e.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(e.transport.targets&&e.transport.targets.length&&e.formatters&&typeof e.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let s;e.customLevels&&(s=e.useOnlyCustomLevels?e.customLevels:Object.assign({},e.levels,e.customLevels)),i=a9e({caller:a,...e.transport,levels:s})}if(e=Object.assign({},n,e),e.serializers=Object.assign({},n.serializers,e.serializers),e.formatters=Object.assign({},n.formatters,e.formatters),e.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:A,onChild:r}=e;return A===!1&&(e.level="silent"),r||(e.onChild=zE),i||(g9e(process.stdout)?i=process.stdout:i=HM({fd:process.stdout.fd||1})),{opts:e,stream:i}}}function l9e(n,t){try{return JSON.stringify(n)}catch{try{return(t||this[_K])(n)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function d9e(n,t,o){return{level:n,bindings:t,log:o}}function p9e(n){let t=Number(n);return typeof n=="string"&&Number.isFinite(t)?t:n===void 0?1:n}BIe.exports={noop:zE,buildSafeSonicBoom:HM,asChindings:s9e,asJson:n9e,genLog:o9e,createArgsNormalizer:I9e,stringify:l9e,buildFormatters:d9e,normalizeDestFileDescriptor:p9e}});var YM=ee((TLA,fIe)=>{var h9e={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},E9e={ASC:"ASC",DESC:"DESC"};fIe.exports={DEFAULT_LEVELS:h9e,SORTING_ORDER:E9e}});var RK=ee((NLA,SIe)=>{"use strict";var{lsCacheSym:u9e,levelValSym:TK,useOnlyCustomLevelsSym:C9e,streamSym:B9e,formattersSym:f9e,hooksSym:Q9e,levelCompSym:QIe}=jE(),{noop:y9e,genLog:Rd}=xM(),{DEFAULT_LEVELS:pg,SORTING_ORDER:yIe}=YM(),mIe={fatal:n=>{let t=Rd(pg.fatal,n);return function(...o){let a=this[B9e];if(t.call(this,...o),typeof a.flushSync=="function")try{a.flushSync()}catch{}}},error:n=>Rd(pg.error,n),warn:n=>Rd(pg.warn,n),info:n=>Rd(pg.info,n),debug:n=>Rd(pg.debug,n),trace:n=>Rd(pg.trace,n)},NK=Object.keys(pg).reduce((n,t)=>(n[pg[t]]=t,n),{}),m9e=Object.keys(NK).reduce((n,t)=>(n[t]='{"level":'+Number(t),n),{});function S9e(n){let t=n[f9e].level,{labels:o}=n.levels,a={};for(let e in o){let i=t(o[e],Number(e));a[e]=JSON.stringify(i).slice(0,-1)}return n[u9e]=a,n}function w9e(n,t){if(t)return!1;switch(n){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function D9e(n){let{labels:t,values:o}=this.levels;if(typeof n=="number"){if(t[n]===void 0)throw Error("unknown level value"+n);n=t[n]}if(o[n]===void 0)throw Error("unknown level "+n);let a=this[TK],e=this[TK]=o[n],i=this[C9e],A=this[QIe],r=this[Q9e].logMethod;for(let s in o){if(A(o[s],e)===!1){this[s]=y9e;continue}this[s]=w9e(s,i)?mIe[s](r):Rd(o[s],r)}this.emit("level-change",n,e,t[a],a,this)}function O9e(n){let{levels:t,levelVal:o}=this;return t&&t.labels?t.labels[o]:""}function b9e(n){let{values:t}=this.levels,o=t[n];return o!==void 0&&this[QIe](o,this[TK])}function M9e(n,t,o){return n===yIe.DESC?t<=o:t>=o}function _9e(n){return typeof n=="string"?M9e.bind(null,n):n}function T9e(n=null,t=!1){let o=n?Object.keys(n).reduce((i,A)=>(i[n[A]]=A,i),{}):null,a=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:NK,o),e=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:pg,n);return{labels:a,values:e}}function N9e(n,t,o){if(typeof n=="number"){if(![].concat(Object.keys(t||{}).map(i=>t[i]),o?[]:Object.keys(NK).map(i=>+i),1/0).includes(n))throw Error(`default level:${n} must be included in custom levels`);return}let a=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),o?null:pg,t);if(!(n in a))throw Error(`default level:${n} must be included in custom levels`)}function R9e(n,t){let{labels:o,values:a}=n;for(let e in t){if(e in a)throw Error("levels cannot be overridden");if(t[e]in o)throw Error("pre-existing level values cannot be used for new levels")}}function k9e(n){if(typeof n!="function"&&!(typeof n=="string"&&Object.values(yIe).includes(n)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}SIe.exports={initialLsCache:m9e,genLsCache:S9e,levelMethods:mIe,getLevel:O9e,setLevel:D9e,isLevelEnabled:b9e,mappings:T9e,assertNoLevelCollisions:R9e,assertDefaultLevelFound:N9e,genLevelComparison:_9e,assertLevelComparison:k9e}});var kK=ee((RLA,wIe)=>{"use strict";wIe.exports={version:"9.14.0"}});var RIe=ee((vLA,NIe)=>{"use strict";var{EventEmitter:v9e}=$e("node:events"),{lsCacheSym:P9e,levelValSym:G9e,setLevelSym:JM,getLevelSym:DIe,chindingsSym:qM,parsedChindingsSym:F9e,mixinSym:L9e,asJsonSym:bIe,writeSym:U9e,mixinMergeStrategySym:H9e,timeSym:K9e,timeSliceIndexSym:x9e,streamSym:MIe,serializersSym:kd,formattersSym:EQ,errorKeySym:Y9e,messageKeySym:j9e,useOnlyCustomLevelsSym:J9e,needsMetadataGsym:q9e,redactFmtSym:z9e,stringifySym:V9e,formatOptsSym:W9e,stringifiersSym:Z9e,msgPrefixSym:PK,hooksSym:X9e}=jE(),{getLevel:$9e,setLevel:eXe,isLevelEnabled:AXe,mappings:tXe,initialLsCache:rXe,genLsCache:iXe,assertNoLevelCollisions:aXe}=RK(),{asChindings:GK,asJson:oXe,buildFormatters:vK,stringify:OIe,noop:_Ie}=xM(),{version:nXe}=kK(),sXe=dK(),gXe=class{},TIe={constructor:gXe,child:cXe,bindings:IXe,setBindings:lXe,flush:hXe,isLevelEnabled:AXe,version:nXe,get level(){return this[DIe]()},set level(n){this[JM](n)},get levelVal(){return this[G9e]},set levelVal(n){throw Error("levelVal is read-only")},get msgPrefix(){return this[PK]},get[Symbol.toStringTag](){return"Pino"},[P9e]:rXe,[U9e]:pXe,[bIe]:oXe,[DIe]:$9e,[JM]:eXe};Object.setPrototypeOf(TIe,v9e.prototype);NIe.exports=function(){return Object.create(TIe)};var jM=n=>n;function cXe(n,t){if(!n)throw Error("missing bindings for child Pino");let o=this[kd],a=this[EQ],e=Object.create(this);if(t==null)return e[EQ].bindings!==jM&&(e[EQ]=vK(a.level,jM,a.log)),e[qM]=GK(e,n),e[JM](this.level),this.onChild!==_Ie&&this.onChild(e),e;if(t.hasOwnProperty("serializers")===!0){e[kd]=Object.create(null);for(let c in o)e[kd][c]=o[c];let s=Object.getOwnPropertySymbols(o);for(var i=0;i{"use strict";var{hasOwnProperty:uQ}=Object.prototype,Pd=UK();Pd.configure=UK;Pd.stringify=Pd;Pd.default=Pd;HK.stringify=Pd;HK.configure=UK;PIe.exports=Pd;var EXe=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function xI(n){return n.length<5e3&&!EXe.test(n)?`"${n}"`:JSON.stringify(n)}function FK(n,t){if(n.length>200||t)return n.sort(t);for(let o=1;oa;)n[e]=n[e-1],e--;n[e]=a}return n}var uXe=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function LK(n){return uXe.call(n)!==void 0&&n.length!==0}function kIe(n,t,o){n.length= 1`)}return o===void 0?1/0:o}function vd(n){return n===1?"1 item":`${n} items`}function QXe(n){let t=new Set;for(let o of n)(typeof o=="string"||typeof o=="number")&&t.add(String(o));return t}function yXe(n){if(uQ.call(n,"strict")){let t=n.strict;if(typeof t!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(t)return o=>{let a=`Object can not safely be stringified. Received type ${typeof o}`;throw typeof o!="function"&&(a+=` (${o.toString()})`),new Error(a)}}}function UK(n){n={...n};let t=yXe(n);t&&(n.bigint===void 0&&(n.bigint=!1),"circularValue"in n||(n.circularValue=Error));let o=CXe(n),a=fXe(n,"bigint"),e=BXe(n),i=typeof e=="function"?e:void 0,A=vIe(n,"maximumDepth"),r=vIe(n,"maximumBreadth");function s(B,f,Q,y,m,_){let T=f[B];switch(typeof T=="object"&&T!==null&&typeof T.toJSON=="function"&&(T=T.toJSON(B)),T=y.call(f,B,T),typeof T){case"string":return xI(T);case"object":{if(T===null)return"null";if(Q.indexOf(T)!==-1)return o;let R="",L=",",U=_;if(Array.isArray(T)){if(T.length===0)return"[]";if(Aice(n,new Set),ace=(n,t,o)=>{if(!pQ(n))return"";let a=o?"":n.message||"";if(t.has(n))return a+": ...";let e=eK(n);if(e){t.add(n);let i=typeof n.cause=="function";return a+(i?"":": ")+ace(e,t,i)}else return a},j6e=n=>ace(n,new Set);oce.exports={isErrorLike:pQ,getErrorCause:eK,stackWithCauses:Y6e,messageWithCauses:j6e}});var tK=ee((CLA,sce)=>{"use strict";var J6e=Symbol("circular-ref-tag"),bM=Symbol("pino-raw-err-ref"),nce=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[bM]},set:function(n){this[bM]=n}}});Object.defineProperty(nce,bM,{writable:!0,value:{}});sce.exports={pinoErrProto:nce,pinoErrorSymbols:{seen:J6e,rawSymbol:bM}}});var Ice=ee((BLA,cce)=>{"use strict";cce.exports=iK;var{messageWithCauses:q6e,stackWithCauses:z6e,isErrorLike:gce}=AK(),{pinoErrProto:V6e,pinoErrorSymbols:W6e}=tK(),{seen:rK}=W6e,{toString:Z6e}=Object.prototype;function iK(n){if(!gce(n))return n;n[rK]=void 0;let t=Object.create(V6e);t.type=Z6e.call(n.constructor)==="[object Function]"?n.constructor.name:n.name,t.message=q6e(n),t.stack=z6e(n),Array.isArray(n.errors)&&(t.aggregateErrors=n.errors.map(o=>iK(o)));for(let o in n)if(t[o]===void 0){let a=n[o];gce(a)?o!=="cause"&&!Object.prototype.hasOwnProperty.call(a,rK)&&(t[o]=iK(a)):t[o]=a}return delete n[rK],t.raw=n,t}});var dce=ee((fLA,lce)=>{"use strict";lce.exports=_M;var{isErrorLike:aK}=AK(),{pinoErrProto:X6e,pinoErrorSymbols:$6e}=tK(),{seen:MM}=$6e,{toString:e5e}=Object.prototype;function _M(n){if(!aK(n))return n;n[MM]=void 0;let t=Object.create(X6e);t.type=e5e.call(n.constructor)==="[object Function]"?n.constructor.name:n.name,t.message=n.message,t.stack=n.stack,Array.isArray(n.errors)&&(t.aggregateErrors=n.errors.map(o=>_M(o))),aK(n.cause)&&!Object.prototype.hasOwnProperty.call(n.cause,MM)&&(t.cause=_M(n.cause));for(let o in n)if(t[o]===void 0){let a=n[o];aK(a)?Object.prototype.hasOwnProperty.call(a,MM)||(t[o]=_M(a)):t[o]=a}return delete n[MM],t.raw=n,t}});var uce=ee((QLA,Ece)=>{"use strict";Ece.exports={mapHttpRequest:A5e,reqSerializer:hce};var oK=Symbol("pino-raw-req-ref"),pce=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[oK]},set:function(n){this[oK]=n}}});Object.defineProperty(pce,oK,{writable:!0,value:{}});function hce(n){let t=n.info||n.socket,o=Object.create(pce);if(o.id=typeof n.id=="function"?n.id():n.id||(n.info?n.info.id:void 0),o.method=n.method,n.originalUrl)o.url=n.originalUrl;else{let a=n.path;o.url=typeof a=="string"?a:n.url?n.url.path||n.url:void 0}return n.query&&(o.query=n.query),n.params&&(o.params=n.params),o.headers=n.headers,o.remoteAddress=t&&t.remoteAddress,o.remotePort=t&&t.remotePort,o.raw=n.raw||n,o}function A5e(n){return{req:hce(n)}}});var Qce=ee((yLA,fce)=>{"use strict";fce.exports={mapHttpResponse:t5e,resSerializer:Bce};var nK=Symbol("pino-raw-res-ref"),Cce=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[nK]},set:function(n){this[nK]=n}}});Object.defineProperty(Cce,nK,{writable:!0,value:{}});function Bce(n){let t=Object.create(Cce);return t.statusCode=n.headersSent?n.statusCode:null,t.headers=n.getHeaders?n.getHeaders():n._headers,t.raw=n,t}function t5e(n){return{res:Bce(n)}}});var gK=ee((mLA,yce)=>{"use strict";var sK=Ice(),r5e=dce(),TM=uce(),NM=Qce();yce.exports={err:sK,errWithCause:r5e,mapHttpRequest:TM.mapHttpRequest,mapHttpResponse:NM.mapHttpResponse,req:TM.reqSerializer,res:NM.resSerializer,wrapErrorSerializer:function(t){return t===sK?t:function(a){return t(sK(a))}},wrapRequestSerializer:function(t){return t===TM.reqSerializer?t:function(a){return t(TM.reqSerializer(a))}},wrapResponseSerializer:function(t){return t===NM.resSerializer?t:function(a){return t(NM.resSerializer(a))}}}});var cK=ee((SLA,mce)=>{"use strict";function i5e(n,t){return t}mce.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=i5e;let o=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(o))return;let a=o.slice(2),e=[];for(let i of a)i&&e.push(i.getFileName());return e}});var Mce=ee((wLA,bce)=>{"use strict";function IK(n){if(n===null||typeof n!="object")return n;if(n instanceof Date)return new Date(n.getTime());if(n instanceof Array){let t=[];for(let o=0;o{let Q=[...s.slice(0,I),...f];return o(B,Q)}:o,e,i);else if(i)Dce(c,r);else{let d=typeof o=="function"?o(o5e(c,r),[...s.slice(0,I),...r]):o;wce(c,r,d)}}if(A.length===0)g(n,0);else{let c=n;for(let I=0;I0)o?i===a&&(o=!1,a=""):(o=!0,a=i);else if(i==="["&&!o)t++;else if(i==="]"&&!o&&(t--,t<0))throw new Error(`Invalid redaction path (${n})`)}if(t!==0)throw new Error(`Invalid redaction path (${n})`)}function l5e(n){if(!Array.isArray(n))throw new TypeError("paths must be an array");for(let t of n)I5e(t)}function d5e(n={}){let{paths:t=[],censor:o="[REDACTED]",serialize:a=JSON.stringify,strict:e=!0,remove:i=!1}=n;l5e(t);let A=g5e(t);return function(s){if(e&&(s===null||typeof s!="object")&&(s==null||typeof s!="object"))return a?a(s):s;let g=c5e(s,A),c=s,I=o;return typeof o=="function"&&(I=o),n5e(g,t,I,i),a===!1?(g.restore=function(){return IK(c)},g):typeof a=="function"?a(g):JSON.stringify(g)}}bce.exports=d5e});var jE=ee((DLA,_ce)=>{"use strict";var p5e=Symbol("pino.setLevel"),h5e=Symbol("pino.getLevel"),E5e=Symbol("pino.levelVal"),u5e=Symbol("pino.levelComp"),C5e=Symbol("pino.useLevelLabels"),B5e=Symbol("pino.useOnlyCustomLevels"),f5e=Symbol("pino.mixin"),Q5e=Symbol("pino.lsCache"),y5e=Symbol("pino.chindings"),m5e=Symbol("pino.asJson"),S5e=Symbol("pino.write"),w5e=Symbol("pino.redactFmt"),D5e=Symbol("pino.time"),O5e=Symbol("pino.timeSliceIndex"),b5e=Symbol("pino.stream"),M5e=Symbol("pino.stringify"),_5e=Symbol("pino.stringifySafe"),T5e=Symbol("pino.stringifiers"),N5e=Symbol("pino.end"),R5e=Symbol("pino.formatOpts"),k5e=Symbol("pino.messageKey"),v5e=Symbol("pino.errorKey"),P5e=Symbol("pino.nestedKey"),G5e=Symbol("pino.nestedKeyStr"),F5e=Symbol("pino.mixinMergeStrategy"),L5e=Symbol("pino.msgPrefix"),U5e=Symbol("pino.wildcardFirst"),H5e=Symbol.for("pino.serializers"),K5e=Symbol.for("pino.formatters"),x5e=Symbol.for("pino.hooks"),Y5e=Symbol.for("pino.metadata");_ce.exports={setLevelSym:p5e,getLevelSym:h5e,levelValSym:E5e,levelCompSym:u5e,useLevelLabelsSym:C5e,mixinSym:f5e,lsCacheSym:Q5e,chindingsSym:y5e,asJsonSym:m5e,writeSym:S5e,serializersSym:H5e,redactFmtSym:w5e,timeSym:D5e,timeSliceIndexSym:O5e,streamSym:b5e,stringifySym:M5e,stringifySafeSym:_5e,stringifiersSym:T5e,endSym:N5e,formatOptsSym:R5e,messageKeySym:k5e,errorKeySym:v5e,nestedKeySym:P5e,wildcardFirstSym:U5e,needsMetadataGsym:Y5e,useOnlyCustomLevelsSym:B5e,formattersSym:K5e,hooksSym:x5e,nestedKeyStrSym:G5e,mixinMergeStrategySym:F5e,msgPrefixSym:L5e}});var dK=ee((OLA,kce)=>{"use strict";var Tce=Mce(),{redactFmtSym:j5e,wildcardFirstSym:kM}=jE(),lK=/[^.[\]]+|\[([^[\]]*?)\]/g,Nce="[Redacted]",Rce=!1;function J5e(n,t){let{paths:o,censor:a,remove:e}=q5e(n),i=o.reduce((s,g)=>{lK.lastIndex=0;let c=lK.exec(g),I=lK.exec(g),d=c[1]!==void 0?c[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):c[0];if(d==="*"&&(d=kM),I===null)return s[d]=null,s;if(s[d]===null)return s;let{index:B}=I,f=`${g.substr(B,g.length-1)}`;return s[d]=s[d]||[],d!==kM&&s[d].length===0&&s[d].push(...s[kM]||[]),d===kM&&Object.keys(s).forEach(function(Q){s[Q]&&s[Q].push(f)}),s[d].push(f),s},{}),A={[j5e]:Tce({paths:o,censor:a,serialize:t,strict:Rce,remove:e})},r=(...s)=>t(typeof a=="function"?a(...s):a);return[...Object.keys(i),...Object.getOwnPropertySymbols(i)].reduce((s,g)=>{if(i[g]===null)s[g]=c=>r(c,[g]);else{let c=typeof a=="function"?(I,d)=>a(I,[g,...d]):a;s[g]=Tce({paths:i[g],censor:c,serialize:t,strict:Rce,remove:e})}return s},A)}function q5e(n){if(Array.isArray(n))return n={paths:n,censor:Nce},n;let{paths:t,censor:o=Nce,remove:a}=n;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return a===!0&&(o=void 0),{paths:t,censor:o,remove:a}}kce.exports=J5e});var Gce=ee((bLA,Pce)=>{"use strict";var z5e=()=>"",V5e=()=>`,"time":${Date.now()}`,W5e=()=>`,"time":${Math.round(Date.now()/1e3)}`,Z5e=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,X5e=1000000n,vce=1000000000n,$5e=BigInt(Date.now())*X5e,eZe=process.hrtime.bigint(),AZe=()=>{let n=process.hrtime.bigint()-eZe,t=$5e+n,o=t/vce,a=t%vce,e=Number(o*1000n+a/1000000n),i=new Date(e),A=i.getUTCFullYear(),r=(i.getUTCMonth()+1).toString().padStart(2,"0"),s=i.getUTCDate().toString().padStart(2,"0"),g=i.getUTCHours().toString().padStart(2,"0"),c=i.getUTCMinutes().toString().padStart(2,"0"),I=i.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${A}-${r}-${s}T${g}:${c}:${I}.${a.toString().padStart(9,"0")}Z"`};Pce.exports={nullTime:z5e,epochTime:V5e,unixTime:W5e,isoTime:Z5e,isoTimeNano:AZe}});var Lce=ee((MLA,Fce)=>{"use strict";function tZe(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}Fce.exports=rZe;function rZe(n,t,o){var a=o&&o.stringify||tZe,e=1;if(typeof n=="object"&&n!==null){var i=t.length+e;if(i===1)return n;var A=new Array(i);A[0]=a(n);for(var r=1;r-1?I:0,n.charCodeAt(B+1)){case 100:case 102:if(c>=s||t[c]==null)break;I=s||t[c]==null)break;I=s||t[c]===void 0)break;I",I=B+2,B++;break}g+=a(t[c]),I=B+2,B++;break;case 115:if(c>=s)break;I{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let t=function(o){if((o>0&&o<1/0)===!1)throw typeof o!="number"&&typeof o!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(n,0,0,Number(o))},n=new Int32Array(new SharedArrayBuffer(4));pK.exports=t}else{let n=function(t){if((t>0&&t<1/0)===!1)throw typeof t!="number"&&typeof t!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let a=Date.now()+Number(t);for(;a>Date.now(););};pK.exports=n}});var qce=ee((TLA,Jce)=>{"use strict";var er=$e("fs"),iZe=$e("events"),aZe=$e("util").inherits,Uce=$e("path"),uK=hK(),oZe=$e("assert"),vM=100,PM=Buffer.allocUnsafe(0),nZe=16*1024,Hce="buffer",Kce="utf8",[sZe,gZe]=(process.versions.node||"0.0").split(".").map(Number),cZe=sZe>=22&&gZe>=7;function xce(n,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function o(i,A){if(i){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",i)}):t.emit("error",i);return}let r=t._reopening;t.fd=A,t.file=n,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t.destroyed&&(!t._writing&&t._len>t.minLength||t._flushPending?t._actualWrite():r&&process.nextTick(()=>t.emit("drain")))}let a=t.append?"a":"w",e=t.mode;if(t.sync)try{t.mkdir&&er.mkdirSync(Uce.dirname(n),{recursive:!0});let i=er.openSync(n,a,e);o(null,i)}catch(i){throw o(i),i}else t.mkdir?er.mkdir(Uce.dirname(n),{recursive:!0},i=>{if(i)return o(i);er.open(n,a,e,o)}):er.open(n,a,e,o)}function is(n){if(!(this instanceof is))return new is(n);let{fd:t,dest:o,minLength:a,maxLength:e,maxWrite:i,periodicFlush:A,sync:r,append:s=!0,mkdir:g,retryEAGAIN:c,fsync:I,contentMode:d,mode:B}=n||{};t=t||o,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(a||0,16387),this.file=null,this.destroyed=!1,this.minLength=a||0,this.maxLength=e||0,this.maxWrite=i||nZe,this._periodicFlush=A||0,this._periodicFlushTimer=void 0,this.sync=r||!1,this.writable=!0,this._fsync=I||!1,this.append=s||!1,this.mode=B,this.retryEAGAIN=c||(()=>!0),this.mkdir=g||!1;let f,Q;if(d===Hce)this._writingBuf=PM,this.write=dZe,this.flush=hZe,this.flushSync=uZe,this._actualWrite=BZe,f=()=>er.writeSync(this.fd,this._writingBuf),Q=()=>er.write(this.fd,this._writingBuf,this.release);else if(d===void 0||d===Kce)this._writingBuf="",this.write=lZe,this.flush=pZe,this.flushSync=EZe,this._actualWrite=CZe,f=()=>Buffer.isBuffer(this._writingBuf)?er.writeSync(this.fd,this._writingBuf):er.writeSync(this.fd,this._writingBuf,"utf8"),Q=()=>Buffer.isBuffer(this._writingBuf)?er.write(this.fd,this._writingBuf,this.release):er.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${Kce}" and "${Hce}", but passed ${d}`);if(typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")xce(t,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(y,m)=>{if(y){if((y.code==="EAGAIN"||y.code==="EBUSY")&&this.retryEAGAIN(y,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{uK(vM),this.release(void 0,0)}catch(R){this.release(R)}else setTimeout(Q,vM);else this._writing=!1,this.emit("error",y);return}this.emit("write",m);let _=EK(this._writingBuf,this._len,m);if(this._len=_.len,this._writingBuf=_.writingBuf,this._writingBuf.length){if(!this.sync){Q();return}try{do{let R=f(),L=EK(this._writingBuf,this._len,R);this._len=L.len,this._writingBuf=L.writingBuf}while(this._writingBuf.length)}catch(R){this.release(R);return}}this._fsync&&er.fsyncSync(this.fd);let T=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):T>this.minLength?this._actualWrite():this._ending?T>0?this._actualWrite():(this._writing=!1,GM(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(IZe,this)):this.emit("drain"))},this.on("newListener",function(y){y==="drain"&&(this._asyncDrainScheduled=!1)}),this._periodicFlush!==0&&(this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref())}function EK(n,t,o){return typeof n=="string"&&(n=Buffer.from(n)),t=Math.max(t-o,0),n=n.subarray(o),{writingBuf:n,len:t}}function IZe(n){n.listenerCount("drain")>0&&(n._asyncDrainScheduled=!1,n.emit("drain"))}aZe(is,iZe);function Yce(n,t){return n.length===0?PM:n.length===1?n[0]:Buffer.concat(n,t)}function lZe(n){if(this.destroyed)throw new Error("SonicBoom destroyed");n=""+n;let t=Buffer.byteLength(n),o=this._len+t,a=this._bufs;return this.maxLength&&o>this.maxLength?(this.emit("drop",n),this._lenthis.maxWrite?a.push(n):a[a.length-1]+=n,this._len=o,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._lenthis.maxLength?(this.emit("drop",n),this._lenthis.maxWrite?(o.push([n]),a.push(n.length)):(o[o.length-1].push(n),a[a.length-1]+=n.length),this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len{if(this._fsync)this._flushPending=!1,n();else try{er.fsync(this.fd,a=>{this._flushPending=!1,n(a)})}catch(a){n(a)}this.off("error",o)},o=a=>{this._flushPending=!1,n(a),this.off("drain",t)};this.once("drain",t),this.once("error",o)}function pZe(n){if(n!=null&&typeof n!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(n){n(t);return}throw t}if(this.minLength<=0){n?.();return}n&&jce.call(this,n),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function hZe(n){if(n!=null&&typeof n!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(n){n(t);return}throw t}if(this.minLength<=0){n?.();return}n&&jce.call(this,n),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}is.prototype.reopen=function(n){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(n)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(n&&(this.file=n),this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&er.close(t,o=>{if(o)return this.emit("error",o)})}),xce(this.file,this)};is.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():GM(this)))};function EZe(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let n="";for(;this._bufs.length||n.length;){n.length<=0&&(n=this._bufs[0]);try{let t=Buffer.isBuffer(n)?er.writeSync(this.fd,n):er.writeSync(this.fd,n,"utf8"),o=EK(n,this._len,t);n=o.writingBuf,this._len=o.len,n.length<=0&&this._bufs.shift()}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,n.length,this._len-n.length))throw t;uK(vM)}}try{er.fsyncSync(this.fd)}catch{}}function uZe(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=PM);let n=PM;for(;this._bufs.length||n.length;){n.length<=0&&(n=Yce(this._bufs[0],this._lens[0]));try{let t=er.writeSync(this.fd,n);n=n.subarray(t),this._len=Math.max(this._len-t,0),n.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,n.length,this._len-n.length))throw t;uK(vM)}}}is.prototype.destroy=function(){this.destroyed||GM(this)};function CZe(){let n=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:this._bufs.shift()||"",this.sync)try{let t=Buffer.isBuffer(this._writingBuf)?er.writeSync(this.fd,this._writingBuf):er.writeSync(this.fd,this._writingBuf,"utf8");n(null,t)}catch(t){n(t)}else er.write(this.fd,this._writingBuf,n)}function BZe(){let n=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:Yce(this._bufs.shift(),this._lens.shift()),this.sync)try{let t=er.writeSync(this.fd,this._writingBuf);n(null,t)}catch(t){n(t)}else cZe&&(this._writingBuf=Buffer.from(this._writingBuf)),er.write(this.fd,this._writingBuf,n)}function GM(n){if(n.fd===-1){n.once("ready",GM.bind(null,n));return}n._periodicFlushTimer!==void 0&&clearInterval(n._periodicFlushTimer),n.destroyed=!0,n._bufs=[],n._lens=[],oZe(typeof n.fd=="number",`sonic.fd must be a number, got ${typeof n.fd}`);try{er.fsync(n.fd,t)}catch{}function t(){n.fd!==1&&n.fd!==2?er.close(n.fd,o):o()}function o(a){if(a){n.emit("error",a);return}n._ending&&!n._writing&&n.emit("finish"),n.emit("close")}}is.SonicBoom=is;is.default=is;Jce.exports=is});var CK=ee((NLA,Xce)=>{"use strict";var as={exit:[],beforeExit:[]},zce={exit:yZe,beforeExit:mZe},JE;function fZe(){JE===void 0&&(JE=new FinalizationRegistry(SZe))}function QZe(n){as[n].length>0||process.on(n,zce[n])}function Vce(n){as[n].length>0||(process.removeListener(n,zce[n]),as.exit.length===0&&as.beforeExit.length===0&&(JE=void 0))}function yZe(){Wce("exit")}function mZe(){Wce("beforeExit")}function Wce(n){for(let t of as[n]){let o=t.deref(),a=t.fn;o!==void 0&&a(o,n)}as[n]=[]}function SZe(n){for(let t of["exit","beforeExit"]){let o=as[t].indexOf(n);as[t].splice(o,o+1),Vce(t)}}function Zce(n,t,o){if(t===void 0)throw new Error("the object can't be undefined");QZe(n);let a=new WeakRef(t);a.fn=o,fZe(),JE.register(t,a),as[n].push(a)}function wZe(n,t){Zce("exit",n,t)}function DZe(n,t){Zce("beforeExit",n,t)}function OZe(n){if(JE!==void 0){JE.unregister(n);for(let t of["exit","beforeExit"])as[t]=as[t].filter(o=>{let a=o.deref();return a&&a!==n}),Vce(t)}}Xce.exports={register:wZe,registerBeforeExit:DZe,unregister:OZe}});var $ce=ee((RLA,bZe)=>{bZe.exports={name:"thread-stream",version:"3.2.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",dependencies:{"real-require":"^0.2.0"},devDependencies:{"@types/node":"^20.1.0","@types/tap":"^15.0.0","@yao-pkg/pkg":"^5.11.5",desm:"^1.3.0",fastbench:"^1.0.1",husky:"^9.0.6","pino-elasticsearch":"^8.0.0","sonic-boom":"^4.0.1",standard:"^17.0.0",tap:"^16.2.0","ts-node":"^10.8.0",typescript:"^5.3.2","why-is-node-running":"^2.2.2"},scripts:{build:"tsc --noEmit",test:'standard && npm run build && npm run transpile && tap "test/**/*.test.*js" && tap --ts test/*.test.*ts',"test:ci":"standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts","test:ci:js":'tap --no-check-coverage --timeout=120 --coverage-report=lcovonly "test/**/*.test.*js"',"test:ci:ts":'tap --ts --no-check-coverage --coverage-report=lcovonly "test/**/*.test.*ts"',"test:yarn":'npm run transpile && tap "test/**/*.test.js" --no-check-coverage',transpile:"sh ./test/ts/transpile.sh",prepare:"husky install"},standard:{ignore:["test/ts/**/*","test/syntax-error.mjs"]},repository:{type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords:["worker","thread","threads","stream"],author:"Matteo Collina ",license:"MIT",bugs:{url:"https://github.com/mcollina/thread-stream/issues"},homepage:"https://github.com/mcollina/thread-stream#readme"}});var AIe=ee((kLA,eIe)=>{"use strict";function MZe(n,t,o,a,e){let i=Date.now()+a,A=Atomics.load(n,t);if(A===o){e(null,"ok");return}let r=A,s=g=>{Date.now()>i?e(null,"timed-out"):setTimeout(()=>{r=A,A=Atomics.load(n,t),A===r?s(g>=1e3?1e3:g*2):A===o?e(null,"ok"):e(null,"not-equal")},g)};s(1)}function _Ze(n,t,o,a,e){let i=Date.now()+a,A=Atomics.load(n,t);if(A!==o){e(null,"ok");return}let r=s=>{Date.now()>i?e(null,"timed-out"):setTimeout(()=>{A=Atomics.load(n,t),A!==o?e(null,"ok"):r(s>=1e3?1e3:s*2)},s)};r(1)}eIe.exports={wait:MZe,waitDiff:_Ze}});var rIe=ee((vLA,tIe)=>{"use strict";tIe.exports={WRITE_INDEX:4,READ_INDEX:8,SEQ_INDEX:2}});var sIe=ee((PLA,nIe)=>{"use strict";var{version:TZe}=$ce(),{EventEmitter:NZe}=$e("events"),{Worker:RZe}=$e("worker_threads"),{join:kZe}=$e("path"),{pathToFileURL:vZe}=$e("url"),{wait:PZe}=AIe(),{WRITE_INDEX:un,READ_INDEX:ao,SEQ_INDEX:BK}=rIe(),GZe=$e("buffer"),FZe=$e("assert"),Te=Symbol("kImpl"),LZe=GZe.constants.MAX_STRING_LENGTH;function qE(n,t){Atomics.add(n[Te].state,BK,1),t(),Atomics.add(n[Te].state,BK,1),Atomics.notify(n[Te].state,BK)}var hQ=class{constructor(t){this._value=t}deref(){return this._value}},LM=class{register(){}unregister(){}},UZe=process.env.NODE_V8_COVERAGE?LM:global.FinalizationRegistry||LM,HZe=process.env.NODE_V8_COVERAGE?hQ:global.WeakRef||hQ,iIe=new UZe(n=>{n.exited||n.terminate()});function KZe(n,t){let{filename:o,workerData:a}=t,i=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||kZe(__dirname,"lib","worker.js"),A=new RZe(i,{...t.workerOpts,trackUnmanagedFds:!1,workerData:{filename:o.indexOf("file://")===0?o:vZe(o).href,dataBuf:n[Te].dataBuf,stateBuf:n[Te].stateBuf,workerData:{$context:{threadStreamVersion:TZe},...a}}});return A.stream=new hQ(n),A.on("message",xZe),A.on("exit",oIe),iIe.register(n,A),A}function aIe(n){FZe(!n[Te].sync),n[Te].needDrain&&(n[Te].needDrain=!1,n.emit("drain"))}function FM(n){let t=Atomics.load(n[Te].state,un),o=n[Te].data.length-t;if(o>0){if(n[Te].buf.length===0){n[Te].flushing=!1,n[Te].ending?SK(n):n[Te].needDrain&&process.nextTick(aIe,n);return}let a=n[Te].buf.slice(0,o),e=Buffer.byteLength(a);e<=o?(n[Te].buf=n[Te].buf.slice(o),UM(n,a,FM.bind(null,n))):n.flush(()=>{if(!n.destroyed){for(qE(n,()=>{Atomics.store(n[Te].state,ao,0),Atomics.store(n[Te].state,un,0)}),Atomics.notify(n[Te].state,ao);e>n[Te].data.length;)o=o/2,a=n[Te].buf.slice(0,o),e=Buffer.byteLength(a);n[Te].buf=n[Te].buf.slice(o),UM(n,a,FM.bind(null,n))}})}else if(o===0){if(t===0&&n[Te].buf.length===0)return;n.flush(()=>{qE(n,()=>{Atomics.store(n[Te].state,ao,0),Atomics.store(n[Te].state,un,0)}),Atomics.notify(n[Te].state,ao),FM(n)})}else dg(n,new Error("overwritten"))}function xZe(n){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}if(n?.code!=null)switch(n.code){case"READY":this.stream=new HZe(t),t.flush(()=>{t[Te].ready=!0,t.emit("ready")});break;case"ERROR":dg(t,n.err);break;case"EVENT":Array.isArray(n.args)?t.emit(n.name,...n.args):t.emit(n.name,n.args);break;case"WARNING":process.emitWarning(n.err);break;default:dg(t,new Error("this should not happen: "+n.code))}}function oIe(n){let t=this.stream.deref();t!==void 0&&(iIe.unregister(t),t.worker.exited=!0,t.worker.off("exit",oIe),dg(t,n!==0?new Error("the worker thread exited"):null))}var QK=class extends NZe{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[Te]={},this[Te].stateBuf=new SharedArrayBuffer(128),this[Te].state=new Int32Array(this[Te].stateBuf),this[Te].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[Te].data=Buffer.from(this[Te].dataBuf),this[Te].sync=t.sync||!1,this[Te].ending=!1,this[Te].ended=!1,this[Te].needDrain=!1,this[Te].destroyed=!1,this[Te].flushing=!1,this[Te].ready=!1,this[Te].finished=!1,this[Te].errored=null,this[Te].closed=!1,this[Te].buf="",this.worker=KZe(this,t),this.on("message",(o,a)=>{this.worker.postMessage(o,a)})}write(t){if(this[Te].destroyed)return yK(this,new Error("the worker has exited")),!1;if(this[Te].ending)return yK(this,new Error("the worker is ending")),!1;if(this[Te].flushing&&this[Te].buf.length+t.length>=LZe)try{fK(this),this[Te].flushing=!0}catch(o){return dg(this,o),!1}if(this[Te].buf+=t,this[Te].sync)try{return fK(this),!0}catch(o){return dg(this,o),!1}return this[Te].flushing||(this[Te].flushing=!0,setImmediate(FM,this)),this[Te].needDrain=this[Te].data.length-this[Te].buf.length-Atomics.load(this[Te].state,un)<=0,!this[Te].needDrain}end(){this[Te].destroyed||(this[Te].ending=!0,SK(this))}flush(t){if(this[Te].destroyed){typeof t=="function"&&process.nextTick(t,new Error("the worker has exited"));return}let o=Atomics.load(this[Te].state,un);PZe(this[Te].state,ao,o,1/0,(a,e)=>{if(a){dg(this,a),process.nextTick(t,a);return}if(e==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[Te].destroyed||(fK(this),mK(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[Te].ready}get destroyed(){return this[Te].destroyed}get closed(){return this[Te].closed}get writable(){return!this[Te].destroyed&&!this[Te].ending}get writableEnded(){return this[Te].ending}get writableFinished(){return this[Te].finished}get writableNeedDrain(){return this[Te].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[Te].errored}};function yK(n,t){setImmediate(()=>{n.emit("error",t)})}function dg(n,t){n[Te].destroyed||(n[Te].destroyed=!0,t&&(n[Te].errored=t,yK(n,t)),n.worker.exited?setImmediate(()=>{n[Te].closed=!0,n.emit("close")}):n.worker.terminate().catch(()=>{}).then(()=>{n[Te].closed=!0,n.emit("close")}))}function UM(n,t,o){let a=Atomics.load(n[Te].state,un),e=Buffer.byteLength(t);return n[Te].data.write(t,a),qE(n,()=>{Atomics.store(n[Te].state,un,a+e)}),o(),!0}function SK(n){if(!(n[Te].ended||!n[Te].ending||n[Te].flushing)){n[Te].ended=!0;try{n.flushSync();let t=Atomics.load(n[Te].state,ao);qE(n,()=>{Atomics.store(n[Te].state,un,-1)});let o=0;for(;t!==-1;){if(Atomics.wait(n[Te].state,ao,t,1e3),t=Atomics.load(n[Te].state,ao),t===-2){dg(n,new Error("end() failed"));return}if(++o===10){dg(n,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{n[Te].finished=!0,n.emit("finish")})}catch(t){dg(n,t)}}}function fK(n){let t=()=>{n[Te].ending?SK(n):n[Te].needDrain&&process.nextTick(aIe,n)};for(n[Te].flushing=!1;n[Te].buf.length!==0;){let o=Atomics.load(n[Te].state,un),a=n[Te].data.length-o;if(a===0){mK(n),qE(n,()=>{Atomics.store(n[Te].state,ao,0),Atomics.store(n[Te].state,un,0)}),Atomics.notify(n[Te].state,ao);continue}else if(a<0)throw new Error("overwritten");let e=n[Te].buf.slice(0,a),i=Buffer.byteLength(e);if(i<=a)n[Te].buf=n[Te].buf.slice(a),UM(n,e,t);else{for(mK(n),qE(n,()=>{Atomics.store(n[Te].state,ao,0),Atomics.store(n[Te].state,un,0)}),Atomics.notify(n[Te].state,ao);i>n[Te].buf.length;)a=a/2,e=n[Te].buf.slice(0,a),i=Buffer.byteLength(e);n[Te].buf=n[Te].buf.slice(a),UM(n,e,t)}}}function mK(n){if(n[Te].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(n[Te].state,un),o=0;for(;;){let a=Atomics.load(n[Te].state,ao);if(a===-2)throw Error("_flushSync failed");if(a!==t)Atomics.wait(n[Te].state,ao,a,1e3);else break;if(++o===10)throw new Error("_flushSync took too long (10s)")}}nIe.exports=QK});var OK=ee((GLA,gIe)=>{"use strict";var{createRequire:YZe}=$e("module"),jZe=cK(),{join:wK,isAbsolute:JZe,sep:qZe}=$e("node:path"),zZe=hK(),DK=CK(),VZe=sIe();function WZe(n){DK.register(n,XZe),DK.registerBeforeExit(n,$Ze),n.on("close",function(){DK.unregister(n)})}function ZZe(n,t,o,a){let e=new VZe({filename:n,workerData:t,workerOpts:o,sync:a});e.on("ready",i),e.on("close",function(){process.removeListener("exit",A)}),process.on("exit",A);function i(){process.removeListener("exit",A),e.unref(),o.autoEnd!==!1&&WZe(e)}function A(){e.closed||(e.flushSync(),zZe(100),e.end())}return e}function XZe(n){n.ref(),n.flushSync(),n.end(),n.once("close",function(){n.unref()})}function $Ze(n){n.flushSync()}function e9e(n){let{pipeline:t,targets:o,levels:a,dedupe:e,worker:i={},caller:A=jZe(),sync:r=!1}=n,s={...n.options},g=typeof A=="string"?[A]:A,c="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},I=n.target;if(I&&o)throw new Error("only one of target or targets can be specified");return o?(I=c["pino-worker"]||wK(__dirname,"worker.js"),s.targets=o.filter(B=>B.target).map(B=>({...B,target:d(B.target)})),s.pipelines=o.filter(B=>B.pipeline).map(B=>B.pipeline.map(f=>({...f,level:B.level,target:d(f.target)})))):t&&(I=c["pino-worker"]||wK(__dirname,"worker.js"),s.pipelines=[t.map(B=>({...B,target:d(B.target)}))]),a&&(s.levels=a),e&&(s.dedupe=e),s.pinoWillSendConfig=!0,ZZe(d(I),s,i,r);function d(B){if(B=c[B]||B,JZe(B)||B.indexOf("file://")===0)return B;if(B==="pino/file")return wK(__dirname,"..","file.js");let f;for(let Q of g)try{let y=Q==="node:repl"?process.cwd()+qZe:Q;f=YZe(y).resolve(B);break}catch{continue}if(!f)throw new Error(`unable to determine transport target for "${B}"`);return f}}gIe.exports=e9e});var YM=ee((FLA,yIe)=>{"use strict";var cIe=$e("node:diagnostics_channel"),IIe=Lce(),{mapHttpRequest:A9e,mapHttpResponse:t9e}=gK(),MK=qce(),lIe=CK(),{lsCacheSym:r9e,chindingsSym:EIe,writeSym:dIe,serializersSym:uIe,formatOptsSym:pIe,endSym:i9e,stringifiersSym:CIe,stringifySym:BIe,stringifySafeSym:_K,wildcardFirstSym:fIe,nestedKeySym:a9e,formattersSym:QIe,messageKeySym:o9e,errorKeySym:n9e,nestedKeyStrSym:s9e,msgPrefixSym:HM}=jE(),{isMainThread:g9e}=$e("worker_threads"),c9e=OK(),xM;typeof cIe.tracingChannel=="function"?xM=cIe.tracingChannel("pino_asJson"):xM={hasSubscribers:!1,traceSync(n,t,o,...a){return n.call(o,...a)}};function zE(){}function I9e(n,t){if(!t)return o;return function(...e){t.call(this,e,o,n)};function o(a,...e){if(typeof a=="object"){let i=a;a!==null&&(a.method&&a.headers&&a.socket?a=A9e(a):typeof a.setHeader=="function"&&(a=t9e(a)));let A;i===null&&e.length===0?A=[null]:(i=e.shift(),A=e),typeof this[HM]=="string"&&i!==void 0&&i!==null&&(i=this[HM]+i),this[dIe](a,IIe(i,A,this[pIe]),n)}else{let i=a===void 0?e.shift():a;typeof this[HM]=="string"&&i!==void 0&&i!==null&&(i=this[HM]+i),this[dIe](null,IIe(i,e,this[pIe]),n)}}}function bK(n){let t="",o=0,a=!1,e=255,i=n.length;if(i>100)return JSON.stringify(n);for(var A=0;A=32;A++)e=n.charCodeAt(A),(e===34||e===92)&&(t+=n.slice(o,A)+"\\",o=A,a=!0);return a?t+=n.slice(o):t=n,e<32?JSON.stringify(n):'"'+t+'"'}function l9e(n,t,o,a){if(xM.hasSubscribers===!1)return hIe.call(this,n,t,o,a);let e={instance:this,arguments};return xM.traceSync(hIe,e,this,n,t,o,a)}function hIe(n,t,o,a){let e=this[BIe],i=this[_K],A=this[CIe],r=this[i9e],s=this[EIe],g=this[uIe],c=this[QIe],I=this[o9e],d=this[n9e],B=this[r9e][o]+a;B=B+s;let f;c.log&&(n=c.log(n));let Q=A[fIe],y="";for(let _ in n)if(f=n[_],Object.prototype.hasOwnProperty.call(n,_)&&f!==void 0){g[_]?f=g[_](f):_===d&&g.err&&(f=g.err(f));let T=A[_]||Q;switch(typeof f){case"undefined":case"function":continue;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":T&&(f=T(f));break;case"string":f=(T||bK)(f);break;default:f=(T||e)(f,i)}if(f===void 0)continue;let R=bK(_);y+=","+R+":"+f}let m="";if(t!==void 0){f=g[I]?g[I](t):t;let _=A[I]||Q;switch(typeof f){case"function":break;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":_&&(f=_(f)),m=',"'+I+'":'+f;break;case"string":f=(_||bK)(f),m=',"'+I+'":'+f;break;default:f=(_||e)(f,i),m=',"'+I+'":'+f}}return this[a9e]&&y?B+this[s9e]+y.slice(1)+"}"+m+r:B+y+m+r}function d9e(n,t){let o,a=n[EIe],e=n[BIe],i=n[_K],A=n[CIe],r=A[fIe],s=n[uIe],g=n[QIe].bindings;t=g(t);for(let c in t)if(o=t[c],((c.length<5||c!=="level"&&c!=="serializers"&&c!=="formatters"&&c!=="customLevels")&&t.hasOwnProperty(c)&&o!==void 0)===!0){if(o=s[c]?s[c](o):o,o=(A[c]||r||e)(o,i),o===void 0)continue;a+=',"'+c+'":'+o}return a}function p9e(n){return n.write!==n.constructor.prototype.write}function KM(n){let t=new MK(n);return t.on("error",o),!n.sync&&g9e&&(lIe.register(t,h9e),t.on("close",function(){lIe.unregister(t)})),t;function o(a){if(a.code==="EPIPE"){t.write=zE,t.end=zE,t.flushSync=zE,t.destroy=zE;return}t.removeListener("error",o),t.emit("error",a)}}function h9e(n,t){n.destroyed||(t==="beforeExit"?(n.flush(),n.on("drain",function(){n.end()})):n.flushSync())}function E9e(n){return function(o,a,e={},i){if(typeof e=="string")i=KM({dest:e}),e={};else if(typeof i=="string"){if(e&&e.transport)throw Error("only one of option.transport or stream can be specified");i=KM({dest:i})}else if(e instanceof MK||e.writable||e._writableState)i=e,e={};else if(e.transport){if(e.transport instanceof MK||e.transport.writable||e.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(e.transport.targets&&e.transport.targets.length&&e.formatters&&typeof e.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let s;e.customLevels&&(s=e.useOnlyCustomLevels?e.customLevels:Object.assign({},e.levels,e.customLevels)),i=c9e({caller:a,...e.transport,levels:s})}if(e=Object.assign({},n,e),e.serializers=Object.assign({},n.serializers,e.serializers),e.formatters=Object.assign({},n.formatters,e.formatters),e.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:A,onChild:r}=e;return A===!1&&(e.level="silent"),r||(e.onChild=zE),i||(p9e(process.stdout)?i=process.stdout:i=KM({fd:process.stdout.fd||1})),{opts:e,stream:i}}}function u9e(n,t){try{return JSON.stringify(n)}catch{try{return(t||this[_K])(n)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function C9e(n,t,o){return{level:n,bindings:t,log:o}}function B9e(n){let t=Number(n);return typeof n=="string"&&Number.isFinite(t)?t:n===void 0?1:n}yIe.exports={noop:zE,buildSafeSonicBoom:KM,asChindings:d9e,asJson:l9e,genLog:I9e,createArgsNormalizer:E9e,stringify:u9e,buildFormatters:C9e,normalizeDestFileDescriptor:B9e}});var jM=ee((LLA,mIe)=>{var f9e={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},Q9e={ASC:"ASC",DESC:"DESC"};mIe.exports={DEFAULT_LEVELS:f9e,SORTING_ORDER:Q9e}});var RK=ee((ULA,OIe)=>{"use strict";var{lsCacheSym:y9e,levelValSym:TK,useOnlyCustomLevelsSym:m9e,streamSym:S9e,formattersSym:w9e,hooksSym:D9e,levelCompSym:SIe}=jE(),{noop:O9e,genLog:Rd}=YM(),{DEFAULT_LEVELS:pg,SORTING_ORDER:wIe}=jM(),DIe={fatal:n=>{let t=Rd(pg.fatal,n);return function(...o){let a=this[S9e];if(t.call(this,...o),typeof a.flushSync=="function")try{a.flushSync()}catch{}}},error:n=>Rd(pg.error,n),warn:n=>Rd(pg.warn,n),info:n=>Rd(pg.info,n),debug:n=>Rd(pg.debug,n),trace:n=>Rd(pg.trace,n)},NK=Object.keys(pg).reduce((n,t)=>(n[pg[t]]=t,n),{}),b9e=Object.keys(NK).reduce((n,t)=>(n[t]='{"level":'+Number(t),n),{});function M9e(n){let t=n[w9e].level,{labels:o}=n.levels,a={};for(let e in o){let i=t(o[e],Number(e));a[e]=JSON.stringify(i).slice(0,-1)}return n[y9e]=a,n}function _9e(n,t){if(t)return!1;switch(n){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function T9e(n){let{labels:t,values:o}=this.levels;if(typeof n=="number"){if(t[n]===void 0)throw Error("unknown level value"+n);n=t[n]}if(o[n]===void 0)throw Error("unknown level "+n);let a=this[TK],e=this[TK]=o[n],i=this[m9e],A=this[SIe],r=this[D9e].logMethod;for(let s in o){if(A(o[s],e)===!1){this[s]=O9e;continue}this[s]=_9e(s,i)?DIe[s](r):Rd(o[s],r)}this.emit("level-change",n,e,t[a],a,this)}function N9e(n){let{levels:t,levelVal:o}=this;return t&&t.labels?t.labels[o]:""}function R9e(n){let{values:t}=this.levels,o=t[n];return o!==void 0&&this[SIe](o,this[TK])}function k9e(n,t,o){return n===wIe.DESC?t<=o:t>=o}function v9e(n){return typeof n=="string"?k9e.bind(null,n):n}function P9e(n=null,t=!1){let o=n?Object.keys(n).reduce((i,A)=>(i[n[A]]=A,i),{}):null,a=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:NK,o),e=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:pg,n);return{labels:a,values:e}}function G9e(n,t,o){if(typeof n=="number"){if(![].concat(Object.keys(t||{}).map(i=>t[i]),o?[]:Object.keys(NK).map(i=>+i),1/0).includes(n))throw Error(`default level:${n} must be included in custom levels`);return}let a=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),o?null:pg,t);if(!(n in a))throw Error(`default level:${n} must be included in custom levels`)}function F9e(n,t){let{labels:o,values:a}=n;for(let e in t){if(e in a)throw Error("levels cannot be overridden");if(t[e]in o)throw Error("pre-existing level values cannot be used for new levels")}}function L9e(n){if(typeof n!="function"&&!(typeof n=="string"&&Object.values(wIe).includes(n)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}OIe.exports={initialLsCache:b9e,genLsCache:M9e,levelMethods:DIe,getLevel:N9e,setLevel:T9e,isLevelEnabled:R9e,mappings:P9e,assertNoLevelCollisions:F9e,assertDefaultLevelFound:G9e,genLevelComparison:v9e,assertLevelComparison:L9e}});var kK=ee((HLA,bIe)=>{"use strict";bIe.exports={version:"9.14.0"}});var PIe=ee((xLA,vIe)=>{"use strict";var{EventEmitter:U9e}=$e("node:events"),{lsCacheSym:H9e,levelValSym:K9e,setLevelSym:qM,getLevelSym:MIe,chindingsSym:zM,parsedChindingsSym:x9e,mixinSym:Y9e,asJsonSym:TIe,writeSym:j9e,mixinMergeStrategySym:J9e,timeSym:q9e,timeSliceIndexSym:z9e,streamSym:NIe,serializersSym:kd,formattersSym:EQ,errorKeySym:V9e,messageKeySym:W9e,useOnlyCustomLevelsSym:Z9e,needsMetadataGsym:X9e,redactFmtSym:$9e,stringifySym:eXe,formatOptsSym:AXe,stringifiersSym:tXe,msgPrefixSym:PK,hooksSym:rXe}=jE(),{getLevel:iXe,setLevel:aXe,isLevelEnabled:oXe,mappings:nXe,initialLsCache:sXe,genLsCache:gXe,assertNoLevelCollisions:cXe}=RK(),{asChindings:GK,asJson:IXe,buildFormatters:vK,stringify:_Ie,noop:RIe}=YM(),{version:lXe}=kK(),dXe=dK(),pXe=class{},kIe={constructor:pXe,child:hXe,bindings:EXe,setBindings:uXe,flush:fXe,isLevelEnabled:oXe,version:lXe,get level(){return this[MIe]()},set level(n){this[qM](n)},get levelVal(){return this[K9e]},set levelVal(n){throw Error("levelVal is read-only")},get msgPrefix(){return this[PK]},get[Symbol.toStringTag](){return"Pino"},[H9e]:sXe,[j9e]:BXe,[TIe]:IXe,[MIe]:iXe,[qM]:aXe};Object.setPrototypeOf(kIe,U9e.prototype);vIe.exports=function(){return Object.create(kIe)};var JM=n=>n;function hXe(n,t){if(!n)throw Error("missing bindings for child Pino");let o=this[kd],a=this[EQ],e=Object.create(this);if(t==null)return e[EQ].bindings!==JM&&(e[EQ]=vK(a.level,JM,a.log)),e[zM]=GK(e,n),e[qM](this.level),this.onChild!==RIe&&this.onChild(e),e;if(t.hasOwnProperty("serializers")===!0){e[kd]=Object.create(null);for(let c in o)e[kd][c]=o[c];let s=Object.getOwnPropertySymbols(o);for(var i=0;i{"use strict";var{hasOwnProperty:uQ}=Object.prototype,Pd=UK();Pd.configure=UK;Pd.stringify=Pd;Pd.default=Pd;HK.stringify=Pd;HK.configure=UK;LIe.exports=Pd;var QXe=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function YI(n){return n.length<5e3&&!QXe.test(n)?`"${n}"`:JSON.stringify(n)}function FK(n,t){if(n.length>200||t)return n.sort(t);for(let o=1;oa;)n[e]=n[e-1],e--;n[e]=a}return n}var yXe=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function LK(n){return yXe.call(n)!==void 0&&n.length!==0}function GIe(n,t,o){n.length= 1`)}return o===void 0?1/0:o}function vd(n){return n===1?"1 item":`${n} items`}function DXe(n){let t=new Set;for(let o of n)(typeof o=="string"||typeof o=="number")&&t.add(String(o));return t}function OXe(n){if(uQ.call(n,"strict")){let t=n.strict;if(typeof t!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(t)return o=>{let a=`Object can not safely be stringified. Received type ${typeof o}`;throw typeof o!="function"&&(a+=` (${o.toString()})`),new Error(a)}}}function UK(n){n={...n};let t=OXe(n);t&&(n.bigint===void 0&&(n.bigint=!1),"circularValue"in n||(n.circularValue=Error));let o=mXe(n),a=wXe(n,"bigint"),e=SXe(n),i=typeof e=="function"?e:void 0,A=FIe(n,"maximumDepth"),r=FIe(n,"maximumBreadth");function s(B,f,Q,y,m,_){let T=f[B];switch(typeof T=="object"&&T!==null&&typeof T.toJSON=="function"&&(T=T.toJSON(B)),T=y.call(f,B,T),typeof T){case"string":return YI(T);case"object":{if(T===null)return"null";if(Q.indexOf(T)!==-1)return o;let R="",L=",",U=_;if(Array.isArray(T)){if(T.length===0)return"[]";if(Ar){let k=T.length-r-1;R+=`${L}"... ${vd(k)} not stringified"`}return m!==""&&(R+=` -${U}`),Q.pop(),`[${R}]`}let F=Object.keys(T),z=F.length;if(z===0)return"{}";if(Ar){let V=z-r;R+=`${K}"...":${J}"${vd(V)} not stringified"`,K=L}return m!==""&&K.length>1&&(R=` +${_}`);let q=Math.min(T.length,r),K=0;for(;Kr){let k=T.length-r-1;R+=`${L}"... ${vd(k)} not stringified"`}return m!==""&&(R+=` +${U}`),Q.pop(),`[${R}]`}let F=Object.keys(T),J=F.length;if(J===0)return"{}";if(Ar){let q=J-r;R+=`${H}"...":${V}"${vd(q)} not stringified"`,H=L}return m!==""&&H.length>1&&(R=` ${_}${R} -${U}`),Q.pop(),`{${R}}`}case"number":return isFinite(T)?String(T):t?t(T):"null";case"boolean":return T===!0?"true":"false";case"undefined":return;case"bigint":if(a)return String(T);default:return t?t(T):void 0}}function g(B,f,Q,y,m,_){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(B)),typeof f){case"string":return xI(f);case"object":{if(f===null)return"null";if(Q.indexOf(f)!==-1)return o;let T=_,R="",L=",";if(Array.isArray(f)){if(f.length===0)return"[]";if(Ar){let G=f.length-r-1;R+=`${L}"... ${vd(G)} not stringified"`}return m!==""&&(R+=` +${_}`);let J=Math.min(f.length,r),V=0;for(;Vr){let G=f.length-r-1;R+=`${L}"... ${vd(G)} not stringified"`}return m!==""&&(R+=` ${T}`),Q.pop(),`[${R}]`}Q.push(f);let U="";m!==""&&(_+=m,L=`, -${_}`,U=" ");let F="";for(let z of y){let J=g(z,f[z],Q,y,m,_);J!==void 0&&(R+=`${F}${xI(z)}:${U}${J}`,F=L)}return m!==""&&F.length>1&&(R=` +${_}`,U=" ");let F="";for(let J of y){let V=g(J,f[J],Q,y,m,_);V!==void 0&&(R+=`${F}${YI(J)}:${U}${V}`,F=L)}return m!==""&&F.length>1&&(R=` ${_}${R} -${T}`),Q.pop(),`{${R}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(a)return String(f);default:return t?t(f):void 0}}function c(B,f,Q,y,m){switch(typeof f){case"string":return xI(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(B),typeof f!="object")return c(B,f,Q,y,m);if(f===null)return"null"}if(Q.indexOf(f)!==-1)return o;let _=m;if(Array.isArray(f)){if(f.length===0)return"[]";if(Ar){let N=f.length-r-1;J+=`${K}"... ${vd(N)} not stringified"`}return J+=` -${_}`,Q.pop(),`[${J}]`}let T=Object.keys(f),R=T.length;if(R===0)return"{}";if(Ar){let J=R-r;U+=`${F}"...": "${vd(J)} not stringified"`,F=L}return F!==""&&(U=` +${T}`),Q.pop(),`{${R}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(a)return String(f);default:return t?t(f):void 0}}function c(B,f,Q,y,m){switch(typeof f){case"string":return YI(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(B),typeof f!="object")return c(B,f,Q,y,m);if(f===null)return"null"}if(Q.indexOf(f)!==-1)return o;let _=m;if(Array.isArray(f)){if(f.length===0)return"[]";if(Ar){let N=f.length-r-1;V+=`${H}"... ${vd(N)} not stringified"`}return V+=` +${_}`,Q.pop(),`[${V}]`}let T=Object.keys(f),R=T.length;if(R===0)return"{}";if(Ar){let V=R-r;U+=`${F}"...": "${vd(V)} not stringified"`,F=L}return F!==""&&(U=` ${m}${U} -${_}`),Q.pop(),`{${U}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(a)return String(f);default:return t?t(f):void 0}}function I(B,f,Q){switch(typeof f){case"string":return xI(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(B),typeof f!="object")return I(B,f,Q);if(f===null)return"null"}if(Q.indexOf(f)!==-1)return o;let y="",m=f.length!==void 0;if(m&&Array.isArray(f)){if(f.length===0)return"[]";if(Ar){let J=f.length-r-1;y+=`,"... ${vd(J)} not stringified"`}return Q.pop(),`[${y}]`}let _=Object.keys(f),T=_.length;if(T===0)return"{}";if(Ar){let U=T-r;y+=`${R}"...":"${vd(U)} not stringified"`}return Q.pop(),`{${y}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(a)return String(f);default:return t?t(f):void 0}}function d(B,f,Q){if(arguments.length>1){let y="";if(typeof Q=="number"?y=" ".repeat(Math.min(Q,10)):typeof Q=="string"&&(y=Q.slice(0,10)),f!=null){if(typeof f=="function")return s("",{"":B},[],f,y,"");if(Array.isArray(f))return g("",B,[],QXe(f),y,"")}if(y.length!==0)return c("",B,[],y,"")}return I("",B,[])}return d}});var HIe=ee((PLA,UIe)=>{"use strict";var KK=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:LIe}=YM(),mXe=LIe.info;function SXe(n,t){n=n||[],t=t||{dedupe:!1};let o=Object.create(LIe);o.silent=1/0,t.levels&&typeof t.levels=="object"&&Object.keys(t.levels).forEach(I=>{o[I]=t.levels[I]});let a={write:e,add:r,remove:s,emit:i,flushSync:A,end:g,minLevel:0,lastId:0,streams:[],clone:c,[KK]:!0,streamLevels:o};return Array.isArray(n)?n.forEach(r,a):r.call(a,n),n=null,a;function e(I){let d,B=this.lastLevel,{streams:f}=this,Q=0,y;for(let m=wXe(f.length,t.dedupe);OXe(m,f.length,t.dedupe);m=DXe(m,t.dedupe))if(d=f[m],d.level<=B){if(Q!==0&&Q!==d.level)break;if(y=d.stream,y[KK]){let{lastTime:_,lastMsg:T,lastObj:R,lastLogger:L}=this;y.lastLevel=B,y.lastTime=_,y.lastMsg=T,y.lastObj=R,y.lastLogger=L}y.write(I),t.dedupe&&(Q=d.level)}else if(!t.dedupe)break}function i(...I){for(let{stream:d}of this.streams)typeof d.emit=="function"&&d.emit(...I)}function A(){for(let{stream:I}of this.streams)typeof I.flushSync=="function"&&I.flushSync()}function r(I){if(!I)return a;let d=typeof I.write=="function"||I.stream,B=I.write?I:I.stream;if(!d)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:f,streamLevels:Q}=this,y;typeof I.levelVal=="number"?y=I.levelVal:typeof I.level=="string"?y=Q[I.level]:typeof I.level=="number"?y=I.level:y=mXe;let m={stream:B,level:y,levelVal:void 0,id:++a.lastId};return f.unshift(m),f.sort(FIe),this.minLevel=f[0].level,a}function s(I){let{streams:d}=this,B=d.findIndex(f=>f.id===I);return B>=0&&(d.splice(B,1),d.sort(FIe),this.minLevel=d.length>0?d[0].level:-1),a}function g(){for(let{stream:I}of this.streams)typeof I.flushSync=="function"&&I.flushSync(),I.end()}function c(I){let d=new Array(this.streams.length);for(let B=0;B=0:n{"use strict";var bXe=$e("node:os"),VIe=gK(),MXe=cK(),_Xe=dK(),WIe=kce(),TXe=RIe(),ZIe=jE(),{configure:NXe}=GIe(),{assertDefaultLevelFound:RXe,mappings:XIe,genLsCache:kXe,genLevelComparison:vXe,assertLevelComparison:PXe}=RK(),{DEFAULT_LEVELS:$Ie,SORTING_ORDER:GXe}=YM(),{createArgsNormalizer:FXe,asChindings:LXe,buildSafeSonicBoom:KIe,buildFormatters:UXe,stringify:xK,normalizeDestFileDescriptor:xIe,noop:HXe}=xM(),{version:KXe}=kK(),{chindingsSym:YIe,redactFmtSym:xXe,serializersSym:jIe,timeSym:YXe,timeSliceIndexSym:jXe,streamSym:JXe,stringifySym:JIe,stringifySafeSym:YK,stringifiersSym:qIe,setLevelSym:qXe,endSym:zXe,formatOptsSym:VXe,messageKeySym:WXe,errorKeySym:ZXe,nestedKeySym:XXe,mixinSym:$Xe,levelCompSym:e7e,useOnlyCustomLevelsSym:A7e,formattersSym:zIe,hooksSym:t7e,nestedKeyStrSym:r7e,mixinMergeStrategySym:i7e,msgPrefixSym:a7e}=ZIe,{epochTime:ele,nullTime:o7e}=WIe,{pid:n7e}=process,s7e=bXe.hostname(),g7e=VIe.err,c7e={level:"info",levelComparison:GXe.ASC,levels:$Ie,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:n7e,hostname:s7e},serializers:Object.assign(Object.create(null),{err:g7e}),formatters:Object.assign(Object.create(null),{bindings(n){return n},level(n,t){return{level:t}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:ele,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},I7e=FXe(c7e),l7e=Object.assign(Object.create(null),VIe);function jK(...n){let t={},{opts:o,stream:a}=I7e(t,MXe(),...n);o.level&&typeof o.level=="string"&&$Ie[o.level.toLowerCase()]!==void 0&&(o.level=o.level.toLowerCase());let{redact:e,crlf:i,serializers:A,timestamp:r,messageKey:s,errorKey:g,nestedKey:c,base:I,name:d,level:B,customLevels:f,levelComparison:Q,mixin:y,mixinMergeStrategy:m,useOnlyCustomLevels:_,formatters:T,hooks:R,depthLimit:L,edgeLimit:U,onChild:F,msgPrefix:z}=o,J=NXe({maximumDepth:L,maximumBreadth:U}),K=UXe(T.level,T.bindings,T.log),G=xK.bind({[YK]:J}),V=e?_Xe(e,G):{},H=e?{stringify:V[xXe]}:{stringify:G},N="}"+(i?`\r +${_}`),Q.pop(),`{${U}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(a)return String(f);default:return t?t(f):void 0}}function I(B,f,Q){switch(typeof f){case"string":return YI(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(B),typeof f!="object")return I(B,f,Q);if(f===null)return"null"}if(Q.indexOf(f)!==-1)return o;let y="",m=f.length!==void 0;if(m&&Array.isArray(f)){if(f.length===0)return"[]";if(Ar){let V=f.length-r-1;y+=`,"... ${vd(V)} not stringified"`}return Q.pop(),`[${y}]`}let _=Object.keys(f),T=_.length;if(T===0)return"{}";if(Ar){let U=T-r;y+=`${R}"...":"${vd(U)} not stringified"`}return Q.pop(),`{${y}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(a)return String(f);default:return t?t(f):void 0}}function d(B,f,Q){if(arguments.length>1){let y="";if(typeof Q=="number"?y=" ".repeat(Math.min(Q,10)):typeof Q=="string"&&(y=Q.slice(0,10)),f!=null){if(typeof f=="function")return s("",{"":B},[],f,y,"");if(Array.isArray(f))return g("",B,[],DXe(f),y,"")}if(y.length!==0)return c("",B,[],y,"")}return I("",B,[])}return d}});var YIe=ee((YLA,xIe)=>{"use strict";var KK=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:KIe}=jM(),bXe=KIe.info;function MXe(n,t){n=n||[],t=t||{dedupe:!1};let o=Object.create(KIe);o.silent=1/0,t.levels&&typeof t.levels=="object"&&Object.keys(t.levels).forEach(I=>{o[I]=t.levels[I]});let a={write:e,add:r,remove:s,emit:i,flushSync:A,end:g,minLevel:0,lastId:0,streams:[],clone:c,[KK]:!0,streamLevels:o};return Array.isArray(n)?n.forEach(r,a):r.call(a,n),n=null,a;function e(I){let d,B=this.lastLevel,{streams:f}=this,Q=0,y;for(let m=_Xe(f.length,t.dedupe);NXe(m,f.length,t.dedupe);m=TXe(m,t.dedupe))if(d=f[m],d.level<=B){if(Q!==0&&Q!==d.level)break;if(y=d.stream,y[KK]){let{lastTime:_,lastMsg:T,lastObj:R,lastLogger:L}=this;y.lastLevel=B,y.lastTime=_,y.lastMsg=T,y.lastObj=R,y.lastLogger=L}y.write(I),t.dedupe&&(Q=d.level)}else if(!t.dedupe)break}function i(...I){for(let{stream:d}of this.streams)typeof d.emit=="function"&&d.emit(...I)}function A(){for(let{stream:I}of this.streams)typeof I.flushSync=="function"&&I.flushSync()}function r(I){if(!I)return a;let d=typeof I.write=="function"||I.stream,B=I.write?I:I.stream;if(!d)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:f,streamLevels:Q}=this,y;typeof I.levelVal=="number"?y=I.levelVal:typeof I.level=="string"?y=Q[I.level]:typeof I.level=="number"?y=I.level:y=bXe;let m={stream:B,level:y,levelVal:void 0,id:++a.lastId};return f.unshift(m),f.sort(HIe),this.minLevel=f[0].level,a}function s(I){let{streams:d}=this,B=d.findIndex(f=>f.id===I);return B>=0&&(d.splice(B,1),d.sort(HIe),this.minLevel=d.length>0?d[0].level:-1),a}function g(){for(let{stream:I}of this.streams)typeof I.flushSync=="function"&&I.flushSync(),I.end()}function c(I){let d=new Array(this.streams.length);for(let B=0;B=0:n{"use strict";var RXe=$e("node:os"),XIe=gK(),kXe=cK(),vXe=dK(),$Ie=Gce(),PXe=PIe(),ele=jE(),{configure:GXe}=UIe(),{assertDefaultLevelFound:FXe,mappings:Ale,genLsCache:LXe,genLevelComparison:UXe,assertLevelComparison:HXe}=RK(),{DEFAULT_LEVELS:tle,SORTING_ORDER:KXe}=jM(),{createArgsNormalizer:xXe,asChindings:YXe,buildSafeSonicBoom:jIe,buildFormatters:jXe,stringify:xK,normalizeDestFileDescriptor:JIe,noop:JXe}=YM(),{version:qXe}=kK(),{chindingsSym:qIe,redactFmtSym:zXe,serializersSym:zIe,timeSym:VXe,timeSliceIndexSym:WXe,streamSym:ZXe,stringifySym:VIe,stringifySafeSym:YK,stringifiersSym:WIe,setLevelSym:XXe,endSym:$Xe,formatOptsSym:e7e,messageKeySym:A7e,errorKeySym:t7e,nestedKeySym:r7e,mixinSym:i7e,levelCompSym:a7e,useOnlyCustomLevelsSym:o7e,formattersSym:ZIe,hooksSym:n7e,nestedKeyStrSym:s7e,mixinMergeStrategySym:g7e,msgPrefixSym:c7e}=ele,{epochTime:rle,nullTime:I7e}=$Ie,{pid:l7e}=process,d7e=RXe.hostname(),p7e=XIe.err,h7e={level:"info",levelComparison:KXe.ASC,levels:tle,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:l7e,hostname:d7e},serializers:Object.assign(Object.create(null),{err:p7e}),formatters:Object.assign(Object.create(null),{bindings(n){return n},level(n,t){return{level:t}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:rle,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},E7e=xXe(h7e),u7e=Object.assign(Object.create(null),XIe);function jK(...n){let t={},{opts:o,stream:a}=E7e(t,kXe(),...n);o.level&&typeof o.level=="string"&&tle[o.level.toLowerCase()]!==void 0&&(o.level=o.level.toLowerCase());let{redact:e,crlf:i,serializers:A,timestamp:r,messageKey:s,errorKey:g,nestedKey:c,base:I,name:d,level:B,customLevels:f,levelComparison:Q,mixin:y,mixinMergeStrategy:m,useOnlyCustomLevels:_,formatters:T,hooks:R,depthLimit:L,edgeLimit:U,onChild:F,msgPrefix:J}=o,V=GXe({maximumDepth:L,maximumBreadth:U}),H=jXe(T.level,T.bindings,T.log),G=xK.bind({[YK]:V}),q=e?vXe(e,G):{},K=e?{stringify:q[zXe]}:{stringify:G},N="}"+(i?`\r `:` -`),k=LXe.bind(null,{[YIe]:"",[jIe]:A,[qIe]:V,[JIe]:xK,[YK]:J,[zIe]:K}),q="";I!==null&&(d===void 0?q=k(I):q=k(Object.assign({},I,{name:d})));let X=r instanceof Function?r:r?ele:o7e,ie=X().indexOf(":")+1;if(_&&!f)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(y&&typeof y!="function")throw Error(`Unknown mixin type "${typeof y}" - expected "function"`);if(z&&typeof z!="string")throw Error(`Unknown msgPrefix type "${typeof z}" - expected "string"`);RXe(B,f,_);let De=XIe(f,_);typeof a.emit=="function"&&a.emit("message",{code:"PINO_CONFIG",config:{levels:De,messageKey:s,errorKey:g}}),PXe(Q);let oe=vXe(Q);return Object.assign(t,{levels:De,[e7e]:oe,[A7e]:_,[JXe]:a,[YXe]:X,[jXe]:ie,[JIe]:xK,[YK]:J,[qIe]:V,[zXe]:N,[VXe]:H,[WXe]:s,[ZXe]:g,[XXe]:c,[r7e]:c?`,${JSON.stringify(c)}:{`:"",[jIe]:A,[$Xe]:y,[i7e]:m,[YIe]:q,[zIe]:K,[t7e]:R,silent:HXe,onChild:F,[a7e]:z}),Object.setPrototypeOf(t,TXe()),kXe(t),t[qXe](B),t}Cn.exports=jK;Cn.exports.destination=(n=process.stdout.fd)=>typeof n=="object"?(n.dest=xIe(n.dest||process.stdout.fd),KIe(n)):KIe({dest:xIe(n),minLength:0});Cn.exports.transport=OK();Cn.exports.multistream=HIe();Cn.exports.levels=XIe();Cn.exports.stdSerializers=l7e;Cn.exports.stdTimeFunctions=Object.assign({},WIe);Cn.exports.symbols=ZIe;Cn.exports.version=KXe;Cn.exports.default=jK;Cn.exports.pino=jK});import{unlink as xfe}from"node:fs/promises";import{homedir as Yfe}from"node:os";import{join as yu,resolve as il}from"node:path";import{createHash as npe,randomUUID as IY}from"node:crypto";import{mkdir as spe,readFile as gpe,rename as cpe,unlink as cY,writeFile as Ipe}from"node:fs/promises";import{dirname as lpe}from"node:path";var zx={"\u8FD9\u4E2A\u95EE\u9898\u5DF2\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u7B54\u3002":"This question has already been answered from another client; no further reply is needed.","\u4EFB\u52A1\u5DF2\u5B8C\u6210\u3002":"Task completed.",\u7ED3\u679C\u6587\u4EF6:"result file","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u7684\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\uFF0C\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u8BD5\u3002":'The delivery result of the result file "{name}" could not be confirmed. Please check whether it already arrived in the chat before retrying.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 Slack \u5E94\u7528\u7F3A\u5C11 files:write \u6743\u9650\u3002\u8BF7\u66F4\u65B0 Manifest\u3001\u91CD\u65B0\u5B89\u88C5\u5E94\u7528\u5E76\u91CD\u65B0\u8FDE\u63A5\u673A\u5668\u4EBA\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated, but the Slack app is missing the files:write permission. Please update the Manifest, reinstall the app, reconnect the bot, and try again.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u673A\u5668\u4EBA\u7F3A\u5C11 Discord \u7684 Send Messages\u3001Attach Files \u6216 Read Message History \u6743\u9650\u3002":'The result file "{name}" was generated, but the bot is missing the Discord Send Messages, Attach Files, or Read Message History permission.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 Telegram \u4E0D\u5141\u8BB8\u673A\u5668\u4EBA\u5728\u5F53\u524D\u804A\u5929\u53D1\u9001\u6587\u6863\uFF0C\u8BF7\u68C0\u67E5\u804A\u5929\u6743\u9650\u3002":'The result file "{name}" was generated, but Telegram does not allow the bot to send documents in this chat. Please check the chat permissions.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u6587\u4EF6\u53D1\u9001\u6743\u9650\uFF0C\u8BF7\u68C0\u67E5\u6E20\u9053\u6743\u9650\u3002":'The result file "{name}" was generated, but the bot does not have permission to send files. Please check the channel permissions.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u6E20\u9053\u5927\u5C0F\u4E0A\u9650\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the size limit of this channel and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" is empty and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u6216\u51C6\u5907\u53D1\u9001\uFF0C\u8BF7\u786E\u8BA4\u6587\u4EF6\u4ECD\u53EF\u8BBF\u95EE\u540E\u91CD\u8BD5\u3002":'The result file "{name}" cannot be read or prepared for sending right now. Please make sure the file is still accessible and try again.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u5F53\u524D\u6E20\u9053\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was temporarily rate-limited by this channel and could not be sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6216\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but this channel rejected the file or file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6682\u65F6\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated, but this channel could not send it right now. Please try again later.',"\u6D88\u606F\u5904\u7406\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Failed to process the message. Please try again later.","\u5361\u7247\u5DF2\u7ED3\u675F\uFF0C\u8BF7\u67E5\u770B\u540E\u7EED\u6D88\u606F\u3002":"This card has ended. Please check the next message.","\u5DE5\u5177\u8C03\u7528\u300C{name}\u300D\u672A\u6210\u529F\uFF0C\u8BF7\u68C0\u67E5\u5DE5\u5177\u914D\u7F6E\u6216\u7A0D\u540E\u91CD\u8BD5\u3002":'Tool call "{name}" did not succeed. Check the tool configuration or try again later.',"\u65E0\u6CD5\u8FDE\u63A5\u5904\u7406\u670D\u52A1\uFF0C\u6D88\u606F\u5C1A\u672A\u63D0\u4EA4\u3002\u8BF7\u786E\u8BA4 DeepSeek Harness \u6B63\u5728\u8FD0\u884C\u540E\u91CD\u8BD5\u3002":"Could not connect to the processing service, so the message was not submitted. Make sure DeepSeek Harness is running, then try again.","\u5904\u7406\u670D\u52A1\u54CD\u5E94\u8D85\u65F6\uFF0C\u6D88\u606F\u5C1A\u672A\u5F00\u59CB\u5904\u7406\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The processing service timed out before the message started. Please try again later.","\u6682\u65F6\u65E0\u6CD5\u786E\u8BA4\u4EFB\u52A1\u72B6\u6001\uFF0C\u4EFB\u52A1\u53EF\u80FD\u5DF2\u7ECF\u5F00\u59CB\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002":"The task status could not be confirmed and the task may have started. Wait or send /stop before submitting it again.","\u6D88\u606F\u63D0\u4EA4\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\uFF0C\u4EFB\u52A1\u53EF\u80FD\u5DF2\u7ECF\u5F00\u59CB\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /status \u67E5\u770B\u72B6\u6001\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002":"The message submission could not be confirmed and the task may have started. Wait or send /status before submitting it again.","\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u4EFB\u52A1\u8FDB\u5EA6\uFF0C\u4EFB\u52A1\u53EF\u80FD\u4ECD\u5728\u8FD0\u884C\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002":"Task progress is temporarily unavailable and the task may still be running. Wait or send /stop before submitting it again.","\u5904\u7406\u670D\u52A1\u62D2\u7EDD\u4E86\u673A\u5668\u4EBA\u8FDE\u63A5\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5 Harness \u5730\u5740\u3001\u4EE3\u7406\u6216\u8BBF\u95EE\u914D\u7F6E\u540E\u91CD\u8BD5\u3002":"The processing service rejected the bot connection. Ask an administrator to check the Harness address, proxy, or access settings.","\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u7684\u63A5\u53E3\u4E0D\u517C\u5BB9\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5 Harness \u5730\u5740\u5E76\u66F4\u65B0\u76F8\u5173\u7248\u672C\u3002":"The bot and DeepSeek Harness use incompatible APIs. Ask an administrator to check the Harness address and update the related components.","DeepSeek Harness \u6682\u65F6\u65E0\u6CD5\u5B8C\u6210\u8BF7\u6C42\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"DeepSeek Harness could not complete the request. Please try again later.","\u7B49\u5F85\u6A21\u578B\u56DE\u590D\u8D85\u65F6\uFF0C\u4EFB\u52A1\u53EF\u80FD\u4ECD\u5728\u8FD0\u884C\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002":"Waiting for the model reply timed out and the task may still be running. Wait or send /stop before submitting it again.","\u6A21\u578B\u51ED\u636E\u7F3A\u5931\u6216\u5DF2\u5931\u6548\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5\u6A21\u578B\u914D\u7F6E\u540E\u91CD\u8BD5\u3002":"The model credentials are missing or invalid. Ask an administrator to check the model settings.","\u6A21\u578B\u989D\u5EA6\u6216\u4F59\u989D\u4E0D\u8DB3\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7BA1\u7406\u5458\u8865\u5145\u989D\u5EA6\u6216\u5207\u6362\u6A21\u578B\u540E\u91CD\u8BD5\u3002":"The model quota or balance is insufficient. Ask an administrator to add quota or switch models, then try again.","\u6A21\u578B\u670D\u52A1\u6B63\u5728\u9650\u6D41\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The model service is rate-limiting requests. Please try again later.","\u5F53\u524D\u4F1A\u8BDD\u5185\u5BB9\u8D85\u8FC7\u6A21\u578B\u4E0A\u4E0B\u6587\u4E0A\u9650\u3002\u8BF7\u53D1\u9001 /compact \u6216 /new \u540E\u91CD\u8BD5\u3002":"This conversation exceeds the model context limit. Send /compact or /new, then try again.","\u5F53\u524D\u6A21\u578B\u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u53D1\u9001 /models \u67E5\u770B\u5E76\u4F7F\u7528 /model \u5207\u6362\u6A21\u578B\u3002":"The current model does not exist or is unavailable. Send /models and use /model to switch models.","\u5F53\u524D\u6A21\u578B\u4E0D\u5B58\u5728\u6216\u4E0D\u652F\u6301\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u53D1\u9001 /models\uFF0C\u5E76\u4F7F\u7528 /model \u91CD\u65B0\u9009\u62E9\u3002":"The current model does not exist or does not support the selected settings. Send /models and use /model to choose again.","\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u8FD9\u7C7B\u5185\u5BB9\u6216\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u8C03\u6574\u5185\u5BB9\u3001\u6A21\u578B\u6216\u63A8\u7406\u7B49\u7EA7\u540E\u91CD\u8BD5\u3002":"The current model does not support this content or the selected settings. Adjust the content, model, or reasoning effort and try again.","\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u5207\u6362\u6A21\u578B\u6216\u63A8\u7406\u7B49\u7EA7\u540E\u91CD\u8BD5\u3002":"The current model does not support the selected settings. Switch the model or reasoning effort, then try again.","\u6A21\u578B\u670D\u52A1\u54CD\u5E94\u8D85\u65F6\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The model service timed out and the task did not finish. Please try again later.","\u6682\u65F6\u65E0\u6CD5\u8FDE\u63A5\u6A21\u578B\u670D\u52A1\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The model service is temporarily unreachable and the task did not finish. Please try again later.","\u6A21\u578B\u670D\u52A1\u6682\u65F6\u5F02\u5E38\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The model service is temporarily unavailable and the task did not finish. Please try again later.","\u6A21\u578B\u56DE\u590D\u4E2D\u65AD\u6216\u683C\u5F0F\u5F02\u5E38\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u3002":"The model reply was interrupted or malformed, so the task did not finish. Please try again.","\u6A21\u578B\u6CA1\u6709\u8FD4\u56DE\u53EF\u663E\u793A\u7684\u5185\u5BB9\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5207\u6362\u6A21\u578B\u3002":"The model returned no displayable content. Try again, or switch models if this keeps happening.","\u6A21\u578B\u62D2\u7EDD\u5904\u7406\u5F53\u524D\u5185\u5BB9\u3002\u8BF7\u8C03\u6574\u95EE\u9898\u5185\u5BB9\u540E\u91CD\u8BD5\u3002":"The model rejected the current content. Revise the request and try again.","\u6A21\u578B\u8FBE\u5230\u8F93\u51FA\u957F\u5EA6\u4E0A\u9650\uFF0C\u4F46\u6CA1\u6709\u751F\u6210\u53EF\u663E\u793A\u7684\u7ED3\u679C\u3002\u8BF7\u7F29\u5C0F\u4EFB\u52A1\u8303\u56F4\u540E\u91CD\u8BD5\u3002":"The model reached its output limit without producing a displayable result. Reduce the task scope and try again.","\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u65E0\u6CD5\u5728\u5F53\u524D\u6E20\u9053\u5B8C\u6210\u7684\u64CD\u4F5C\u3002\u8BF7\u5728 DeepSeek Harness \u4E2D\u5904\u7406\u540E\u518D\u8BD5\u3002":"The task is waiting for an action that cannot be completed in this channel. Handle it in DeepSeek Harness, then try again.","\u4EFB\u52A1\u88AB\u610F\u5916\u4E2D\u65AD\uFF0C\u672C\u6B21\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u3002":"The task was unexpectedly interrupted and did not finish. Please try again.","\u5F53\u524D\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\u3002\u8BF7\u53D1\u9001 /new \u521B\u5EFA\u65B0\u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002":"The current Session no longer exists. Send /new to create one, then try again.","\u5F53\u524D\u4F1A\u8BDD\u4ECD\u5728\u5904\u7406\u4E0A\u4E00\u9879\u4EFB\u52A1\u3002\u8BF7\u7B49\u5F85\u5B8C\u6210\uFF0C\u6216\u53D1\u9001 /stop \u540E\u91CD\u8BD5\u3002":"The current Session is still processing the previous task. Wait for it to finish, or send /stop before trying again.","\u5DE5\u4F5C\u533A\u6216\u4F1A\u8BDD\u72B6\u6001\u521A\u521A\u53D1\u751F\u53D8\u5316\u3002\u8BF7\u91CD\u65B0\u53D1\u9001\u8FD9\u6761\u6D88\u606F\u3002":"The Workspace or Session state just changed. Please send this message again.","\u5F53\u524D\u5DE5\u4F5C\u533A\u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u91CD\u65B0\u9009\u62E9\u5DE5\u4F5C\u533A\u540E\u91CD\u8BD5\u3002":"The current Workspace does not exist or is unavailable. Select another Workspace and try again.","\u5F53\u524D Agent Preset \u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u53D1\u9001 /presetlist \u540E\u91CD\u65B0\u9009\u62E9\u3002":"The current Agent Preset does not exist or is unavailable. Send /presetlist and select another one.","\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u673A\u5668\u4EBA\u6CA1\u6709\u53D1\u9001\u6743\u9650\u3002\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u68C0\u67E5\u6E20\u9053\u6743\u9650\u6216\u91CD\u65B0\u7ED1\u5B9A\u673A\u5668\u4EBA\u3002":"The reply was generated, but the bot cannot send it. Ask an administrator to check channel permissions or reconnect the bot.","\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6B63\u5728\u9650\u6D41\uFF0C\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The reply was generated, but this channel is rate-limiting messages. Please try again later.","\u56DE\u590D\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\u3002\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u7ECF\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002":"Reply delivery could not be confirmed. Check whether it already arrived before submitting the task again.","\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The reply was generated, but this channel could not send it. Please try again later.","\u5F53\u524D\u6D88\u606F\u5305\u542B\u65E0\u6CD5\u5904\u7406\u7684\u56FE\u7247\u6216\u6587\u4EF6\u3002\u8BF7\u8C03\u6574\u540E\u91CD\u65B0\u53D1\u9001\u3002":"This message contains an image or file that cannot be processed. Adjust it and send it again.","\u4EFB\u52A1\u672A\u5B8C\u6210\uFF0C\u6682\u65F6\u65E0\u6CD5\u786E\u5B9A\u539F\u56E0\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5C06\u53C2\u8003\u53F7\u63D0\u4F9B\u7ED9\u7BA1\u7406\u5458\u3002":"The task did not finish and the cause could not be determined. Try again; if it persists, give the reference ID to an administrator.","\u9519\u8BEF\u7801\uFF1A{code}\uFF1B\u53C2\u8003\u53F7\uFF1A{referenceId}":"Error code: {code}; reference: {referenceId}","{label}\u673A\u5668\u4EBA":"{label} bot","\u76EE\u524D\u652F\u6301\u6587\u5B57\u548C\u56FE\u7247\u6D88\u606F\u3002":"Only text and image messages are supported at the moment.","\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u6587\u4EF6\u6D88\u606F\u3002":"Only text, image, and file messages are supported at the moment.","\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u3001\u6587\u4EF6\u548C\u8BED\u97F3\u8F6C\u5199\u6D88\u606F\u3002":"Only text, image, file, and voice-transcription messages are supported at the moment.","\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u3001\u6587\u4EF6\uFF0C\u4EE5\u53CA\u5FAE\u4FE1\u5DF2\u8F6C\u6210\u6587\u5B57\u7684\u8BED\u97F3\u6D88\u606F\u3002":"Only text, image, file, and voice messages already transcribed to text by WeChat are supported at the moment.","\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u6216\u56FE\u7247\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002":"Send text or an image directly to continue the current session.","\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u3001\u56FE\u7247\u6216\u6587\u4EF6\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002":"Send text, an image, or a file directly to continue the current session.","\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u3001\u56FE\u7247\u3001\u6587\u4EF6\u6216\u5E26\u6587\u5B57\u8BC6\u522B\u7ED3\u679C\u7684\u8BED\u97F3\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002":"Send text, an image, a file, or a voice message already transcribed to text to continue the current session.","{label}\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"The {label} bot is connected to DeepSeek Harness.","/new \u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD":"/new Start a brand-new session","/compact \u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587":"/compact Compact the earlier context of the current session","/workspace \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A":"/workspace Switch workspace","/workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84":"/workspacelist List absolute workspace paths","/ws\u3001/wsl\u3001/workspaces \u5DE5\u4F5C\u533A\u547D\u4EE4\u522B\u540D":"/ws, /wsl, /workspaces Workspace command aliases","/sessionlist [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898":"/sessionlist [workspace index or absolute path] List session IDs and titles","/sessionlist \u6216 /sessions [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898":"/sessionlist or /sessions [workspace index or absolute path] List session IDs and titles","/sessionlist --limit N \u4EC5\u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u524D N \u4E2A\u4F1A\u8BDD":"/sessionlist --limit N List only the first N sessions in the current workspace","/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7 \u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD":"/session Bind this chat to the specified session","/models \u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B":"/models List all available models by index","/reasoninglist \u6216 /reasonings \u6309\u5E8F\u53F7\u5217\u51FA\u5F53\u524D\u6A21\u578B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7":"/reasoninglist or /reasonings List reasoning efforts for the current model by index","/reasoning [\u5E8F\u53F7\u3001\u7B49\u7EA7ID\u6216 --default] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u63A8\u7406\u7B49\u7EA7":"/reasoning [index, effort ID, or --default] Show or switch the current reasoning effort","/model [\u5E8F\u53F7\u6216\u5B8C\u6574\u6A21\u578BID] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B":"/model [index or full model ID] Show or switch the model of the current session","/model [\u5E8F\u53F7\u6216\u5B8C\u6574\u6A21\u578BID] [\u63A8\u7406\u7B49\u7EA7ID] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B":"/model [index or full model ID] [reasoning effort ID] Show or switch the current Session model","\u793A\u4F8B\uFF1A\u5148\u53D1 /models\uFF0C\u518D\u53D1 /model 2":"Example: send /models first, then /model 2","\u793A\u4F8B\uFF1A\u5148\u53D1 /models\uFF0C\u518D\u53D1 /model 2 [\u63A8\u7406\u7B49\u7EA7ID]":"Example: send /models first, then /model 2 [reasoning effort ID]","/presetlist \u6309\u5E8F\u53F7\u5217\u51FA\u53EF\u7528 Agent Preset":"/presetlist List available Agent Presets by index","/presetlist \u6216 /presets \u6309\u5E8F\u53F7\u5217\u51FA\u53EF\u7528 Agent Preset":"/presetlist or /presets List available Agent Presets by index","/preset [\u5E8F\u53F7\u6216\u5B8C\u6574ID] \u67E5\u770B\u6216\u8BBE\u7F6E\u5F53\u524D\u673A\u5668\u4EBA Agent Preset":"/preset [index or full ID] Show or set the Agent Preset of this bot","\u7EAF\u6570\u5B57 ID\uFF1A/preset id:":"Numeric-only ID: /preset id:","/preset --default \u8DDF\u968F Host \u9ED8\u8BA4":"/preset --default Follow the Host default","/stop \u505C\u6B62\u5F53\u524D\u4EFB\u52A1":"/stop Stop the current task","/steer \u8865\u5145\u6307\u4EE4 \u7EA0\u504F\u5F53\u524D\u4EFB\u52A1":"/steer Steer the current task","/status \u68C0\u67E5\u8FDE\u63A5\u72B6\u6001":"/status Check the connection status","/version \u67E5\u770B\u63D2\u4EF6\u7248\u672C":"/version Show the plugin version","/help \u663E\u793A\u672C\u5E2E\u52A9":"/help Show this help","{label}\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The {label} bot is connected to DeepSeek Harness and working normally.","{label}\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u63A5\u5165\u3002":"{label} bot credentials are missing. Remove the bot and connect it again.","{label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The {label} connection is not ready yet. The plugin will retry automatically.","{label}\u673A\u5668\u4EBA\u5DF2\u63A5\u5165\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"The {label} bot is connected, but its message connection is not ready yet.","{label}\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The {label} connection is still not ready. Please try again later.","{label}\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5":"The {label} bot is not connected yet","{name}\uFF08{id}\uFF09":"{name} ({id})","{label}{connectionLabel}\u8FD0\u884C\u6B63\u5E38":"The {label}{connectionLabel} is running normally","{label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The {label} connection is not ready. The plugin will retry automatically","{label}\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF":"The {label} connection is currently offline","\u5DF2\u5F00\u542F\u65B0\u4F1A\u8BDD\u3002\u8BF7\u53D1\u9001\u4F60\u7684\u95EE\u9898\u3002":"A new session has started. Please send your question.","\u6B63\u5728\u4F7F\u7528{name}\u2026":"Using {name}\u2026","\u5DF2\u505C\u6B62\u3002":"Stopped.","\u8BF7\u7528\u6587\u5B57\u56DE\u7B54\u5F53\u524D\u95EE\u9898\u3002":"Please answer the current question with text.","{label}\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the {label} interaction question.","\u56DE\u7B54\u63D0\u4EA4\u5931\u8D25\u3002":"Failed to submit the answer.","\u56DE\u7B54\u63D0\u4EA4\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u5F53\u524D\u95EE\u9898\u7684\u7B54\u6848\u3002":"Failed to submit the answer. Please resend your answer to the current question.","\u68C0\u6D4B\u5230\u8FD9\u4E2A Session \u4E2D\u9057\u7559\u7684\u5F85\u56DE\u7B54\u95EE\u9898\uFF0C\u5DF2\u5B89\u5168\u53D6\u6D88\u5E76\u7EE7\u7EED\u5904\u7406\u4F60\u521A\u624D\u7684\u6D88\u606F\u3002":"A pending question left over in this Session was detected. It has been safely cancelled, and your latest message is being processed."};var Vx={"\u7528\u6CD5\uFF1A/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7\uFF08/session N\uFF09":"Usage: /session Session ID or the session index in the current Workspace (/session N)","\u7528\u6CD5\uFF1A\n/sessionlist \u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u4F1A\u8BDD\n/sessionlist --limit N \u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u524D N \u4E2A\u4F1A\u8BDD\uFF08N \u4E3A\u6B63\u6574\u6570\uFF09\n/sessionlist \u5DE5\u4F5C\u533A\u5E8F\u53F7 \u6309 /workspacelist \u5E8F\u53F7\u5217\u51FA\u4F1A\u8BDD\n/sessionlist \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84 \u5217\u51FA\u6307\u5B9A\u5DE5\u4F5C\u533A\u4F1A\u8BDD":`Usage: +`),k=YXe.bind(null,{[qIe]:"",[zIe]:A,[WIe]:q,[VIe]:xK,[YK]:V,[ZIe]:H}),z="";I!==null&&(d===void 0?z=k(I):z=k(Object.assign({},I,{name:d})));let X=r instanceof Function?r:r?rle:I7e,ie=X().indexOf(":")+1;if(_&&!f)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(y&&typeof y!="function")throw Error(`Unknown mixin type "${typeof y}" - expected "function"`);if(J&&typeof J!="string")throw Error(`Unknown msgPrefix type "${typeof J}" - expected "string"`);FXe(B,f,_);let De=Ale(f,_);typeof a.emit=="function"&&a.emit("message",{code:"PINO_CONFIG",config:{levels:De,messageKey:s,errorKey:g}}),HXe(Q);let oe=UXe(Q);return Object.assign(t,{levels:De,[a7e]:oe,[o7e]:_,[ZXe]:a,[VXe]:X,[WXe]:ie,[VIe]:xK,[YK]:V,[WIe]:q,[$Xe]:N,[e7e]:K,[A7e]:s,[t7e]:g,[r7e]:c,[s7e]:c?`,${JSON.stringify(c)}:{`:"",[zIe]:A,[i7e]:y,[g7e]:m,[qIe]:z,[ZIe]:H,[n7e]:R,silent:JXe,onChild:F,[c7e]:J}),Object.setPrototypeOf(t,PXe()),LXe(t),t[XXe](B),t}Cn.exports=jK;Cn.exports.destination=(n=process.stdout.fd)=>typeof n=="object"?(n.dest=JIe(n.dest||process.stdout.fd),jIe(n)):jIe({dest:JIe(n),minLength:0});Cn.exports.transport=OK();Cn.exports.multistream=YIe();Cn.exports.levels=Ale();Cn.exports.stdSerializers=u7e;Cn.exports.stdTimeFunctions=Object.assign({},$Ie);Cn.exports.symbols=ele;Cn.exports.version=qXe;Cn.exports.default=jK;Cn.exports.pino=jK});import{unlink as zfe}from"node:fs/promises";import{homedir as Vfe}from"node:os";import{join as yu,resolve as il}from"node:path";import{createHash as cpe,randomUUID as IY}from"node:crypto";import{mkdir as Ipe,readFile as lpe,rename as dpe,unlink as cY,writeFile as ppe}from"node:fs/promises";import{dirname as hpe}from"node:path";var zx={"\u8FD9\u4E2A\u95EE\u9898\u5DF2\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u7B54\u3002":"This question has already been answered from another client; no further reply is needed.","\u4EFB\u52A1\u5DF2\u5B8C\u6210\u3002":"Task completed.",\u7ED3\u679C\u6587\u4EF6:"result file","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u7684\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\uFF0C\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u8BD5\u3002":'The delivery result of the result file "{name}" could not be confirmed. Please check whether it already arrived in the chat before retrying.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 Slack \u5E94\u7528\u7F3A\u5C11 files:write \u6743\u9650\u3002\u8BF7\u66F4\u65B0 Manifest\u3001\u91CD\u65B0\u5B89\u88C5\u5E94\u7528\u5E76\u91CD\u65B0\u8FDE\u63A5\u673A\u5668\u4EBA\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated, but the Slack app is missing the files:write permission. Please update the Manifest, reinstall the app, reconnect the bot, and try again.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u673A\u5668\u4EBA\u7F3A\u5C11 Discord \u7684 Send Messages\u3001Attach Files \u6216 Read Message History \u6743\u9650\u3002":'The result file "{name}" was generated, but the bot is missing the Discord Send Messages, Attach Files, or Read Message History permission.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 Telegram \u4E0D\u5141\u8BB8\u673A\u5668\u4EBA\u5728\u5F53\u524D\u804A\u5929\u53D1\u9001\u6587\u6863\uFF0C\u8BF7\u68C0\u67E5\u804A\u5929\u6743\u9650\u3002":'The result file "{name}" was generated, but Telegram does not allow the bot to send documents in this chat. Please check the chat permissions.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u6587\u4EF6\u53D1\u9001\u6743\u9650\uFF0C\u8BF7\u68C0\u67E5\u6E20\u9053\u6743\u9650\u3002":'The result file "{name}" was generated, but the bot does not have permission to send files. Please check the channel permissions.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u6E20\u9053\u5927\u5C0F\u4E0A\u9650\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the size limit of this channel and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" is empty and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u6216\u51C6\u5907\u53D1\u9001\uFF0C\u8BF7\u786E\u8BA4\u6587\u4EF6\u4ECD\u53EF\u8BBF\u95EE\u540E\u91CD\u8BD5\u3002":'The result file "{name}" cannot be read or prepared for sending right now. Please make sure the file is still accessible and try again.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u5F53\u524D\u6E20\u9053\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was temporarily rate-limited by this channel and could not be sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6216\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but this channel rejected the file or file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6682\u65F6\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated, but this channel could not send it right now. Please try again later.',"\u6D88\u606F\u5904\u7406\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Failed to process the message. Please try again later.","\u5361\u7247\u5DF2\u7ED3\u675F\uFF0C\u8BF7\u67E5\u770B\u540E\u7EED\u6D88\u606F\u3002":"This card has ended. Please check the next message.","\u5DE5\u5177\u8C03\u7528\u300C{name}\u300D\u672A\u6210\u529F\uFF0C\u8BF7\u68C0\u67E5\u5DE5\u5177\u914D\u7F6E\u6216\u7A0D\u540E\u91CD\u8BD5\u3002":'Tool call "{name}" did not succeed. Check the tool configuration or try again later.',"\u65E0\u6CD5\u8FDE\u63A5\u5904\u7406\u670D\u52A1\uFF0C\u6D88\u606F\u5C1A\u672A\u63D0\u4EA4\u3002\u8BF7\u786E\u8BA4 DeepSeek Harness \u6B63\u5728\u8FD0\u884C\u540E\u91CD\u8BD5\u3002":"Could not connect to the processing service, so the message was not submitted. Make sure DeepSeek Harness is running, then try again.","\u5904\u7406\u670D\u52A1\u54CD\u5E94\u8D85\u65F6\uFF0C\u6D88\u606F\u5C1A\u672A\u5F00\u59CB\u5904\u7406\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The processing service timed out before the message started. Please try again later.","\u6682\u65F6\u65E0\u6CD5\u786E\u8BA4\u4EFB\u52A1\u72B6\u6001\uFF0C\u4EFB\u52A1\u53EF\u80FD\u5DF2\u7ECF\u5F00\u59CB\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002":"The task status could not be confirmed and the task may have started. Wait or send /stop before submitting it again.","\u6D88\u606F\u63D0\u4EA4\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\uFF0C\u4EFB\u52A1\u53EF\u80FD\u5DF2\u7ECF\u5F00\u59CB\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /status \u67E5\u770B\u72B6\u6001\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002":"The message submission could not be confirmed and the task may have started. Wait or send /status before submitting it again.","\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u4EFB\u52A1\u8FDB\u5EA6\uFF0C\u4EFB\u52A1\u53EF\u80FD\u4ECD\u5728\u8FD0\u884C\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002":"Task progress is temporarily unavailable and the task may still be running. Wait or send /stop before submitting it again.","\u5904\u7406\u670D\u52A1\u62D2\u7EDD\u4E86\u673A\u5668\u4EBA\u8FDE\u63A5\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5 Harness \u5730\u5740\u3001\u4EE3\u7406\u6216\u8BBF\u95EE\u914D\u7F6E\u540E\u91CD\u8BD5\u3002":"The processing service rejected the bot connection. Ask an administrator to check the Harness address, proxy, or access settings.","\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u7684\u63A5\u53E3\u4E0D\u517C\u5BB9\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5 Harness \u5730\u5740\u5E76\u66F4\u65B0\u76F8\u5173\u7248\u672C\u3002":"The bot and DeepSeek Harness use incompatible APIs. Ask an administrator to check the Harness address and update the related components.","DeepSeek Harness \u6682\u65F6\u65E0\u6CD5\u5B8C\u6210\u8BF7\u6C42\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"DeepSeek Harness could not complete the request. Please try again later.","\u7B49\u5F85\u6A21\u578B\u56DE\u590D\u8D85\u65F6\uFF0C\u4EFB\u52A1\u53EF\u80FD\u4ECD\u5728\u8FD0\u884C\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002":"Waiting for the model reply timed out and the task may still be running. Wait or send /stop before submitting it again.","\u6A21\u578B\u51ED\u636E\u7F3A\u5931\u6216\u5DF2\u5931\u6548\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5\u6A21\u578B\u914D\u7F6E\u540E\u91CD\u8BD5\u3002":"The model credentials are missing or invalid. Ask an administrator to check the model settings.","\u6A21\u578B\u989D\u5EA6\u6216\u4F59\u989D\u4E0D\u8DB3\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7BA1\u7406\u5458\u8865\u5145\u989D\u5EA6\u6216\u5207\u6362\u6A21\u578B\u540E\u91CD\u8BD5\u3002":"The model quota or balance is insufficient. Ask an administrator to add quota or switch models, then try again.","\u6A21\u578B\u670D\u52A1\u6B63\u5728\u9650\u6D41\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The model service is rate-limiting requests. Please try again later.","\u5F53\u524D\u4F1A\u8BDD\u5185\u5BB9\u8D85\u8FC7\u6A21\u578B\u4E0A\u4E0B\u6587\u4E0A\u9650\u3002\u8BF7\u53D1\u9001 /compact \u6216 /new \u540E\u91CD\u8BD5\u3002":"This conversation exceeds the model context limit. Send /compact or /new, then try again.","\u5F53\u524D\u6A21\u578B\u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u53D1\u9001 /models \u67E5\u770B\u5E76\u4F7F\u7528 /model \u5207\u6362\u6A21\u578B\u3002":"The current model does not exist or is unavailable. Send /models and use /model to switch models.","\u5F53\u524D\u6A21\u578B\u4E0D\u5B58\u5728\u6216\u4E0D\u652F\u6301\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u53D1\u9001 /models\uFF0C\u5E76\u4F7F\u7528 /model \u91CD\u65B0\u9009\u62E9\u3002":"The current model does not exist or does not support the selected settings. Send /models and use /model to choose again.","\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u8FD9\u7C7B\u5185\u5BB9\u6216\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u8C03\u6574\u5185\u5BB9\u3001\u6A21\u578B\u6216\u63A8\u7406\u7B49\u7EA7\u540E\u91CD\u8BD5\u3002":"The current model does not support this content or the selected settings. Adjust the content, model, or reasoning effort and try again.","\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u5207\u6362\u6A21\u578B\u6216\u63A8\u7406\u7B49\u7EA7\u540E\u91CD\u8BD5\u3002":"The current model does not support the selected settings. Switch the model or reasoning effort, then try again.","\u6A21\u578B\u670D\u52A1\u54CD\u5E94\u8D85\u65F6\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The model service timed out and the task did not finish. Please try again later.","\u6682\u65F6\u65E0\u6CD5\u8FDE\u63A5\u6A21\u578B\u670D\u52A1\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The model service is temporarily unreachable and the task did not finish. Please try again later.","\u6A21\u578B\u670D\u52A1\u6682\u65F6\u5F02\u5E38\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The model service is temporarily unavailable and the task did not finish. Please try again later.","\u6A21\u578B\u56DE\u590D\u4E2D\u65AD\u6216\u683C\u5F0F\u5F02\u5E38\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u3002":"The model reply was interrupted or malformed, so the task did not finish. Please try again.","\u6A21\u578B\u6CA1\u6709\u8FD4\u56DE\u53EF\u663E\u793A\u7684\u5185\u5BB9\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5207\u6362\u6A21\u578B\u3002":"The model returned no displayable content. Try again, or switch models if this keeps happening.","\u6A21\u578B\u62D2\u7EDD\u5904\u7406\u5F53\u524D\u5185\u5BB9\u3002\u8BF7\u8C03\u6574\u95EE\u9898\u5185\u5BB9\u540E\u91CD\u8BD5\u3002":"The model rejected the current content. Revise the request and try again.","\u6A21\u578B\u8FBE\u5230\u8F93\u51FA\u957F\u5EA6\u4E0A\u9650\uFF0C\u4F46\u6CA1\u6709\u751F\u6210\u53EF\u663E\u793A\u7684\u7ED3\u679C\u3002\u8BF7\u7F29\u5C0F\u4EFB\u52A1\u8303\u56F4\u540E\u91CD\u8BD5\u3002":"The model reached its output limit without producing a displayable result. Reduce the task scope and try again.","\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u65E0\u6CD5\u5728\u5F53\u524D\u6E20\u9053\u5B8C\u6210\u7684\u64CD\u4F5C\u3002\u8BF7\u5728 DeepSeek Harness \u4E2D\u5904\u7406\u540E\u518D\u8BD5\u3002":"The task is waiting for an action that cannot be completed in this channel. Handle it in DeepSeek Harness, then try again.","\u4EFB\u52A1\u88AB\u610F\u5916\u4E2D\u65AD\uFF0C\u672C\u6B21\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u3002":"The task was unexpectedly interrupted and did not finish. Please try again.","\u5F53\u524D\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\u3002\u8BF7\u53D1\u9001 /new \u521B\u5EFA\u65B0\u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002":"The current Session no longer exists. Send /new to create one, then try again.","\u5F53\u524D\u4F1A\u8BDD\u4ECD\u5728\u5904\u7406\u4E0A\u4E00\u9879\u4EFB\u52A1\u3002\u8BF7\u7B49\u5F85\u5B8C\u6210\uFF0C\u6216\u53D1\u9001 /stop \u540E\u91CD\u8BD5\u3002":"The current Session is still processing the previous task. Wait for it to finish, or send /stop before trying again.","\u5DE5\u4F5C\u533A\u6216\u4F1A\u8BDD\u72B6\u6001\u521A\u521A\u53D1\u751F\u53D8\u5316\u3002\u8BF7\u91CD\u65B0\u53D1\u9001\u8FD9\u6761\u6D88\u606F\u3002":"The Workspace or Session state just changed. Please send this message again.","\u5F53\u524D\u5DE5\u4F5C\u533A\u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u91CD\u65B0\u9009\u62E9\u5DE5\u4F5C\u533A\u540E\u91CD\u8BD5\u3002":"The current Workspace does not exist or is unavailable. Select another Workspace and try again.","\u5F53\u524D Agent Preset \u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u53D1\u9001 /presetlist \u540E\u91CD\u65B0\u9009\u62E9\u3002":"The current Agent Preset does not exist or is unavailable. Send /presetlist and select another one.","\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u673A\u5668\u4EBA\u6CA1\u6709\u53D1\u9001\u6743\u9650\u3002\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u68C0\u67E5\u6E20\u9053\u6743\u9650\u6216\u91CD\u65B0\u7ED1\u5B9A\u673A\u5668\u4EBA\u3002":"The reply was generated, but the bot cannot send it. Ask an administrator to check channel permissions or reconnect the bot.","\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6B63\u5728\u9650\u6D41\uFF0C\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The reply was generated, but this channel is rate-limiting messages. Please try again later.","\u56DE\u590D\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\u3002\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u7ECF\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002":"Reply delivery could not be confirmed. Check whether it already arrived before submitting the task again.","\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The reply was generated, but this channel could not send it. Please try again later.","\u5F53\u524D\u6D88\u606F\u5305\u542B\u65E0\u6CD5\u5904\u7406\u7684\u56FE\u7247\u6216\u6587\u4EF6\u3002\u8BF7\u8C03\u6574\u540E\u91CD\u65B0\u53D1\u9001\u3002":"This message contains an image or file that cannot be processed. Adjust it and send it again.","\u4EFB\u52A1\u672A\u5B8C\u6210\uFF0C\u6682\u65F6\u65E0\u6CD5\u786E\u5B9A\u539F\u56E0\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5C06\u53C2\u8003\u53F7\u63D0\u4F9B\u7ED9\u7BA1\u7406\u5458\u3002":"The task did not finish and the cause could not be determined. Try again; if it persists, give the reference ID to an administrator.","\u9519\u8BEF\u7801\uFF1A{code}\uFF1B\u53C2\u8003\u53F7\uFF1A{referenceId}":"Error code: {code}; reference: {referenceId}","{label}\u673A\u5668\u4EBA":"{label} bot","\u76EE\u524D\u652F\u6301\u6587\u5B57\u548C\u56FE\u7247\u6D88\u606F\u3002":"Only text and image messages are supported at the moment.","\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u6587\u4EF6\u6D88\u606F\u3002":"Only text, image, and file messages are supported at the moment.","\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u3001\u6587\u4EF6\u548C\u8BED\u97F3\u8F6C\u5199\u6D88\u606F\u3002":"Only text, image, file, and voice-transcription messages are supported at the moment.","\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u3001\u6587\u4EF6\uFF0C\u4EE5\u53CA\u5FAE\u4FE1\u5DF2\u8F6C\u6210\u6587\u5B57\u7684\u8BED\u97F3\u6D88\u606F\u3002":"Only text, image, file, and voice messages already transcribed to text by WeChat are supported at the moment.","\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u6216\u56FE\u7247\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002":"Send text or an image directly to continue the current session.","\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u3001\u56FE\u7247\u6216\u6587\u4EF6\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002":"Send text, an image, or a file directly to continue the current session.","\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u3001\u56FE\u7247\u3001\u6587\u4EF6\u6216\u5E26\u6587\u5B57\u8BC6\u522B\u7ED3\u679C\u7684\u8BED\u97F3\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002":"Send text, an image, a file, or a voice message already transcribed to text to continue the current session.","{label}\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"The {label} bot is connected to DeepSeek Harness.","/new \u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD":"/new Start a brand-new session","/compact \u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587":"/compact Compact the earlier context of the current session","/workspace \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A":"/workspace Switch workspace","/workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84":"/workspacelist List absolute workspace paths","/ws\u3001/wsl\u3001/workspaces \u5DE5\u4F5C\u533A\u547D\u4EE4\u522B\u540D":"/ws, /wsl, /workspaces Workspace command aliases","/sessionlist [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898":"/sessionlist [workspace index or absolute path] List session IDs and titles","/sessionlist \u6216 /sessions [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898":"/sessionlist or /sessions [workspace index or absolute path] List session IDs and titles","/sessionlist --limit N \u4EC5\u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u524D N \u4E2A\u4F1A\u8BDD":"/sessionlist --limit N List only the first N sessions in the current workspace","/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7 \u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD":"/session Bind this chat to the specified session","/models \u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B":"/models List all available models by index","/reasoninglist \u6216 /reasonings \u6309\u5E8F\u53F7\u5217\u51FA\u5F53\u524D\u6A21\u578B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7":"/reasoninglist or /reasonings List reasoning efforts for the current model by index","/reasoning [\u5E8F\u53F7\u3001\u7B49\u7EA7ID\u6216 --default] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u63A8\u7406\u7B49\u7EA7":"/reasoning [index, effort ID, or --default] Show or switch the current reasoning effort","/model [\u5E8F\u53F7\u6216\u5B8C\u6574\u6A21\u578BID] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B":"/model [index or full model ID] Show or switch the model of the current session","/model [\u5E8F\u53F7\u6216\u5B8C\u6574\u6A21\u578BID] [\u63A8\u7406\u7B49\u7EA7ID] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B":"/model [index or full model ID] [reasoning effort ID] Show or switch the current Session model","\u793A\u4F8B\uFF1A\u5148\u53D1 /models\uFF0C\u518D\u53D1 /model 2":"Example: send /models first, then /model 2","\u793A\u4F8B\uFF1A\u5148\u53D1 /models\uFF0C\u518D\u53D1 /model 2 [\u63A8\u7406\u7B49\u7EA7ID]":"Example: send /models first, then /model 2 [reasoning effort ID]","/presetlist \u6309\u5E8F\u53F7\u5217\u51FA\u53EF\u7528 Agent Preset":"/presetlist List available Agent Presets by index","/presetlist \u6216 /presets \u6309\u5E8F\u53F7\u5217\u51FA\u53EF\u7528 Agent Preset":"/presetlist or /presets List available Agent Presets by index","/preset [\u5E8F\u53F7\u6216\u5B8C\u6574ID] \u67E5\u770B\u6216\u8BBE\u7F6E\u5F53\u524D\u673A\u5668\u4EBA Agent Preset":"/preset [index or full ID] Show or set the Agent Preset of this bot","\u7EAF\u6570\u5B57 ID\uFF1A/preset id:":"Numeric-only ID: /preset id:","/preset --default \u8DDF\u968F Host \u9ED8\u8BA4":"/preset --default Follow the Host default","/stop \u505C\u6B62\u5F53\u524D\u4EFB\u52A1":"/stop Stop the current task","/steer \u8865\u5145\u6307\u4EE4 \u7EA0\u504F\u5F53\u524D\u4EFB\u52A1":"/steer Steer the current task","/status \u68C0\u67E5\u8FDE\u63A5\u72B6\u6001":"/status Check the connection status","/version \u67E5\u770B\u63D2\u4EF6\u7248\u672C":"/version Show the plugin version","/help \u663E\u793A\u672C\u5E2E\u52A9":"/help Show this help","{label}\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The {label} bot is connected to DeepSeek Harness and working normally.","{label}\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u63A5\u5165\u3002":"{label} bot credentials are missing. Remove the bot and connect it again.","{label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The {label} connection is not ready yet. The plugin will retry automatically.","{label}\u673A\u5668\u4EBA\u5DF2\u63A5\u5165\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"The {label} bot is connected, but its message connection is not ready yet.","{label}\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The {label} connection is still not ready. Please try again later.","{label}\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5":"The {label} bot is not connected yet","{name}\uFF08{id}\uFF09":"{name} ({id})","{label}{connectionLabel}\u8FD0\u884C\u6B63\u5E38":"The {label}{connectionLabel} is running normally","{label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The {label} connection is not ready. The plugin will retry automatically","{label}\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF":"The {label} connection is currently offline","\u5DF2\u5F00\u542F\u65B0\u4F1A\u8BDD\u3002\u8BF7\u53D1\u9001\u4F60\u7684\u95EE\u9898\u3002":"A new session has started. Please send your question.","\u6B63\u5728\u4F7F\u7528{name}\u2026":"Using {name}\u2026","\u5DF2\u505C\u6B62\u3002":"Stopped.","\u8BF7\u7528\u6587\u5B57\u56DE\u7B54\u5F53\u524D\u95EE\u9898\u3002":"Please answer the current question with text.","{label}\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the {label} interaction question.","\u56DE\u7B54\u63D0\u4EA4\u5931\u8D25\u3002":"Failed to submit the answer.","\u56DE\u7B54\u63D0\u4EA4\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u5F53\u524D\u95EE\u9898\u7684\u7B54\u6848\u3002":"Failed to submit the answer. Please resend your answer to the current question.","\u68C0\u6D4B\u5230\u8FD9\u4E2A Session \u4E2D\u9057\u7559\u7684\u5F85\u56DE\u7B54\u95EE\u9898\uFF0C\u5DF2\u5B89\u5168\u53D6\u6D88\u5E76\u7EE7\u7EED\u5904\u7406\u4F60\u521A\u624D\u7684\u6D88\u606F\u3002":"A pending question left over in this Session was detected. It has been safely cancelled, and your latest message is being processed."};var Vx={"\u7528\u6CD5\uFF1A/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7\uFF08/session N\uFF09":"Usage: /session Session ID or the session index in the current Workspace (/session N)","\u7528\u6CD5\uFF1A\n/sessionlist \u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u4F1A\u8BDD\n/sessionlist --limit N \u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u524D N \u4E2A\u4F1A\u8BDD\uFF08N \u4E3A\u6B63\u6574\u6570\uFF09\n/sessionlist \u5DE5\u4F5C\u533A\u5E8F\u53F7 \u6309 /workspacelist \u5E8F\u53F7\u5217\u51FA\u4F1A\u8BDD\n/sessionlist \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84 \u5217\u51FA\u6307\u5B9A\u5DE5\u4F5C\u533A\u4F1A\u8BDD":`Usage: /sessionlist List Sessions in the current Workspace /sessionlist --limit N List the first N Sessions in the current Workspace (N must be a positive integer) /sessionlist Workspace index List Sessions by /workspacelist index @@ -134,147 +134,147 @@ Reply with a number for a quick action: **1** Workspace list \xB7 **2** New session \xB7 **3** Sessions/watches **4** Status \xB7 **5** Complete permissions \xB7 **6** Help`,"\u4ECE\u4E0B\u65B9\u4E0B\u62C9\u9009\u62E9\u8865\u5145\u6307\u4EE4\uFF1B\u6700\u540E\u4E00\u9879\u53EF\u81EA\u5B9A\u4E49\u8F93\u5165\u3002":"Choose an instruction below; the last option lets you enter a custom one.","\u5F53\u524D\u6CA1\u6709\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u4F1A\u8BDD\u518D\u8865\u5145\u6307\u4EE4\u3002":"No session is bound. Bind one before steering the task.","\u2795 \u8865\u5145\u6307\u4EE4":"\u2795 Steer task","\u8F93\u5165\u8865\u5145\u6307\u4EE4\u540E\u70B9\u300C\u63D0\u4EA4\u300D\uFF0C\u53D1\u9001\u7ED9\u5F53\u524D\u8FD0\u884C\u7684\u4EFB\u52A1\u3002":"Enter an instruction and press Submit to send it to the running task.",\u8F93\u5165\u4F60\u7684\u8865\u5145\u6307\u4EE4:"Enter your instruction",\u63D0\u4EA4:"Submit","\u2795 \u81EA\u5B9A\u4E49\u6307\u4EE4":"\u2795 Custom instruction","\u{1F916} \u52A9\u624B\u83DC\u5355":"\u{1F916} Assistant menu","**\u70B9\u51FB\u6309\u94AE\u6216\u76F4\u63A5\u56DE\u590D\u6570\u5B57**":"**Tap a button or reply with a number**","1 \xB7 \u4F1A\u8BDD\u5217\u8868":"1 \xB7 Sessions","2 \xB7 \u5DE5\u4F5C\u533A":"2 \xB7 Workspace","3 \xB7 \u65B0\u4F1A\u8BDD":"3 \xB7 New session","4 \xB7 \u72B6\u6001":"4 \xB7 Status","5 \xB7 \u5E2E\u52A9":"5 \xB7 Help","**6 \xB7 \u8865\u5168\u6743\u9650**\uFF08\u8BF7\u76F4\u63A5\u56DE\u590D\u6570\u5B57 **6**\uFF09":"**6 \xB7 Complete permissions** (reply with the number **6**)","7 \xB7 \u5173\u6CE8\u5217\u8868":"7 \xB7 Watch list","\u{1F9EA} \u9A8C\u8BC1\u5361\u7247\u6309\u94AE":"\u{1F9EA} Verify card buttons","\u6388\u6743\u5DF2\u63D0\u4EA4\u3002\u8BF7\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\uFF1B\u673A\u5668\u4EBA\u771F\u5B9E\u6536\u5230\u56DE\u8C03\u540E\u624D\u4F1A\u5224\u5B9A\u4FEE\u590D\u6210\u529F\u3002":"Authorization submitted. Tap the button below; the repair is confirmed only after the bot receives the real callback.",\u5B8C\u6210\u9A8C\u8BC1:"Finish verification","**\u5DE5\u4F5C\u533A**\uFF1A{workspace}\n\u5171 **{total}** \u4E2A\u4F1A\u8BDD{paging}":`**Workspace**: {workspace} **{total}** sessions in total{paging}`,"\uFF08\u7B2C {page}/{pageCount} \u9875\uFF09":" (page {page}/{pageCount})","\u2B50\u53D6\u5173":"\u2B50 Unwatch","\u2B50\u5173\u6CE8":"\u2B50 Watch","\u25C0 \u4E0A\u4E00\u9875":"\u25C0 Previous","\u4E0B\u4E00\u9875 \u25B6":"Next \u25B6","\u56DE\u590D\u6570\u5B57\uFF081~N\uFF09\u7ED1\u5B9A\u672C\u9875\u4F1A\u8BDD\u3002":"Reply with a number (1\u2013N) to bind a session on this page.","\u{1F4C2} \u4F1A\u8BDD\u5217\u8868":"\u{1F4C2} Session list","\u5F53\u524D Host \u4E0A\u6CA1\u6709\u5DF2\u767B\u8BB0\u7684\u5DE5\u4F5C\u533A\u3002":"No workspaces are registered on the current Host.","\u56DE\u590D\u6570\u5B57\u5207\u6362\u5DE5\u4F5C\u533A\uFF0C\u6216\u70B9\u51FB\u6309\u94AE\uFF1A":"Reply with a number to switch workspaces, or tap a button:","\u{1F5C2} \u5DE5\u4F5C\u533A":"\u{1F5C2} Workspace","\u{1F916} \u52A9\u624B\u83DC\u5355\uFF08\u56DE\u590D\u6570\u5B57\u5373\u53EF\uFF0C\u65E0\u9700\u8BB0\u547D\u4EE4\uFF09":"\u{1F916} Assistant menu (reply with a number \u2014 no need to memorize commands)","1 \xB7 /sessionlist \u5217\u51FA\u4F1A\u8BDD\uFF08\u56DE\u590D\u6570\u5B57\u7ED1\u5B9A\uFF09":"1 \xB7 /sessionlist List sessions (reply with a number to bind)","2 \xB7 /workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\uFF08\u56DE\u590D\u6570\u5B57\u5207\u6362\uFF09":"2 \xB7 /workspacelist List workspaces (reply with a number to switch)","3 \xB7 /new \u5F00\u542F\u65B0\u4F1A\u8BDD":"3 \xB7 /new Start a new session","4 \xB7 /status \u8FDE\u63A5\u72B6\u6001":"4 \xB7 /status Connection status","5 \xB7 /help \u672C\u5E2E\u52A9":"5 \xB7 /help This help","6 \xB7 /repair \u8865\u5168\u6743\u9650\u4E0E\u56DE\u8C03\uFF08\u8BF7\u56DE\u590D\u6570\u5B57 6\uFF09":"6 \xB7 /repair Complete permissions and callback (reply with the number 6)","7 \xB7 /watchlist \u5173\u6CE8\u5217\u8868":"7 \xB7 /watchlist Watch list","\u76F4\u63A5\u53D1\u9001\u6587\u5B57/\u56FE\u7247\u5373\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002":"Send text or an image directly to continue the current session.","/session ID \u6216\u5E8F\u53F7 \u7ED1\u5B9A\u5DF2\u6709\u4F1A\u8BDD":"/session ID or index Bind an existing session","/watch ID \u6216\u5E8F\u53F7 \u5173\u6CE8\u4F1A\u8BDD\uFF08\u5B8C\u6210\u540E\u63A8\u9001\uFF09":"/watch ID or index Watch a session (push when done)","/compact \u538B\u7F29\u4E0A\u4E0B\u6587":"/compact Compact the context","/workspace \u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A":"/workspace Switch workspace","/presetlist \u5217\u51FA\u53EF\u7528 Agent Preset":"/presetlist List available Agent Presets","\u4EFB\u52A1\u5B8C\u6210\u4F1A\u81EA\u52A8\u63A8\u9001\uFF0C\u56DE\u590D\u6570\u5B57\u6216\u70B9\u6309\u94AE\u53D6\u6D88\u5173\u6CE8\uFF1A":"Completion is pushed automatically. Reply with a number or tap a button to unwatch:","\u{1F441} \u5173\u6CE8\u5217\u8868":"\u{1F441} Watch list","\u2B50 \u53D6\u6D88\u5173\u6CE8":"\u2B50 Unwatch","\u2606 \u5173\u6CE8":"\u2606 Watch","\u{1F50D} \u5173\u6CE8\u5217\u8868":"\u{1F50D} Watch list",\u52FE\u9009\u8981\u5173\u6CE8\u7684\u4F1A\u8BDD:"Select sessions to watch",\u52FE\u9009\u8981\u53D6\u6D88\u5173\u6CE8\u7684\u4F1A\u8BDD:"Select sessions to unwatch","\u5F53\u524D\u6CA1\u6709\u5173\u6CE8\u7684\u4F1A\u8BDD\u3002\u4EFB\u52A1\u5B8C\u6210\u4F1A\u81EA\u52A8\u63A8\u9001\u7ED3\u679C\u3002":"No sessions are being watched. Results are pushed automatically when tasks complete.","\u5F53\u524D\u5173\u6CE8 **{count}** \u4E2A\u4F1A\u8BDD\uFF1A":"Currently watching **{count}** sessions:","**\u2795 \u6DFB\u52A0\u5173\u6CE8**\uFF08\u591A\u9009\u4E0B\u62C9\u52FE\u9009\uFF09":"**\u2795 Add watch** (select from the multi-select dropdown)","**\u2796 \u53D6\u6D88\u5173\u6CE8**\uFF08\u591A\u9009\u4E0B\u62C9\u52FE\u9009\uFF09":"**\u2796 Remove watch** (select from the multi-select dropdown)","\u{1F4CB} \u4F1A\u8BDD\u5217\u8868":"\u{1F4CB} Session list","\u{1F519} \u8FD4\u56DE\u83DC\u5355":"\u{1F519} Back to menu",\u5DF2\u5B8C\u6210:"Completed",\u5DF2\u505C\u6B62:"Stopped",\u5DF2\u4E2D\u6B62:"Aborted",\u5DF2\u53D6\u6D88:"Cancelled",\u5DF2\u7ED3\u675F:"Ended","\u2705 \u4EFB\u52A1\u5B8C\u6210":"\u2705 Task complete","**\u72B6\u6001**\uFF1A{reason}":"**Status**: {reason}",\u6253\u5F00\u4F1A\u8BDD\u5217\u8868:"Open session list",\u5DE5\u4F5C\u533A:"Workspace","\u7ED1\u5B9A\u8BE5\u4F1A\u8BDD\u540E\u53EF\u7EE7\u7EED\u8FFD\u95EE\uFF0C\u8F93\u5165\u6587\u5B57\u5373\u53EF\u3002":"After binding this session you can keep asking; just type a message.","\u5F53\u524D\u6CA1\u6709\u5173\u6CE8\u7684\u4F1A\u8BDD\u3002\n`/watch ` \u5173\u6CE8\u540E\uFF0C\u4EFB\u52A1\u5B8C\u6210\u4F1A\u81EA\u52A8\u63A8\u9001\u3002":"No sessions are being watched.\nWatch one with `/watch ` and completion is pushed automatically.","\u6B63\u5728\u751F\u6210\u2026":"Generating\u2026","\u2935\uFE0F \u6700\u7EC8\u7ED3\u679C\u89C1\u4E0B\u65B9":"\u2935\uFE0F Final result below",\u56DE\u7B54\u5B8C\u6210:"Answer complete","\u5185\u5BB9\u8F83\u957F\uFF0C\u751F\u6210\u5B8C\u6210\u540E\u5C06\u5206\u6BB5\u53D1\u9001\u5B8C\u6574\u56DE\u7B54\u3002":"This response is long. The complete answer will be sent in parts when generation finishes.",\u98DE\u4E66\u673A\u5668\u4EBA:"Feishu bot","\u98DE\u4E66\u673A\u5668\u4EBA\u7F3A\u5C11\u56FE\u7247\u8BFB\u53D6\u6743\u9650 im:message:readonly\uFF08\u98DE\u4E66\u663E\u793A\u4E3A\u201C\u83B7\u53D6\u5355\u804A\u3001\u7FA4\u7EC4\u6D88\u606F\u201D\uFF09\u3002\u8BF7\u79C1\u804A\u673A\u5668\u4EBA\u6267\u884C /repair \u547D\u4EE4\uFF0C\u6216\u8005\u5728\u300CIM\u673A\u5668\u4EBA\u300D\u8BBE\u7F6E\u9875\u70B9\u51FB\u201C\u8865\u5168\u6743\u9650\u201D\u6309\u94AE\u5E76\u626B\u7801\u3002\u6309\u98DE\u4E66\u63D0\u793A\u53D1\u5E03\u65B0\u7248\u672C\u3001\u5B8C\u6210\u5FC5\u8981\u5BA1\u6279\u540E\uFF0C\u518D\u91CD\u65B0\u53D1\u9001\u56FE\u7247\u3002":"The Feishu bot is missing the image-read scope im:message:readonly, shown by Feishu as \u201CRead direct and group messages.\u201D Run /repair in a direct chat with the bot, or click the \u201CComplete permissions\u201D button on the IM Bot settings page and scan the QR code. Publish a new version and complete any approval requested by Feishu, then resend the image.","\u2705 \u4FEE\u590D\u5B8C\u6210\uFF1A\u5DF2\u5B9E\u6D4B\u6536\u5230 card.action.trigger\uFF0C\u83DC\u5355\u6309\u94AE\u73B0\u5728\u53EF\u7528\u3002":"\u2705 Repair complete: card.action.trigger was received in a real test; the menu buttons now work.","\u26A0\uFE0F \u4FEE\u590D\u9A8C\u8BC1\u8D85\u65F6\uFF1A\u672A\u6536\u5230\u6D4B\u8BD5\u5361\u6309\u94AE\u7684 card.action.trigger\uFF0C\u4E0D\u80FD\u786E\u8BA4\u6309\u94AE\u5DF2\u4FEE\u590D\u3002\u8BF7\u4E0D\u8981\u91CD\u590D\u6388\u6743\uFF1B\u5148\u68C0\u67E5\u98DE\u4E66\u5F00\u653E\u5E73\u53F0\u7684\u5361\u7247\u56DE\u8C03\u914D\u7F6E\uFF0C\u786E\u8BA4\u540E\u518D\u53D1\u9001 /repair\u3002":"\u26A0\uFE0F Repair verification timed out: no card.action.trigger from the test card button was received, so the buttons cannot be confirmed repaired. Do not authorize again; check the card-callback configuration in Feishu Open Platform first, then send /repair.","\u26A0\uFE0F \u4FEE\u590D\u9A8C\u8BC1\u5931\u8D25\uFF1A\u65E0\u6CD5\u53D1\u9001\u4E13\u7528\u6D4B\u8BD5\u5361\uFF0C\u4E0D\u80FD\u786E\u8BA4 card.action.trigger \u5DF2\u6062\u590D\u3002\u8BF7\u4E0D\u8981\u91CD\u590D\u6388\u6743\uFF1B\u5148\u68C0\u67E5\u673A\u5668\u4EBA\u6D88\u606F\u6743\u9650\u548C\u8FDE\u63A5\u72B6\u6001\u3002":"\u26A0\uFE0F Repair verification failed: the dedicated test card could not be sent, so card.action.trigger cannot be confirmed restored. Do not authorize again; check the bot message permission and connection status first.","\u26A0\uFE0F \u4FEE\u590D\u9A8C\u8BC1\u4E2D\u65AD\uFF1ARuntime \u5DF2\u505C\u6B62\uFF0C\u672A\u5B8C\u6210 card.action.trigger \u5B9E\u6D4B\uFF0C\u4E0D\u80FD\u786E\u8BA4\u4FEE\u590D\u6210\u529F\u3002\u8BF7\u4E0D\u8981\u91CD\u590D\u6388\u6743\uFF1B\u5148\u7B49\u5F85\u673A\u5668\u4EBA\u6062\u590D\u8FDE\u63A5\u3002":"\u26A0\uFE0F Repair verification interrupted: the Runtime stopped before the card.action.trigger test completed, so the repair cannot be confirmed. Do not authorize again; wait for the bot to reconnect.","\u8BE5\u5BA1\u6279\u5DF2\u5904\u7406\u6216\u4E0D\u5B58\u5728\uFF0C\u65E0\u9700\u91CD\u590D\u64CD\u4F5C\u3002":"This approval has already been processed or does not exist; no need to repeat the action.","\u64CD\u4F5C\u53C2\u6570\uFF1A\n{operation}":`Operation parameters: -{operation}`,"\u2705 \u6279\u51C6":"\u2705 Approve","\u274C \u62D2\u7EDD":"\u274C Reject","\u{1F510} \u5DE5\u5177\u5BA1\u6279":"\u{1F510} Tool approval","\u2753 \u8BF7\u8865\u5145\u4FE1\u606F{progress}":"\u2753 Please provide more information{progress}"};var Xx={"\u5DF2\u8FDE\u63A5 DeepSeek Harness\uFF0C\u6B63\u5728\u601D\u8003\u2026":"Connected to DeepSeek Harness, thinking\u2026","\u9489\u9489\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"The DingTalk bot is connected to DeepSeek Harness.","\u9489\u9489\u672A\u80FD\u6362\u53D6\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\uFF1B\u82E5\u6301\u7EED\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u673A\u5668\u4EBA\u7684\u201C\u4F01\u4E1A\u5185\u673A\u5668\u4EBA\u53D1\u9001\u6D88\u606F\u6743\u9650\u201D\u3002":`DingTalk could not provide the image download address. Please resend; if it keeps failing, check the bot's "Send messages as an internal robot" permission.`,"\u9489\u9489\u6CA1\u6709\u8FD4\u56DE\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002":"DingTalk did not return an image download address. Please resend.","\u9489\u9489\u8FD4\u56DE\u7684\u56FE\u7247\u4E34\u65F6\u5730\u5740\u65E0\u6CD5\u8BFB\u53D6\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002":"The temporary image address returned by DingTalk could not be read. Please resend.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\uFF0C\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u8BD5\u3002":'Delivery of the result file "{name}" could not be confirmed. Please check whether it already arrived in the chat before retrying.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u9489\u9489\u5E94\u7528\u6216\u673A\u5668\u4EBA\u7F3A\u5C11\u6587\u4EF6\u6D88\u606F\u6743\u9650\u3002\u8BF7\u5F00\u901A\u5E94\u7528 qyapi_base \u6743\u9650\uFF0C\u5E76\u786E\u8BA4\u673A\u5668\u4EBA\u5177\u5907\u6587\u4EF6\u6D88\u606F\u53D1\u9001\u80FD\u529B\u3002":`Result file "{name}" was generated, but the DingTalk app or bot lacks file message permission. Enable the app's qyapi_base permission and make sure the bot can send file messages.`,"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u9489\u9489\u673A\u5668\u4EBA\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'Result file "{name}" exceeds the file size limit of the current DingTalk bot and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u9489\u9489\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'Result file "{name}" was rate-limited by DingTalk and could not be sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u9489\u9489\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6D88\u606F\uFF0C\u8BF7\u68C0\u67E5\u6587\u4EF6\u7C7B\u578B\u548C\u673A\u5668\u4EBA\u6587\u4EF6\u6D88\u606F\u914D\u7F6E\u3002":`Result file "{name}" was generated, but DingTalk rejected the file message. Check the file type and the bot's file message configuration.`,"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7\u9489\u9489\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'Result file "{name}" was generated but could not be sent via DingTalk right now. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u5DF2\u751F\u6210\u3002":"The result file has been generated.","\u9489\u9489\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The DingTalk bot is connected to DeepSeek Harness normally.","\u9489\u9489\u547D\u4EE4\u5904\u7406\u5931\u8D25\u3002":"Failed to process the DingTalk command.","\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002":"The DingTalk message has no safe reply address.","\u9489\u9489\u5BA1\u6279\u5904\u7406\u5931\u8D25\u3002":"Failed to process the DingTalk approval.","\u9489\u9489\u6D88\u606F\u5904\u7406\u5931\u8D25\u3002":"Failed to process the DingTalk message.","\u9489\u9489\u6D88\u606F\u683C\u5F0F\u65E0\u6548\u3002":"Invalid DingTalk message format.","\u9489\u9489\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the DingTalk interaction question.",\u9489\u9489\u7528\u6237:"DingTalk user",\u9489\u9489\u673A\u5668\u4EBA:"DingTalk bot",\u8EAB\u4EFD\u5DF2\u9690\u85CF:"Identity hidden","\u9489\u9489\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The DingTalk bot credentials are missing. Remove the bot and scan the QR code again.","\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The DingTalk connection is not ready. Please try again later.","\u9489\u9489\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The DingTalk connection is still not ready. Please try again later.","\u9489\u9489 Stream \u8FDE\u63A5\u5931\u8D25\uFF1A\u68C0\u6D4B\u5230\u4EE3\u7406\u4F9D\u8D56 agent-base 6.0.0\u3002":"The DingTalk Stream connection failed because proxy dependency agent-base 6.0.0 was detected.","\u8BF7\u5C06 DSH profile \u4E2D\u7684 agent-base@6 \u56FA\u5B9A\u4E3A 6.0.2 \u540E\u91CD\u65B0\u5B89\u88C5\u4F9D\u8D56\uFF0C\u6216\u5347\u7EA7 pnpm \u540E\u91CD\u65B0\u89E3\u6790 lockfile\u3002":"Pin agent-base@6 to 6.0.2 in the DSH profile and reinstall dependencies, or upgrade pnpm and re-resolve the lockfile.","\u63D2\u4EF6\u65E0\u6CD5\u8FDE\u63A5\u672C\u673A Harness\u3002":"The plugin could not connect to the local Harness.","\u8BF7\u786E\u8BA4 dsh web \u6B63\u5E38\u8FD0\u884C\uFF0C\u5E76\u67E5\u770B dsh web \u65E5\u5FD7\u4E2D\u76F8\u540C\u53C2\u8003\u53F7\u5BF9\u5E94\u7684\u8BCA\u65AD\u4FE1\u606F\u3002":"Make sure dsh web is running, then find the matching reference in the dsh web log.","\u9489\u9489 Stream SDK \u52A0\u8F7D\u5931\u8D25\u3002":"The DingTalk Stream SDK could not be loaded.","\u8BF7\u91CD\u65B0\u5B89\u88C5\u5F53\u524D DSH profile \u7684\u63D2\u4EF6\u4F9D\u8D56\uFF0C\u5E76\u67E5\u770B dsh web \u65E5\u5FD7\u4E2D\u76F8\u540C\u53C2\u8003\u53F7\u5BF9\u5E94\u7684\u8BCA\u65AD\u4FE1\u606F\u3002":"Reinstall plugin dependencies in the current DSH profile, then find the matching reference in the dsh web log.","\u9489\u9489\u62D2\u7EDD\u4E86\u5F53\u524D\u5E94\u7528\u51ED\u636E\u3002":"DingTalk rejected the current app credentials.","\u8BF7\u6838\u5BF9 Client ID\u3001Client Secret \u548C\u673A\u5668\u4EBA\u6743\u9650\u540E\u91CD\u8BD5\u3002":"Verify the app credentials and bot permissions, then try again.","\u8FDE\u63A5\u9489\u9489 Stream \u8D85\u65F6\u3002":"The DingTalk Stream connection timed out.","\u8BF7\u68C0\u67E5\u7F51\u7EDC\u3001\u4EE3\u7406\u548C\u9632\u706B\u5899\u540E\u91CD\u8BD5\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check the network, proxy, and firewall, then try again. Find details in the dsh web log using the reference.","\u65E0\u6CD5\u89E3\u6790\u9489\u9489\u670D\u52A1\u5730\u5740\u3002":"The DingTalk service address could not be resolved.","\u8BF7\u68C0\u67E5 DNS\u3001\u7F51\u7EDC\u548C\u4EE3\u7406\u8BBE\u7F6E\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check DNS, network, and proxy settings. Find details in the dsh web log using the reference.","\u9489\u9489 Stream \u7684 TLS \u8FDE\u63A5\u6821\u9A8C\u5931\u8D25\u3002":"TLS validation failed for the DingTalk Stream connection.","\u8BF7\u68C0\u67E5\u7CFB\u7EDF\u8BC1\u4E66\u3001\u4EE3\u7406\u8BC1\u4E66\u6216 HTTPS \u4E2D\u95F4\u4EE3\u7406\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check system certificates, proxy certificates, or the HTTPS interception proxy. Find details in the dsh web log using the reference.","\u9489\u9489 Stream \u65E0\u6CD5\u901A\u8FC7\u5F53\u524D\u4EE3\u7406\u5EFA\u7ACB\u8FDE\u63A5\u3002":"DingTalk Stream could not connect through the current proxy.","\u8BF7\u68C0\u67E5 HTTP_PROXY\u3001HTTPS_PROXY\u3001NO_PROXY \u548C\u4EE3\u7406\u8FDE\u901A\u6027\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check HTTP_PROXY, HTTPS_PROXY, NO_PROXY, and proxy connectivity. Find details in the dsh web log using the reference.","\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u5EFA\u7ACB\u5931\u8D25\u3002":"The DingTalk Stream message connection could not be established.","\u8BF7\u68C0\u67E5\u7F51\u7EDC\u548C\u673A\u5668\u4EBA\u914D\u7F6E\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check the network and bot configuration. Find details in the dsh web log using the reference.","\u9489\u9489 Stream \u6D88\u606F\u76D1\u542C\u521D\u59CB\u5316\u5931\u8D25\u3002":"DingTalk Stream message-listener initialization failed.","\u8BF7\u786E\u8BA4 dsh-im \u4E0E dingtalk-stream \u7248\u672C\u517C\u5BB9\uFF0C\u5E76\u6309\u53C2\u8003\u53F7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"Make sure dsh-im and dingtalk-stream are compatible, then inspect the dsh web log using the reference.","\u9489\u9489\u673A\u5668\u4EBA\u8FD0\u884C\u73AF\u5883\u521D\u59CB\u5316\u5931\u8D25\u3002":"The DingTalk bot runtime could not be initialized.","\u8BF7\u68C0\u67E5 DSH \u6570\u636E\u76EE\u5F55\u3001\u5DE5\u4F5C\u533A\u548C\u63D2\u4EF6\u4F9D\u8D56\uFF0C\u5E76\u6309\u53C2\u8003\u53F7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"Check the DSH data directory, workspace, and plugin dependencies, then inspect the dsh web log using the reference.","\u8BF7\u5728 dsh web \u65E5\u5FD7\u4E2D\u67E5\u627E\u76F8\u540C\u53C2\u8003\u53F7\uFF0C\u4EE5\u83B7\u53D6\u5DF2\u8131\u654F\u7684\u5177\u4F53\u9519\u8BEF\u3002":"Find the matching reference in the dsh web log for the redacted error details.","\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002":"QR code setup has been cancelled.","\u65E0\u6CD5\u751F\u6210\u9489\u9489\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Could not generate the DingTalk QR code. Please try again later.","\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002":"The QR code has expired. Generate a new one.","\u9489\u9489\u5DF2\u63A5\u5165\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"DingTalk is connected, but the message connection is not ready yet. Please try again later.","\u9489\u9489\u672A\u5B8C\u6210\u673A\u5668\u4EBA\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u626B\u7801\u3002":"DingTalk did not complete the bot authorization. Please scan the QR code again.","\u9489\u9489\u6388\u6743\u72B6\u6001\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002":"The DingTalk authorization status is temporarily unavailable. Retrying.","\u9489\u9489\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002":"DingTalk authorization succeeded, but the configuration could not be saved safely.","\u9489\u9489\u6388\u6743\u67E5\u8BE2\u6682\u65F6\u5931\u8D25\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002":"The DingTalk authorization query failed temporarily. Retrying.","\u9489\u9489\u673A\u5668\u4EBA\uFF08{clientId}\uFF09":"DingTalk bot ({clientId})","\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The DingTalk Stream message connection is running normally",\u9489\u9489\u6D88\u606F\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF:"The DingTalk message connection is currently offline"};var $x={"\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"The Enterprise WeChat bot is connected to DeepSeek Harness.","\u5F53\u524D\u5F85\u5904\u7406\u56FE\u7247\u8F83\u591A\uFF0C\u8BF7\u7A0D\u540E\u91CD\u65B0\u53D1\u9001\u3002":"Too many images are pending. Please send them again later.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u4F01\u4E1A\u5FAE\u4FE1\u667A\u80FD\u673A\u5668\u4EBA\u7F3A\u5C11\u7D20\u6750\u4E0A\u4F20\u6216\u6587\u4EF6\u6D88\u606F\u80FD\u529B\uFF0C\u8BF7\u68C0\u67E5\u673A\u5668\u4EBA\u6743\u9650\u3002":'The result file "{name}" was generated, but the Enterprise WeChat bot lacks media upload or file message capability. Please check the bot permissions.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the file size this Enterprise WeChat bot can send and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0C\u4F01\u4E1A\u5FAE\u4FE1\u4E0D\u5141\u8BB8\u53D1\u9001\u7A7A\u6587\u4EF6\u3002":'The result file "{name}" is empty. Enterprise WeChat does not allow sending empty files.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u4F01\u4E1A\u5FAE\u4FE1\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was rate-limited by Enterprise WeChat and could not be sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u4F01\u4E1A\u5FAE\u4FE1\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6216\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but Enterprise WeChat rejected the file or file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7\u4F01\u4E1A\u5FAE\u4FE1\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated but could not be sent via Enterprise WeChat right now. Please try again later.',"\u4EFB\u52A1\u5DF2\u5B8C\u6210\uFF0C\u4F46\u6CA1\u6709\u751F\u6210\u53EF\u663E\u793A\u7684\u6587\u672C\u3002":"The task completed, but no displayable text was generated.","\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u8BED\u97F3\u8F6C\u5199\u6D88\u606F\u3002":"Currently only text, images, and voice transcription messages are supported.","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The connection between the Enterprise WeChat bot and DeepSeek Harness is working.","\u6B63\u5728\u601D\u8003\u4E2D\u2026":"Thinking\u2026","\u4F01\u4E1A\u5FAE\u4FE1\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the Enterprise WeChat interaction question.","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The Enterprise WeChat bot credentials are missing. Please remove the bot and scan the QR code again.","\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The Enterprise WeChat connection is not ready. The plugin will retry automatically.","\u626B\u7801\u7ED1\u5B9A\u5DF2\u53D6\u6D88\u3002":"QR code binding has been cancelled.","\u65E0\u6CD5\u751F\u6210\u4F01\u4E1A\u5FAE\u4FE1\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Unable to generate the Enterprise WeChat QR code. Please try again later.","\u4F01\u4E1A\u5FAE\u4FE1\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002":"The Enterprise WeChat QR code has expired. Please generate a new one.","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u5DF2\u7ED1\u5B9A\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"The Enterprise WeChat bot is bound, but the message connection is not ready yet.","\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The Enterprise WeChat connection is still not ready. Please try again later.","\u4F01\u4E1A\u5FAE\u4FE1\u626B\u7801\u6CA1\u6709\u5B8C\u6210\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The Enterprise WeChat QR scan was not completed. Please generate a new QR code.","\u4F01\u4E1A\u5FAE\u4FE1\u626B\u7801\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The Enterprise WeChat QR service is temporarily unavailable. Please generate a new QR code.","\u4F01\u4E1A\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002":"Enterprise WeChat authorization succeeded, but the connection configuration could not be saved safely.",\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA:"Enterprise WeChat bot","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\uFF08{botId}\uFF09":"Enterprise WeChat bot ({botId})","\u4F01\u4E1A\u5FAE\u4FE1 WebSocket \u957F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The Enterprise WeChat WebSocket long connection is running normally","\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The Enterprise WeChat connection is not ready. The plugin will retry automatically",\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF:"The Enterprise WeChat connection is currently offline"};var eY={"QQ \u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"The QQ bot is connected to DeepSeek Harness.","\u56DE\u7B54\u8F83\u957F\uFF0C\u540E\u7EED\u5185\u5BB9\u672A\u80FD\u901A\u8FC7 QQ \u5B8C\u6574\u53D1\u9001\uFF0C\u8BF7\u56DE\u590D\u201C\u7EE7\u7EED\u201D\u3002":"The answer is long and the rest could not be sent fully through QQ. Reply \u201C\u7EE7\u7EED\u201D (continue) to receive it.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 QQ \u4ECA\u65E5\u6587\u4EF6\u4E0A\u4F20\u989D\u5EA6\u5DF2\u7528\u5B8C\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":`The result file "{name}" was generated, but QQ's daily file upload quota is used up. Please try again later.`,"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D QQ \u673A\u5668\u4EBA\u6CA1\u6709\u6587\u4EF6\u6D88\u606F\u6743\u9650\u3002":'The result file "{name}" was generated, but the current QQ bot does not have file message permission.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D QQ \u673A\u5668\u4EBA\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the file size the current QQ bot can send and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0CQQ \u4E0D\u5141\u8BB8\u53D1\u9001\u7A7A\u6587\u4EF6\u3002":'The result file "{name}" is empty, and QQ does not allow sending empty files.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB QQ \u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was temporarily rate-limited by QQ and was not sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 QQ \u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6216\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but QQ rejected the file or file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7 QQ \u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated but could not be sent via QQ right now. Please try again later.',"QQ \u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The QQ bot is connected to DeepSeek Harness normally.","QQ \u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the QQ interaction question.","QQ \u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The QQ bot credentials are missing. Remove the bot and scan the QR code again.","QQ \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The QQ connection is not ready; the plugin will retry automatically.","QQ \u626B\u7801\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The QQ QR service is temporarily unavailable. Please generate a new QR code.","\u65E0\u6CD5\u751F\u6210 QQ \u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Unable to generate the QQ QR code. Please try again later.","QQ \u673A\u5668\u4EBA\u5DF2\u7ED1\u5B9A\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"The QQ bot is bound, but the message connection is not ready yet.","QQ \u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The QQ connection is still not ready. Please try again later.",QQ\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5:"The QQ bot is not connected yet","QQ \u673A\u5668\u4EBA\uFF08{appId}\uFF09":"QQ bot ({appId})",QQ\u673A\u5668\u4EBA:"QQ bot","QQ WebSocket \u957F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The QQ WebSocket long connection is running normally","QQ \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The QQ connection is not ready; the plugin will retry automatically","QQ \u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF":"The QQ connection is currently offline","QQ \u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002":"QQ authorization succeeded, but the connection configuration could not be saved safely."};var AY={"\u5FAE\u4FE1\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"WeChat is connected to DeepSeek Harness.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5FAE\u4FE1\u673A\u5668\u4EBA\u5F53\u524D\u6CA1\u6709\u6587\u4EF6\u6D88\u606F\u53D1\u9001\u6743\u9650\uFF0C\u8BF7\u68C0\u67E5\u673A\u5668\u4EBA\u6587\u4EF6\u6D88\u606F\u80FD\u529B\u3002":`The result file "{name}" was generated, but the WeChat bot currently has no permission to send file messages. Please check the bot's file messaging capability.`,"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u5FAE\u4FE1\u4F1A\u8BDD\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the file size limit of the current WeChat conversation and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u5FAE\u4FE1\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was temporarily rate-limited by WeChat and was not sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5FAE\u4FE1\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but WeChat rejected the file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7\u5FAE\u4FE1\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated but could not be sent via WeChat right now. Please try again later.',"\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\uFF0C\u4EE5\u53CA\u5FAE\u4FE1\u5DF2\u8F6C\u6210\u6587\u5B57\u7684\u8BED\u97F3\u6D88\u606F\u3002":"Currently supports text, images, and voice messages that WeChat has converted to text.","\u5FAE\u4FE1\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"WeChat is connected to DeepSeek Harness normally.","\u5FAE\u4FE1\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the WeChat interaction question.","\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5FAE\u4FE1\u53D1\u9001\u5931\u8D25\uFF0C\u53EF\u80FD\u53EA\u6536\u5230\u90E8\u5206\u5185\u5BB9\u3002\u8BF7\u5C06\u4E0B\u9762\u7684\u8BCA\u65AD\u4FE1\u606F\u5B8C\u6574\u53CD\u9988\u7ED9\u7BA1\u7406\u5458\u3002":"The reply was generated, but WeChat delivery failed and only part of it may have arrived. Please send the complete diagnostic below to the administrator.","\u5FAE\u4FE1\u53D1\u9001\u8BCA\u65AD\uFF1A{diagnostic}":"WeChat delivery diagnostic: {diagnostic}","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u8BFB\u53D6\u73B0\u6709\u767B\u5F55\u51ED\u636E\u3002\u8BF7\u68C0\u67E5 DSH \u51ED\u636E\u5B58\u50A8\u3002":"WeChat was authorized, but the existing login credential could not be read. Please check the DSH credential store.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u767B\u5F55\u51ED\u636E\u65E0\u6CD5\u5199\u5165 DSH \u51ED\u636E\u5B58\u50A8\u3002\u8BF7\u68C0\u67E5\u51ED\u636E\u5B58\u50A8\u662F\u5426\u53EF\u5199\u3002":"WeChat was authorized, but the login credential could not be written to the DSH credential store. Please check that the credential store is writable.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u8D26\u53F7\u914D\u7F6E\u65E0\u6CD5\u5199\u5165\u672C\u673A\u3002\u8BF7\u68C0\u67E5 DSH_HOME \u76EE\u5F55\u6743\u9650\u3002":"WeChat was authorized, but the account configuration could not be written locally. Please check the DSH_HOME directory permissions.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u521D\u59CB\u5316\u8D26\u53F7\u72B6\u6001\u6216\u5DE5\u4F5C\u533A\u3002\u8BF7\u68C0\u67E5 DSH_HOME \u548C\u5DE5\u4F5C\u533A\u76EE\u5F55\u3002":"WeChat was authorized, but the account state or workspace could not be initialized. Please check DSH_HOME and the workspace directories.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u63D2\u4EF6\u65E0\u6CD5\u8FDE\u63A5\u672C\u673A Harness\u3002\u8BF7\u68C0\u67E5 dsh web \u5730\u5740\u548C\u7AEF\u53E3\u3002":"WeChat was authorized, but the plugin could not connect to the local Harness. Please check the dsh web address and port.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5065\u5EB7\u68C0\u67E5\u8D85\u65F6\u3002\u8BF7\u786E\u8BA4 dsh web \u672A\u963B\u585E\u3002":"WeChat was authorized, but the Harness health check timed out. Please confirm dsh web is not blocked.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5065\u5EB7\u68C0\u67E5\u9700\u8981\u8EAB\u4EFD\u8BA4\u8BC1\u3002\u8BF7\u68C0\u67E5\u4EE3\u7406\u3001\u7F51\u5173\u6216\u81EA\u5B9A\u4E49\u9274\u6743\u914D\u7F6E\u3002":"WeChat was authorized, but the Harness health check requires authentication. Please check proxy, gateway, or custom auth configuration.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u672C\u673A Harness \u8BF7\u6C42\u88AB\u4EE3\u7406\u8981\u6C42\u8BA4\u8BC1\u3002\u8BF7\u8BA9\u56DE\u73AF\u5730\u5740\u7ED5\u8FC7\u4EE3\u7406\uFF0C\u5E76\u68C0\u67E5 NO_PROXY \u914D\u7F6E\u3002":"WeChat was authorized, but the local Harness request was challenged for proxy authentication. Please bypass the proxy for loopback addresses and check the NO_PROXY configuration.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5F02\u5E38\u62D2\u7EDD\u4E86\u56DE\u73AF\u5730\u5740\u7684\u5065\u5EB7\u68C0\u67E5\u3002\u8BF7\u68C0\u67E5 HTTP \u4EE3\u7406\u3001Harness \u6E90\u7801\u7248\u672C\u548C\u6784\u5EFA\u4EA7\u7269\u3002":"WeChat was authorized, but Harness unexpectedly rejected the health check from a loopback address. Please check the HTTP proxy, Harness source version, and build artifacts.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u7684 Host \u4FE1\u4EFB\u68C0\u67E5\u62D2\u7EDD\u4E86\u975E\u56DE\u73AF\u5730\u5740\u8BF7\u6C42\u3002\u8BF7\u68C0\u67E5 harnessBaseUrl \u4E0E trustedHosts \u914D\u7F6E\u3002":"WeChat was authorized, but the Harness Host trust check rejected a non-loopback request. Please check the harnessBaseUrl and trustedHosts configuration.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u5065\u5EB7\u68C0\u67E5\u6536\u5230\u4E86\u975E Harness \u6807\u51C6\u7684 403 \u62D2\u7EDD\u54CD\u5E94\u3002\u8BF7\u68C0\u67E5\u4EE3\u7406\u6216\u7F51\u5173\u914D\u7F6E\u3002":"WeChat was authorized, but the health check received a non-standard Harness 403 rejection. Please check the proxy or gateway configuration.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u627E\u4E0D\u5230 Harness \u5065\u5EB7\u68C0\u67E5\u63A5\u53E3\u3002\u8BF7\u786E\u8BA4 Harness \u4E0E\u63D2\u4EF6\u7248\u672C\u517C\u5BB9\u3002":"WeChat was authorized, but the Harness health check endpoint was not found. Please confirm the Harness and plugin versions are compatible.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5065\u5EB7\u68C0\u67E5\u8FD4\u56DE\u670D\u52A1\u9519\u8BEF\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"WeChat was authorized, but the Harness health check returned a server error. Please check the dsh web logs.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u54CD\u5E94\u3002\u8BF7\u786E\u8BA4 Harness \u4E0E\u63D2\u4EF6\u7248\u672C\u517C\u5BB9\u3002":"WeChat was authorized, but Harness returned an unrecognized response. Please confirm the Harness and plugin versions are compatible.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u62D2\u7EDD\u4E86\u5065\u5EB7\u68C0\u67E5\u8BF7\u6C42\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"WeChat was authorized, but Harness rejected the health check request. Please check the dsh web logs.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5065\u5EB7\u68C0\u67E5\u53D1\u751F\u672A\u77E5\u9519\u8BEF\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"WeChat was authorized, but the Harness health check failed with an unknown error. Please check the dsh web logs.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u521D\u59CB\u5316\u5931\u8D25\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u540E\u91CD\u8BD5\u3002":"WeChat was authorized, but the message connection failed to initialize. Please check the dsh web logs and try again.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u6FC0\u6D3B\u8FC7\u7A0B\u4E2D\u53D1\u751F\u672A\u77E5\u9519\u8BEF\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"WeChat was authorized, but an unknown error occurred during activation. Please check the dsh web logs.","\u767B\u5F55\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u8D26\u53F7\u540E\u91CD\u65B0\u626B\u7801\u3002":"The login credential is missing. Please remove the account and scan the QR code again.","\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The WeChat connection is not ready; the plugin will retry automatically.","\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The WeChat connection is not ready; the plugin will retry automatically","\u65E0\u6CD5\u751F\u6210\u5FAE\u4FE1\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Unable to generate the WeChat QR code. Please try again later.","\u5FAE\u4FE1\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The WeChat connection is still not ready. Please try again later.",\u5FAE\u4FE1\u673A\u5668\u4EBA:"WeChat Bot","\u5FAE\u4FE1\u673A\u5668\u4EBA\uFF08{name}\uFF09":"WeChat Bot ({name})",\u5FAE\u4FE1\u6D88\u606F\u957F\u8F6E\u8BE2\u8FD0\u884C\u6B63\u5E38:"WeChat message long-polling is running normally",\u5FAE\u4FE1\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF:"The WeChat connection is currently offline","\u914D\u5BF9\u7801\u591A\u6B21\u9519\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The pairing code was entered incorrectly too many times. Please generate a new QR code.","\u8BE5\u5FAE\u4FE1\u8D26\u53F7\u5DF2\u7ED1\u5B9A\uFF0C\u4F46\u672C\u673A\u6CA1\u6709\u53EF\u6062\u590D\u7684\u51ED\u636E\u3002":"This WeChat account is already bound, but no recoverable credential exists on this machine.","\u5FAE\u4FE1\u6388\u6743\u6210\u529F\uFF0C\u4F46\u8FD4\u56DE\u7684\u8D26\u53F7\u51ED\u636E\u4E0D\u5B8C\u6574\u3002":"WeChat authorization succeeded, but the returned account credential is incomplete.","\u5FAE\u4FE1\u767B\u5F55\u51ED\u636E\u5DF2\u5931\u6548\uFF0C\u8BF7\u79FB\u9664\u8D26\u53F7\u540E\u91CD\u65B0\u626B\u7801\u3002":"The WeChat login credential has expired. Please remove the account and scan the QR code again.","\u5FAE\u4FE1\u6D88\u606F\u540C\u6B65\u8BF7\u6C42\u88AB\u62D2\u7EDD\u3002":"The WeChat message sync request was rejected.","\u5FAE\u4FE1\u56FE\u7247\u7684\u52A0\u5BC6\u5BC6\u94A5\u65E0\u6548\u3002":"The encryption key of the WeChat image is invalid.","\u5FAE\u4FE1\u56FE\u7247\u7684\u52A0\u5BC6\u6570\u636E\u65E0\u6548\u3002":"The encrypted data of the WeChat image is invalid.","\u5FAE\u4FE1\u56FE\u7247\u89E3\u5BC6\u5931\u8D25\u3002":"Failed to decrypt the WeChat image.","\u5FAE\u4FE1\u56FE\u7247\u6CA1\u6709\u53EF\u7528\u7684\u4E0B\u8F7D\u5730\u5740\u3002":"The WeChat image has no usable download URL.","\u5FAE\u4FE1\u56FE\u7247\u7684\u4E0B\u8F7D\u5730\u5740\u65E0\u6548\u3002":"The download URL of the WeChat image is invalid.","\u5FAE\u4FE1\u56FE\u7247\u7684\u4E0B\u8F7D\u5730\u5740\u4E0D\u53D7\u4FE1\u4EFB\u3002":"The download URL of the WeChat image is not trusted.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u8FDE\u63A5\u5730\u5740\u3002":"The WeChat service returned an invalid connection URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u4E0D\u53D7\u4FE1\u4EFB\u7684\u8FDE\u63A5\u5730\u5740\u3002":"The WeChat service returned an untrusted connection URL.","\u5FAE\u4FE1\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u626B\u7801\u5730\u5740\u3002":"The WeChat service did not return a QR-code URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u626B\u7801\u5730\u5740\u3002":"The WeChat service returned an invalid QR-code URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u4E0D\u53D7\u4FE1\u4EFB\u7684\u626B\u7801\u5730\u5740\u3002":"The WeChat service returned an untrusted QR-code URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6587\u4EF6\u4E0A\u4F20\u5730\u5740\u3002":"The WeChat service returned an invalid file upload URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u4E0D\u53D7\u4FE1\u4EFB\u7684\u6587\u4EF6\u4E0A\u4F20\u5730\u5740\u3002":"The WeChat service returned an untrusted file upload URL.","\u5FAE\u4FE1\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u6587\u4EF6\u4E0A\u4F20\u5730\u5740\u3002":"The WeChat service did not return a file upload URL.","\u5FAE\u4FE1\u6587\u4EF6\u4E0A\u4F20\u88AB\u62D2\u7EDD\uFF08HTTP {status}\uFF09\u3002":"The WeChat file upload was rejected (HTTP {status}).","\u5FAE\u4FE1\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF08HTTP {status}\uFF09\u3002":"The WeChat file upload failed (HTTP {status}).","\u5FAE\u4FE1\u6587\u4EF6\u4E0A\u4F20\u54CD\u5E94\u7F3A\u5C11\u4E0B\u8F7D\u53C2\u6570\u3002":"The WeChat file upload response is missing the download parameter.","\u5FAE\u4FE1\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\u3002":"The WeChat file upload failed.","\u62D2\u7EDD\u8BBF\u95EE\u4E0D\u53D7\u4FE1\u4EFB\u7684\u5FAE\u4FE1\u670D\u52A1\u5730\u5740\u3002":"Refusing to access an untrusted WeChat service URL.","\u5FAE\u4FE1\u670D\u52A1\u8BF7\u6C42\u5931\u8D25\uFF08HTTP {status}\uFF09\u3002":"The WeChat service request failed (HTTP {status}).","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u89E3\u6790\u7684\u54CD\u5E94\u3002":"The WeChat service returned an unparseable response.","\u5FAE\u4FE1\u670D\u52A1\u8BF7\u6C42\u8D85\u65F6\u3002":"The WeChat service request timed out.","\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u5FAE\u4FE1\u670D\u52A1\u3002":"The WeChat service is temporarily unreachable.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u626B\u7801\u72B6\u6001\u3002":"The WeChat service returned an unrecognized QR-code status.","\u5FAE\u4FE1\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u4E8C\u7EF4\u7801\u4EE4\u724C\u3002":"The WeChat service did not return a QR-code token.","\u5FAE\u4FE1\u670D\u52A1\u62D2\u7EDD\u4E86\u56DE\u590D\u6D88\u606F\u3002":"The WeChat service rejected the reply message.","\u5FAE\u4FE1\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u4E0A\u4F20\u8BF7\u6C42\u3002":"The WeChat service rejected the file upload request.","\u5FAE\u4FE1\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u6D88\u606F\u3002":"The WeChat service rejected the file message.","\u5FAE\u4FE1\u8D26\u53F7\u8FDE\u63A5\u542F\u52A8\u5931\u8D25\u3002":"Failed to start the WeChat account connection."};var tY={Slack\u673A\u5668\u4EBA:"Slack bot","Slack\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u63A5\u5165\u3002":"Slack bot credentials are missing. Remove the bot and connect it again.","Slack Socket Mode \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The Slack Socket Mode connection is not ready yet. The plugin will retry automatically.","Slack\u673A\u5668\u4EBA\u5DF2\u63A5\u5165\uFF0CSocket Mode \u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"The Slack bot is connected, but the Socket Mode connection is not ready yet.","Slack Socket Mode \u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u68C0\u67E5\u4E24\u4E2A Token\u3002":"The Slack Socket Mode connection is still not ready. Check both tokens.",Slack\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5:"The Slack bot is not connected yet","Slack Socket Mode \u957F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The Slack Socket Mode long-lived connection is running normally","Slack\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The Slack connection is not ready. The plugin will retry automatically",Slack\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF:"The Slack connection is currently offline","Slack \u672A\u6388\u6743\u673A\u5668\u4EBA\u8BFB\u53D6\u8BE5\u6587\u4EF6\u3002\u8BF7\u4E3A\u5E94\u7528\u6DFB\u52A0 files:read \u540E\u91CD\u65B0\u5B89\u88C5\uFF0C\u518D\u91CD\u65B0\u53D1\u9001\u56FE\u7247\u3002":"Slack has not granted the bot access to this file. Add the files:read scope to the app, reinstall it, then send the image again.","Slack Bot Token \u5FC5\u987B\u4EE5 xoxb- \u5F00\u5934\u3002":"The Slack Bot Token must start with xoxb-.","Slack App Token \u5FC5\u987B\u4EE5 xapp- \u5F00\u5934\u3002":"The Slack App Token must start with xapp-.","Slack Bot Token \u6CA1\u6709\u8FD4\u56DE\u5B8C\u6574\u7684\u673A\u5668\u4EBA\u8EAB\u4EFD\u3002":"The Slack Bot Token did not return a complete bot identity.","Slack App Token \u65E0\u6CD5\u521B\u5EFA Socket Mode \u8FDE\u63A5\uFF0C\u8BF7\u786E\u8BA4\u5DF2\u542F\u7528 Socket Mode \u548C connections:write\u3002":"The Slack App Token could not create a Socket Mode connection. Make sure Socket Mode and connections:write are enabled."};var rY={\u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD:"Start a brand-new Session",\u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587:"Compact the earlier context of the current Session",\u5207\u6362\u5DE5\u4F5C\u533A:"Switch Workspace",\u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84:"List Workspace absolute paths","\u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898":"List Session IDs and titles",\u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD:"Bind the current chat to a specific Session",\u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B:"List all available models by number",\u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B:"View or switch the model of the current Session","\u5217\u51FA\u53EF\u7528 Agent Preset":"List available Agent Presets","\u67E5\u770B\u6216\u8BBE\u7F6E\u65B0\u4F1A\u8BDD Agent Preset":"View or set the Agent Preset for new Sessions",\u505C\u6B62\u5F53\u524D\u4EFB\u52A1:"Stop the current task",\u7EA0\u504F\u5F53\u524D\u4EFB\u52A1:"Steer the current task",\u68C0\u67E5\u8FDE\u63A5\u72B6\u6001:"Check connection status",\u67E5\u770B\u63D2\u4EF6\u7248\u672C:"Show plugin version",\u663E\u793A\u5E2E\u52A9:"Show help","\u8BE5 Telegram \u673A\u5668\u4EBA\u5DF2\u914D\u7F6E Webhook\uFF0C\u8BF7\u5148\u5728\u539F\u670D\u52A1\u4E2D\u79FB\u9664 Webhook \u540E\u91CD\u8BD5\u3002":"This Telegram bot already has a Webhook configured. Remove the Webhook from the original service and try again.",Telegram\u673A\u5668\u4EBA:"Telegram Bot"," Bot API \u957F\u8F6E\u8BE2":" Bot API long polling"};var iY={"Discord Bot Token \u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\u3002":"The Discord Bot Token is invalid. Please enter it again.","Discord Gateway Intents \u914D\u7F6E\u4E0D\u6B63\u786E\uFF0C\u8BF7\u68C0\u67E5 Developer Portal \u7684 Bot \u8BBE\u7F6E\u3002":"The Discord Gateway Intents are misconfigured. Please check the Bot settings in the Developer Portal.",Discord\u673A\u5668\u4EBA:"Discord Bot"," Gateway \u957F\u8FDE\u63A5":" Gateway long-lived connection"};var aY={"WhatsApp \u5173\u8054\u8BBE\u5907\u5DF2\u5931\u6548\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The WhatsApp linked device is no longer valid. Remove it and scan the QR code again.","WhatsApp \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The WhatsApp connection is not ready yet; the plugin will retry automatically.","WhatsApp \u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The WhatsApp connection is still not ready. Please try again later.",WhatsApp\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5:"The WhatsApp bot is not connected yet",WhatsApp\u673A\u5668\u4EBA:"WhatsApp bot","WhatsApp Web \u5173\u8054\u8BBE\u5907\u8FD0\u884C\u6B63\u5E38":"The WhatsApp Web linked device is working normally","WhatsApp \u8FDE\u63A5\u672A\u5C31\u7EEA":"The WhatsApp connection is not ready","WhatsApp \u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF":"The WhatsApp connection is currently offline","WhatsApp \u5DF2\u7ED1\u5B9A\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"WhatsApp is linked, but the messaging connection is not ready yet.","WhatsApp \u5DF2\u626B\u7801\uFF0C\u4F46\u65E0\u6CD5\u4FDD\u5B58\u5173\u8054\u8BBE\u5907\u3002":"The QR code was scanned, but the linked device could not be saved.","\u65E0\u6CD5\u8FDE\u63A5 WhatsApp\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"Unable to connect to WhatsApp. Please generate a new QR code.",WhatsApp\u8D26\u53F7:"WhatsApp account"," Web \u5173\u8054\u8BBE\u5907":" Web linked device"};var oY={"AI Office \u62D2\u7EDD\u4E86 Device Token\u3002":"AI Office rejected the Device Token.","AI Office Connector Hook \u5C1A\u672A\u5C31\u7EEA\u3002":"The AI Office Connector Hook is not ready yet.","AI Office Connector \u534F\u8BAE\u7248\u672C\u4E0D\u517C\u5BB9\u3002":"The AI Office Connector protocol version is incompatible.","\u672C\u673A\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE AI Office\u3002":"This machine cannot reach AI Office right now.","AI Office \u8FDE\u63A5\u5DF2\u4E2D\u65AD\u3002":"The AI Office connection was interrupted.","\u672C\u673A Harness \u5DF2\u505C\u6B62\u8FD9\u6B21\u6267\u884C\u3002":"The local Harness stopped this run.","Office Job \u5DF2\u88AB\u9886\u53D6\u3001\u53D6\u6D88\u6216\u7ED3\u675F\u3002":"The Office Job has already been claimed, cancelled, or finished.","\u672C\u673A Harness \u672A\u80FD\u5B8C\u6210\u4EFB\u52A1\uFF1B\u8BF7\u68C0\u67E5 Harness \u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002":"The local Harness could not complete the task; check the Harness Session and try again.","Office Job \u5F15\u7528\u4E86\u672C\u673A\u672A\u914D\u7F6E\u7684 Workspace/Preset alias\u3002":"The Office Job references a Workspace/Preset alias that is not configured locally.","\u4F60\u6B63\u5728\u672C\u673A DeepSeek Harness \u4E2D\u7EE7\u7EED\u4E00\u4E2A\u6765\u81EA AI Office \u7684\u4EFB\u52A1\u3002":"You are continuing an AI Office task inside the local DeepSeek Harness.","\u53EA\u5728\u5F53\u524D Workspace \u5185\u884C\u52A8\u3002\u5B8C\u6210\u540E\u5FC5\u987B\u8FD4\u56DE\uFF1A\u7ED3\u679C\u6458\u8981\u3001\u6539\u52A8\u6587\u4EF6\u3001\u9A8C\u8BC1\u8BC1\u636E\u3001\u672A\u89E3\u51B3\u98CE\u9669\u3002":"Act only within the current Workspace. When finished you must return: a result summary, changed files, verification evidence, and unresolved risks.","## \u672C\u673A Instruction Preset":"## Local Instruction Preset","## \u672C\u8F6E\u8865\u5145\u6307\u4EE4":"## Additional Instructions for This Round","## Office \u65F6\u95F4\u7EBF":"## Office Timeline","\u6279\u51C6 {tool}":"Approve {tool}","Harness \u5DE5\u5177":"Harness tool","Harness \u9700\u8981 {count} \u9879\u8865\u5145\u4FE1\u606F":"Harness needs {count} pieces of additional information","\u5DF2\u9886\u53D6 Job\uFF0C\u51C6\u5907 Workspace alias\uFF1A{alias}":"Job claimed; preparing Workspace alias: {alias}","Harness Session \u5DF2\u521B\u5EFA\u3002":"Harness Session created.","\u6B63\u5728\u4F7F\u7528 {tool}\u2026":"Using {tool}\u2026"};var nY=Object.freeze(Object.assign({},zx,Vx,Wx,Zx,Xx,$x,eY,AY,tY,rY,iY,aY,oY));var sY="zh";function gY(n){let t=typeof n=="string"?n.trim().toLowerCase():"";sY=t==="english"||/^en(?:[-_].*)?$/u.test(t)?"en":"zh"}function w(n,t){if(typeof n!="string")return n;let o=sY==="en"?nY[n]??n:n;return t==null?o:o.replace(/\{(\w+)\}/g,(a,e)=>Object.hasOwn(t,e)?String(t[e]):a)}var O_=Object.freeze({version:1,bots:Object.freeze([])}),dpe=new Set(["clientId","secretRef","approvedSenders"]);function mn(n){return typeof n=="string"&&n.trim()?n.trim():null}function ppe(n){return npe("sha256").update(n).digest("hex")}function lY(n){let t=mn(n);return t&&/^dt_[a-f0-9]{24}$/.test(t)?t:null}function hpe(n){let t=mn(n);return t&&/^DSH_DINGTALK_BOT_SECRET_[A-F0-9]{24}$/.test(t)?t:null}function Epe(n){let t=mn(n);return t&&/^dt_sender_[a-f0-9]{32}$/.test(t)?t:null}function upe(n){let t=typeof n=="string"?{staffId:n}:n;if(!t||typeof t!="object"||Array.isArray(t))return null;let o=Epe(t.senderKey),a=mn(t.staffId);return!o||!a?null:Object.freeze({senderKey:o,staffId:a,displayName:mn(t.displayName),approvedAt:mn(t.approvedAt)})}function Cpe(n){if(!Array.isArray(n))return null;let t=n.map(upe);if(t.some(e=>e===null))return null;let o=new Set,a=new Set;for(let e of t){if(o.has(e.staffId)||a.has(e.senderKey))return null;o.add(e.staffId),a.add(e.senderKey)}return Object.freeze(t)}function KQ(n){let t=mn(n);if(!t)throw new TypeError("clientId is required");let o=ppe(t).slice(0,24);return Object.freeze({botId:`dt_${o}`,secretRef:`DSH_DINGTALK_BOT_SECRET_${o.toUpperCase()}`})}function dY(){return`dt_sender_${IY().replaceAll("-","")}`}function b_(n){return mn(n)?w("\u8EAB\u4EFD\u5DF2\u9690\u85CF"):w("\u9489\u9489\u7528\u6237")}function M_(n){let t=mn(n);return t?t.length<=8?`${t.slice(0,2)}\u2022\u2022\u2022\u2022`:`${t.slice(0,4)}\u2022\u2022\u2022\u2022${t.slice(-4)}`:w("\u9489\u9489\u673A\u5668\u4EBA")}function pY(n,{stored:t=!1}={}){if(!n||typeof n!="object"||Array.isArray(n)||"clientSecret"in n||"client_secret"in n||"deviceCode"in n||t&&Object.keys(n).some(r=>!dpe.has(r)))return null;let o=mn(n.clientId),a=hpe(n.secretRef),e=Cpe(n.approvedSenders??[]);if(!o||!a||!e)return null;let i=KQ(o);return i.secretRef!==a||(n.botId===void 0?i.botId:lY(n.botId))!==i.botId?null:Object.freeze({botId:i.botId,clientId:o,secretRef:a,approvedSenders:e})}function Bpe(n){if(!n||n.version!==1||!Array.isArray(n.bots))return null;let t=n.bots.map(i=>pY(i,{stored:!0}));if(t.some(i=>i===null))return null;let o=new Set,a=new Set,e=new Set;for(let i of t){if(o.has(i.botId)||a.has(i.clientId)||e.has(i.secretRef))return null;o.add(i.botId),a.add(i.clientId),e.add(i.secretRef)}return Object.freeze({version:1,bots:Object.freeze(t)})}function fpe(n){return{version:1,bots:n.bots.map(t=>({clientId:t.clientId,secretRef:t.secretRef,approvedSenders:t.approvedSenders.map(o=>({senderKey:o.senderKey,staffId:o.staffId,displayName:o.displayName,approvedAt:o.approvedAt}))}))}}var HQ=class{#e;#A=O_;#t=Promise.resolve();constructor(t){if(!mn(t))throw new TypeError("config path is required");this.#e=t}async load(){try{let t=Bpe(JSON.parse(await gpe(this.#e,"utf8")));if(!t)throw new Error("dsh-dingtalk config contains invalid bot data");this.#A=t}catch(t){if(t?.code!=="ENOENT")throw t;this.#A=O_}return this}list(){return structuredClone(this.#A.bots)}get(t){let o=this.#A.bots.find(a=>a.botId===t);return o?structuredClone(o):null}getByClientId(t){let o=this.#A.bots.find(a=>a.clientId===t);return o?structuredClone(o):null}async save(t){let o=pY(t);if(!o)throw new Error("Refusing to persist invalid dsh-dingtalk bot data");return this.#r(a=>{if(a.find(A=>(A.clientId===o.clientId||A.secretRef===o.secretRef)&&A.botId!==o.botId))throw new Error("Duplicate DingTalk bot identity");let i=a.findIndex(A=>A.botId===o.botId);return i===-1?a.push(o):a[i]=o,structuredClone(o)})}async remove(t){if(!lY(t))throw new TypeError("Invalid DingTalk bot id");return this.#r(o=>{let a=o.findIndex(i=>i.botId===t);if(a===-1)return null;let[e]=o.splice(a,1);return structuredClone(e)})}async clear(){let t=this.#t.then(async()=>{try{await cY(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#A=O_});this.#t=t.then(()=>{},()=>{}),await t}async#r(t){let o,a=this.#t.then(async()=>{let e=[...this.#A.bots];o=t(e);let i=Object.freeze({version:1,bots:Object.freeze(e)});await this.#I(i),this.#A=i});return this.#t=a.then(()=>{},()=>{}),await a,o}async#I(t){await spe(lpe(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.${process.pid}.${IY()}.tmp`;try{await Ipe(o,`${JSON.stringify(fpe(t),null,2)} -`,{encoding:"utf8",flag:"wx",mode:384}),await cpe(o,this.#e)}catch(a){try{await cY(o)}catch(e){if(e?.code!=="ENOENT")throw new AggregateError([a,e])}throw a}}};var EY="https://oapi.dingtalk.com",Qpe="DING_DWS_CLAW";function Sn(n){return typeof n=="string"&&n.trim()?n.trim():null}function hY(n,t){let o=Number(n);return Number.isFinite(o)&&o>0?o:t}function ype(n){let t;try{t=new URL(Sn(n)??EY)}catch{throw new TypeError("DingTalk registration base URL must be a valid HTTPS URL")}let o=t.hostname==="dingtalk.com"||t.hostname.endsWith(".dingtalk.com");if(t.protocol!=="https:"||t.port||!o||t.username||t.password||t.search||t.hash)throw new TypeError("DingTalk registration base URL must be a valid HTTPS URL");return t.pathname=t.pathname.replace(/\/+$/,""),t.href.replace(/\/$/,"")}function mpe(n){let t=typeof n?.now=="function"?n.now():n();if(!Number.isFinite(t))throw new TypeError("clock must return a finite timestamp");return t}function Spe(n,t){if(!n||typeof n!="object"||Array.isArray(n))throw new cs("invalid-response",`DingTalk ${t} returned an invalid response`,t);if(Number(n.errcode)!==0)throw new cs("api-error",`DingTalk ${t} request was rejected`,t);return n}var cs=class extends Error{constructor(t,o,a,e={}){super(o,e),this.name="DingtalkDeviceAuthError",this.code=t,this.action=a}},xQ=class{#e;#A;#t;#r;constructor({fetch:t=globalThis.fetch,clock:o=Date,baseUrl:a=EY,timeoutMs:e=15e3}={}){if(typeof t!="function")throw new TypeError("fetch is required");if(typeof o!="function"&&typeof o?.now!="function")throw new TypeError("clock must be a function or expose now()");if(!Number.isFinite(e)||e<=0)throw new TypeError("timeoutMs must be a positive number");this.#e=t,this.#A=o,this.#t=ype(a),this.#r=e}async start({signal:t}={}){let o=await this.#I("/app/registration/init",{source:Qpe},"initialization",t),a=Sn(o.nonce);if(!a)throw new cs("missing-nonce","DingTalk registration initialization did not return a nonce","initialization");let e=await this.#I("/app/registration/begin",{nonce:a},"begin",t),i=Sn(e.device_code),A=Sn(e.verification_uri_complete);if(!i||!A)throw new cs("incomplete-registration","DingTalk registration did not return complete QR metadata","begin");let r=hY(e.expires_in,7200),s=hY(e.interval,5)*1e3;return Object.freeze({deviceCode:i,verificationUrl:A,verificationUri:Sn(e.verification_uri),userCode:Sn(e.user_code),expiresAt:mpe(this.#A)+r*1e3,pollIntervalMs:s})}async poll(t){let o=Sn(typeof t=="string"?t:t?.deviceCode),a=typeof t=="object"?t?.signal:void 0;if(!o)throw new TypeError("deviceCode is required");let e=await this.#I("/app/registration/poll",{device_code:o},"poll",a),i=Sn(e.status)?.toUpperCase(),A=["WAITING","SUCCESS","FAIL","EXPIRED"].includes(i)?i:"UNKNOWN";return Object.freeze({status:A,clientId:Sn(e.client_id),clientSecret:Sn(e.client_secret),failReason:Sn(e.fail_reason)})}async#I(t,o,a,e){let i,A=AbortSignal.timeout(this.#r),r=e?AbortSignal.any([e,A]):A;try{i=await this.#e(`${this.#t}${t}`,{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify(o),redirect:"error",signal:r})}catch(g){throw e?.aborted?e.reason??g:A.aborted?new cs("timeout",`DingTalk ${a} request timed out`,a,{cause:g}):g?.name==="AbortError"?g:new cs("network-error",`DingTalk ${a} request could not be completed`,a,{cause:g})}if(!i||i.ok===!1||typeof i.json!="function")throw new cs("http-error",`DingTalk ${a} request failed`,a);let s;try{s=await i.json()}catch(g){throw new cs("invalid-json",`DingTalk ${a} returned invalid JSON`,a,{cause:g})}return Spe(s,a)}};import{randomUUID as Jpe}from"node:crypto";var uY=new WeakMap,__=Symbol("dsh-im.connection-test-state-identity");function CY(n){return n?.[__]??n}function wpe(n){return typeof n=="string"&&n.trim()?n.trim():null}function To(n,t){if(!n||!t||typeof t!="object")return!1;try{return uY.set(CY(n),structuredClone(t)),!0}catch{return!1}}function ou(n){let t=n?uY.get(CY(n)):null;return t?structuredClone(t):null}function Ki(n,t=w("\u673A\u5668\u4EBA")){let o=wpe(n)??t;return`${w("\u2705 DeepSeek Harness \u8FDE\u63A5\u6D4B\u8BD5\u6210\u529F")} -${w("\u8FD9\u6761\u6D88\u606F\u7531\u300CIM\u673A\u5668\u4EBA\u300D\u8BBE\u7F6E\u9875\u4E2D\u7684\u201C{name}\u201D\u673A\u5668\u4EBA\u5361\u7247\u53D1\u51FA\u3002",{name:o})}`}function Qr(n=w("\u673A\u5668\u4EBA")){let t=new Error(w("{channelLabel}\u5C1A\u672A\u6536\u5230\u53EF\u7528\u4E8E\u6D4B\u8BD5\u7684\u79C1\u804A\u6D88\u606F\u3002",{channelLabel:n}));return t.code="test-target-unavailable",t}async function yc({state:n,send:t,text:o,channelLabel:a}){let e=ou(n);if(!e)throw Qr(a);return await t(e,o),{sent:!0}}function dr(n){return Object.freeze(n?{sent:!1,code:n?.code==="test-target-unavailable"?"test-target-unavailable":"test-message-failed"}:{sent:!0})}import{randomUUID as Dpe}from"node:crypto";var Ope=Object.freeze({AUTH:"MODEL_AUTH",MISSING_CREDENTIAL:"MODEL_AUTH",INVALID_CREDENTIAL:"MODEL_AUTH",QUOTA:"MODEL_QUOTA",RATE_LIMIT:"MODEL_RATE_LIMIT",CONTEXT_WINDOW_EXCEEDED:"MODEL_CONTEXT_LIMIT",UNKNOWN_MODEL:"MODEL_UNAVAILABLE",NO_ADAPTER:"MODEL_UNAVAILABLE",UNSUPPORTED_OPTION:"MODEL_CONFIG",UNSUPPORTED_REASONING_EFFORT:"MODEL_CONFIG",TIMEOUT:"MODEL_TIMEOUT",TRANSPORT:"MODEL_TRANSPORT",SERVER:"MODEL_SERVICE",STREAM_CLOSED:"MODEL_STREAM",MALFORMED_RESPONSE:"MODEL_STREAM",EMPTY_RESPONSE:"MODEL_EMPTY_REPLY",CONTENT_FILTER:"MODEL_CONTENT_REJECTED",UNSUPPORTED_CONTENT:"MODEL_CONFIG"}),bpe=Object.freeze({HARNESS_CONNECT:"\u65E0\u6CD5\u8FDE\u63A5\u5904\u7406\u670D\u52A1\uFF0C\u6D88\u606F\u5C1A\u672A\u63D0\u4EA4\u3002\u8BF7\u786E\u8BA4 DeepSeek Harness \u6B63\u5728\u8FD0\u884C\u540E\u91CD\u8BD5\u3002",HARNESS_TIMEOUT:"\u5904\u7406\u670D\u52A1\u54CD\u5E94\u8D85\u65F6\uFF0C\u6D88\u606F\u5C1A\u672A\u5F00\u59CB\u5904\u7406\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",HARNESS_RESULT_UNCERTAIN:"\u6682\u65F6\u65E0\u6CD5\u786E\u8BA4\u4EFB\u52A1\u72B6\u6001\uFF0C\u4EFB\u52A1\u53EF\u80FD\u5DF2\u7ECF\u5F00\u59CB\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",HARNESS_ACCESS:"\u5904\u7406\u670D\u52A1\u62D2\u7EDD\u4E86\u673A\u5668\u4EBA\u8FDE\u63A5\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5 Harness \u5730\u5740\u3001\u4EE3\u7406\u6216\u8BBF\u95EE\u914D\u7F6E\u540E\u91CD\u8BD5\u3002",HARNESS_PROTOCOL:"\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u7684\u63A5\u53E3\u4E0D\u517C\u5BB9\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5 Harness \u5730\u5740\u5E76\u66F4\u65B0\u76F8\u5173\u7248\u672C\u3002",HARNESS_SERVICE:"DeepSeek Harness \u6682\u65F6\u65E0\u6CD5\u5B8C\u6210\u8BF7\u6C42\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_REPLY_TIMEOUT:"\u7B49\u5F85\u6A21\u578B\u56DE\u590D\u8D85\u65F6\uFF0C\u4EFB\u52A1\u53EF\u80FD\u4ECD\u5728\u8FD0\u884C\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",MODEL_AUTH:"\u6A21\u578B\u51ED\u636E\u7F3A\u5931\u6216\u5DF2\u5931\u6548\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5\u6A21\u578B\u914D\u7F6E\u540E\u91CD\u8BD5\u3002",MODEL_QUOTA:"\u6A21\u578B\u989D\u5EA6\u6216\u4F59\u989D\u4E0D\u8DB3\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7BA1\u7406\u5458\u8865\u5145\u989D\u5EA6\u6216\u5207\u6362\u6A21\u578B\u540E\u91CD\u8BD5\u3002",MODEL_RATE_LIMIT:"\u6A21\u578B\u670D\u52A1\u6B63\u5728\u9650\u6D41\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_CONTEXT_LIMIT:"\u5F53\u524D\u4F1A\u8BDD\u5185\u5BB9\u8D85\u8FC7\u6A21\u578B\u4E0A\u4E0B\u6587\u4E0A\u9650\u3002\u8BF7\u53D1\u9001 /compact \u6216 /new \u540E\u91CD\u8BD5\u3002",MODEL_UNAVAILABLE:"\u5F53\u524D\u6A21\u578B\u4E0D\u5B58\u5728\u6216\u4E0D\u652F\u6301\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u53D1\u9001 /models\uFF0C\u5E76\u4F7F\u7528 /model \u91CD\u65B0\u9009\u62E9\u3002",MODEL_CONFIG:"\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u8FD9\u7C7B\u5185\u5BB9\u6216\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u8C03\u6574\u5185\u5BB9\u3001\u6A21\u578B\u6216\u63A8\u7406\u7B49\u7EA7\u540E\u91CD\u8BD5\u3002",MODEL_TIMEOUT:"\u6A21\u578B\u670D\u52A1\u54CD\u5E94\u8D85\u65F6\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_TRANSPORT:"\u6682\u65F6\u65E0\u6CD5\u8FDE\u63A5\u6A21\u578B\u670D\u52A1\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_SERVICE:"\u6A21\u578B\u670D\u52A1\u6682\u65F6\u5F02\u5E38\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_STREAM:"\u6A21\u578B\u56DE\u590D\u4E2D\u65AD\u6216\u683C\u5F0F\u5F02\u5E38\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u3002",MODEL_EMPTY_REPLY:"\u6A21\u578B\u6CA1\u6709\u8FD4\u56DE\u53EF\u663E\u793A\u7684\u5185\u5BB9\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5207\u6362\u6A21\u578B\u3002",MODEL_CONTENT_REJECTED:"\u6A21\u578B\u62D2\u7EDD\u5904\u7406\u5F53\u524D\u5185\u5BB9\u3002\u8BF7\u8C03\u6574\u95EE\u9898\u5185\u5BB9\u540E\u91CD\u8BD5\u3002",MODEL_OUTPUT_LIMIT:"\u6A21\u578B\u8FBE\u5230\u8F93\u51FA\u957F\u5EA6\u4E0A\u9650\uFF0C\u4F46\u6CA1\u6709\u751F\u6210\u53EF\u663E\u793A\u7684\u7ED3\u679C\u3002\u8BF7\u7F29\u5C0F\u4EFB\u52A1\u8303\u56F4\u540E\u91CD\u8BD5\u3002",TURN_BLOCKED:"\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u65E0\u6CD5\u5728\u5F53\u524D\u6E20\u9053\u5B8C\u6210\u7684\u64CD\u4F5C\u3002\u8BF7\u5728 DeepSeek Harness \u4E2D\u5904\u7406\u540E\u518D\u8BD5\u3002",TURN_INTERRUPTED:"\u4EFB\u52A1\u88AB\u610F\u5916\u4E2D\u65AD\uFF0C\u672C\u6B21\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u3002",SESSION_NOT_FOUND:"\u5F53\u524D\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\u3002\u8BF7\u53D1\u9001 /new \u521B\u5EFA\u65B0\u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002",SESSION_BUSY:"\u5F53\u524D\u4F1A\u8BDD\u4ECD\u5728\u5904\u7406\u4E0A\u4E00\u9879\u4EFB\u52A1\u3002\u8BF7\u7B49\u5F85\u5B8C\u6210\uFF0C\u6216\u53D1\u9001 /stop \u540E\u91CD\u8BD5\u3002",SESSION_STALE:"\u5DE5\u4F5C\u533A\u6216\u4F1A\u8BDD\u72B6\u6001\u521A\u521A\u53D1\u751F\u53D8\u5316\u3002\u8BF7\u91CD\u65B0\u53D1\u9001\u8FD9\u6761\u6D88\u606F\u3002",WORKSPACE_UNAVAILABLE:"\u5F53\u524D\u5DE5\u4F5C\u533A\u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u91CD\u65B0\u9009\u62E9\u5DE5\u4F5C\u533A\u540E\u91CD\u8BD5\u3002",PRESET_UNAVAILABLE:"\u5F53\u524D Agent Preset \u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u53D1\u9001 /presetlist \u540E\u91CD\u65B0\u9009\u62E9\u3002",CHANNEL_PERMISSION:"\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u673A\u5668\u4EBA\u6CA1\u6709\u53D1\u9001\u6743\u9650\u3002\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u68C0\u67E5\u6E20\u9053\u6743\u9650\u6216\u91CD\u65B0\u7ED1\u5B9A\u673A\u5668\u4EBA\u3002",CHANNEL_RATE_LIMIT:"\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6B63\u5728\u9650\u6D41\uFF0C\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",CHANNEL_DELIVERY_UNCERTAIN:"\u56DE\u590D\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\u3002\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u7ECF\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",CHANNEL_DELIVERY:"\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",INPUT_INVALID:"\u5F53\u524D\u6D88\u606F\u5305\u542B\u65E0\u6CD5\u5904\u7406\u7684\u56FE\u7247\u6216\u6587\u4EF6\u3002\u8BF7\u8C03\u6574\u540E\u91CD\u65B0\u53D1\u9001\u3002",INTERNAL_UNKNOWN:"\u4EFB\u52A1\u672A\u5B8C\u6210\uFF0C\u6682\u65F6\u65E0\u6CD5\u786E\u5B9A\u539F\u56E0\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5C06\u53C2\u8003\u53F7\u63D0\u4F9B\u7ED9\u7BA1\u7406\u5458\u3002"});function Mpe(n){if(n?.code!=="harness-turn-failed")return null;let t=n?.providerCode??n?.details?.providerCode;return typeof t!="string"?null:Ope[t.trim().toUpperCase()]??null}function _pe(n){let t=typeof n?.code=="string"?n.code:"",o=Mpe(n);if(o)return o;if(t==="harness-connect-failed")return["session.prompt","session.history"].includes(n?.method)?"HARNESS_RESULT_UNCERTAIN":"HARNESS_CONNECT";if(t==="harness-timeout")return["session.prompt","session.history"].includes(n?.method)?"HARNESS_RESULT_UNCERTAIN":"HARNESS_TIMEOUT";if(t==="harness-reply-timeout")return"MODEL_REPLY_TIMEOUT";if(["harness-auth-required","harness-proxy-auth-required","harness-loopback-forbidden","harness-host-untrusted","harness-request-forbidden"].includes(t))return"HARNESS_ACCESS";if(["harness-api-not-found","harness-response-invalid"].includes(t))return"HARNESS_PROTOCOL";if(t==="harness-turn-failed")return"INTERNAL_UNKNOWN";if(["harness-http-failed","harness-rpc-rejected"].includes(t))return"HARNESS_SERVICE";if(t==="model-empty-response")return"MODEL_EMPTY_REPLY";if(t==="model-max-tokens")return"MODEL_OUTPUT_LIMIT";if(t==="turn-blocked")return"TURN_BLOCKED";if(["turn-interrupted","turn-aborted"].includes(t))return"TURN_INTERRUPTED";if(t==="session-not-found")return"SESSION_NOT_FOUND";if(t==="agent-busy")return"SESSION_BUSY";if(t==="workspace-session-stale")return"SESSION_STALE";if(t.startsWith("workspace-"))return"WORKSPACE_UNAVAILABLE";if(t.startsWith("agent-preset-"))return"PRESET_UNAVAILABLE";if(t.startsWith("image-")||t.startsWith("inbound-file-")||t==="attachment-error")return"INPUT_INVALID";let a=Number(n?.status??n?.httpStatus);return a===401||a===403||["channel-permission","permission-required","artifact-permission-required","forbidden","stale-token"].includes(t)?"CHANNEL_PERMISSION":a===429||["channel-rate-limit","rate-limited","artifact-rate-limited"].includes(t)?"CHANNEL_RATE_LIMIT":["channel-delivery-uncertain","delivery-uncertain","artifact-delivery-uncertain"].includes(t)?"CHANNEL_DELIVERY_UNCERTAIN":t==="channel-delivery-failed"||t.startsWith("artifact-")||["network-error","timeout"].includes(t)?"CHANNEL_DELIVERY":"INTERNAL_UNKNOWN"}function Tpe(n){return typeof n=="string"&&/^[A-Z0-9-]{6,40}$/u.test(n)?n:`MF-${Dpe().slice(0,8).toUpperCase()}`}function Npe(n){return typeof n!="string"||!/^[A-Za-z0-9_-]{1,64}$/u.test(n)?null:n.toUpperCase().replaceAll("-","_")}function Rpe(n,{userMessage:t,reason:o,referenceId:a,at:e=Date.now()}={}){let i=Npe(o),A=_pe(n),r=A==="INTERNAL_UNKNOWN"&&i&&typeof t=="string"&&t.trim()?"INPUT_INVALID":A;return Object.freeze({code:r,reason:i??r,message:typeof t=="string"&&t.trim()?t.trim():w(bpe[r]),referenceId:Tpe(a),at:Number.isFinite(e)?e:Date.now()})}function ut(n){return`${n.message} +{operation}`,"\u2705 \u6279\u51C6":"\u2705 Approve","\u274C \u62D2\u7EDD":"\u274C Reject","\u{1F510} \u5DE5\u5177\u5BA1\u6279":"\u{1F510} Tool approval","\u2753 \u8BF7\u8865\u5145\u4FE1\u606F{progress}":"\u2753 Please provide more information{progress}"};var Xx={"\u5DF2\u8FDE\u63A5 DeepSeek Harness\uFF0C\u6B63\u5728\u601D\u8003\u2026":"Connected to DeepSeek Harness, thinking\u2026","\u9489\u9489\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"The DingTalk bot is connected to DeepSeek Harness.","\u9489\u9489\u672A\u80FD\u6362\u53D6\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\uFF1B\u82E5\u6301\u7EED\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u673A\u5668\u4EBA\u7684\u201C\u4F01\u4E1A\u5185\u673A\u5668\u4EBA\u53D1\u9001\u6D88\u606F\u6743\u9650\u201D\u3002":`DingTalk could not provide the image download address. Please resend; if it keeps failing, check the bot's "Send messages as an internal robot" permission.`,"\u9489\u9489\u6CA1\u6709\u8FD4\u56DE\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002":"DingTalk did not return an image download address. Please resend.","\u9489\u9489\u8FD4\u56DE\u7684\u56FE\u7247\u4E34\u65F6\u5730\u5740\u65E0\u6CD5\u8BFB\u53D6\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002":"The temporary image address returned by DingTalk could not be read. Please resend.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\uFF0C\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u8BD5\u3002":'Delivery of the result file "{name}" could not be confirmed. Please check whether it already arrived in the chat before retrying.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u9489\u9489\u5E94\u7528\u6216\u673A\u5668\u4EBA\u7F3A\u5C11\u6587\u4EF6\u6D88\u606F\u6743\u9650\u3002\u8BF7\u5F00\u901A\u5E94\u7528 qyapi_base \u6743\u9650\uFF0C\u5E76\u786E\u8BA4\u673A\u5668\u4EBA\u5177\u5907\u6587\u4EF6\u6D88\u606F\u53D1\u9001\u80FD\u529B\u3002":`Result file "{name}" was generated, but the DingTalk app or bot lacks file message permission. Enable the app's qyapi_base permission and make sure the bot can send file messages.`,"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u9489\u9489\u673A\u5668\u4EBA\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'Result file "{name}" exceeds the file size limit of the current DingTalk bot and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u9489\u9489\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'Result file "{name}" was rate-limited by DingTalk and could not be sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u9489\u9489\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6D88\u606F\uFF0C\u8BF7\u68C0\u67E5\u6587\u4EF6\u7C7B\u578B\u548C\u673A\u5668\u4EBA\u6587\u4EF6\u6D88\u606F\u914D\u7F6E\u3002":`Result file "{name}" was generated, but DingTalk rejected the file message. Check the file type and the bot's file message configuration.`,"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7\u9489\u9489\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'Result file "{name}" was generated but could not be sent via DingTalk right now. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u5DF2\u751F\u6210\u3002":"The result file has been generated.","\u9489\u9489\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The DingTalk bot is connected to DeepSeek Harness normally.","\u9489\u9489\u547D\u4EE4\u5904\u7406\u5931\u8D25\u3002":"Failed to process the DingTalk command.","\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002":"The DingTalk message has no safe reply address.","\u9489\u9489\u5BA1\u6279\u5904\u7406\u5931\u8D25\u3002":"Failed to process the DingTalk approval.","\u9489\u9489\u6D88\u606F\u5904\u7406\u5931\u8D25\u3002":"Failed to process the DingTalk message.","\u9489\u9489\u6D88\u606F\u683C\u5F0F\u65E0\u6548\u3002":"Invalid DingTalk message format.","\u9489\u9489\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the DingTalk interaction question.",\u9489\u9489\u7528\u6237:"DingTalk user",\u9489\u9489\u673A\u5668\u4EBA:"DingTalk bot",\u8EAB\u4EFD\u5DF2\u9690\u85CF:"Identity hidden","\u9489\u9489\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The DingTalk bot credentials are missing. Remove the bot and scan the QR code again.","\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The DingTalk connection is not ready. Please try again later.","\u9489\u9489\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The DingTalk connection is still not ready. Please try again later.","\u9489\u9489 Stream \u8FDE\u63A5\u5931\u8D25\uFF1A\u68C0\u6D4B\u5230\u4EE3\u7406\u4F9D\u8D56 agent-base 6.0.0\u3002":"The DingTalk Stream connection failed because proxy dependency agent-base 6.0.0 was detected.","\u8BF7\u5C06 DSH profile \u4E2D\u7684 agent-base@6 \u56FA\u5B9A\u4E3A 6.0.2 \u540E\u91CD\u65B0\u5B89\u88C5\u4F9D\u8D56\uFF0C\u6216\u5347\u7EA7 pnpm \u540E\u91CD\u65B0\u89E3\u6790 lockfile\u3002":"Pin agent-base@6 to 6.0.2 in the DSH profile and reinstall dependencies, or upgrade pnpm and re-resolve the lockfile.","\u63D2\u4EF6\u65E0\u6CD5\u8FDE\u63A5\u672C\u673A Harness\u3002":"The plugin could not connect to the local Harness.","\u8BF7\u786E\u8BA4 dsh web \u6B63\u5E38\u8FD0\u884C\uFF0C\u5E76\u67E5\u770B dsh web \u65E5\u5FD7\u4E2D\u76F8\u540C\u53C2\u8003\u53F7\u5BF9\u5E94\u7684\u8BCA\u65AD\u4FE1\u606F\u3002":"Make sure dsh web is running, then find the matching reference in the dsh web log.","\u9489\u9489 Stream SDK \u52A0\u8F7D\u5931\u8D25\u3002":"The DingTalk Stream SDK could not be loaded.","\u8BF7\u91CD\u65B0\u5B89\u88C5\u5F53\u524D DSH profile \u7684\u63D2\u4EF6\u4F9D\u8D56\uFF0C\u5E76\u67E5\u770B dsh web \u65E5\u5FD7\u4E2D\u76F8\u540C\u53C2\u8003\u53F7\u5BF9\u5E94\u7684\u8BCA\u65AD\u4FE1\u606F\u3002":"Reinstall plugin dependencies in the current DSH profile, then find the matching reference in the dsh web log.","\u9489\u9489\u62D2\u7EDD\u4E86\u5F53\u524D\u5E94\u7528\u51ED\u636E\u3002":"DingTalk rejected the current app credentials.","\u8BF7\u6838\u5BF9 Client ID\u3001Client Secret \u548C\u673A\u5668\u4EBA\u6743\u9650\u540E\u91CD\u8BD5\u3002":"Verify the app credentials and bot permissions, then try again.","\u8FDE\u63A5\u9489\u9489 Stream \u8D85\u65F6\u3002":"The DingTalk Stream connection timed out.","\u8BF7\u68C0\u67E5\u7F51\u7EDC\u3001\u4EE3\u7406\u548C\u9632\u706B\u5899\u540E\u91CD\u8BD5\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check the network, proxy, and firewall, then try again. Find details in the dsh web log using the reference.","\u65E0\u6CD5\u89E3\u6790\u9489\u9489\u670D\u52A1\u5730\u5740\u3002":"The DingTalk service address could not be resolved.","\u8BF7\u68C0\u67E5 DNS\u3001\u7F51\u7EDC\u548C\u4EE3\u7406\u8BBE\u7F6E\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check DNS, network, and proxy settings. Find details in the dsh web log using the reference.","\u9489\u9489 Stream \u7684 TLS \u8FDE\u63A5\u6821\u9A8C\u5931\u8D25\u3002":"TLS validation failed for the DingTalk Stream connection.","\u8BF7\u68C0\u67E5\u7CFB\u7EDF\u8BC1\u4E66\u3001\u4EE3\u7406\u8BC1\u4E66\u6216 HTTPS \u4E2D\u95F4\u4EE3\u7406\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check system certificates, proxy certificates, or the HTTPS interception proxy. Find details in the dsh web log using the reference.","\u9489\u9489 Stream \u65E0\u6CD5\u901A\u8FC7\u5F53\u524D\u4EE3\u7406\u5EFA\u7ACB\u8FDE\u63A5\u3002":"DingTalk Stream could not connect through the current proxy.","\u8BF7\u68C0\u67E5 HTTP_PROXY\u3001HTTPS_PROXY\u3001NO_PROXY \u548C\u4EE3\u7406\u8FDE\u901A\u6027\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check HTTP_PROXY, HTTPS_PROXY, NO_PROXY, and proxy connectivity. Find details in the dsh web log using the reference.","\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u5EFA\u7ACB\u5931\u8D25\u3002":"The DingTalk Stream message connection could not be established.","\u8BF7\u68C0\u67E5\u7F51\u7EDC\u548C\u673A\u5668\u4EBA\u914D\u7F6E\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check the network and bot configuration. Find details in the dsh web log using the reference.","\u9489\u9489 Stream \u6D88\u606F\u76D1\u542C\u521D\u59CB\u5316\u5931\u8D25\u3002":"DingTalk Stream message-listener initialization failed.","\u8BF7\u786E\u8BA4 dsh-im \u4E0E dingtalk-stream \u7248\u672C\u517C\u5BB9\uFF0C\u5E76\u6309\u53C2\u8003\u53F7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"Make sure dsh-im and dingtalk-stream are compatible, then inspect the dsh web log using the reference.","\u9489\u9489\u673A\u5668\u4EBA\u8FD0\u884C\u73AF\u5883\u521D\u59CB\u5316\u5931\u8D25\u3002":"The DingTalk bot runtime could not be initialized.","\u8BF7\u68C0\u67E5 DSH \u6570\u636E\u76EE\u5F55\u3001\u5DE5\u4F5C\u533A\u548C\u63D2\u4EF6\u4F9D\u8D56\uFF0C\u5E76\u6309\u53C2\u8003\u53F7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"Check the DSH data directory, workspace, and plugin dependencies, then inspect the dsh web log using the reference.","\u8BF7\u5728 dsh web \u65E5\u5FD7\u4E2D\u67E5\u627E\u76F8\u540C\u53C2\u8003\u53F7\uFF0C\u4EE5\u83B7\u53D6\u5DF2\u8131\u654F\u7684\u5177\u4F53\u9519\u8BEF\u3002":"Find the matching reference in the dsh web log for the redacted error details.","\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002":"QR code setup has been cancelled.","\u65E0\u6CD5\u751F\u6210\u9489\u9489\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Could not generate the DingTalk QR code. Please try again later.","\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002":"The QR code has expired. Generate a new one.","\u9489\u9489\u5DF2\u63A5\u5165\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"DingTalk is connected, but the message connection is not ready yet. Please try again later.","\u9489\u9489\u672A\u5B8C\u6210\u673A\u5668\u4EBA\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u626B\u7801\u3002":"DingTalk did not complete the bot authorization. Please scan the QR code again.","\u9489\u9489\u6388\u6743\u72B6\u6001\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002":"The DingTalk authorization status is temporarily unavailable. Retrying.","\u9489\u9489\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002":"DingTalk authorization succeeded, but the configuration could not be saved safely.","\u9489\u9489\u6388\u6743\u67E5\u8BE2\u6682\u65F6\u5931\u8D25\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002":"The DingTalk authorization query failed temporarily. Retrying.","\u9489\u9489\u673A\u5668\u4EBA\uFF08{clientId}\uFF09":"DingTalk bot ({clientId})","\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The DingTalk Stream message connection is running normally",\u9489\u9489\u6D88\u606F\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF:"The DingTalk message connection is currently offline"};var $x={"\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"The Enterprise WeChat bot is connected to DeepSeek Harness.","\u5F53\u524D\u5F85\u5904\u7406\u56FE\u7247\u8F83\u591A\uFF0C\u8BF7\u7A0D\u540E\u91CD\u65B0\u53D1\u9001\u3002":"Too many images are pending. Please send them again later.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u4F01\u4E1A\u5FAE\u4FE1\u667A\u80FD\u673A\u5668\u4EBA\u7F3A\u5C11\u7D20\u6750\u4E0A\u4F20\u6216\u6587\u4EF6\u6D88\u606F\u80FD\u529B\uFF0C\u8BF7\u68C0\u67E5\u673A\u5668\u4EBA\u6743\u9650\u3002":'The result file "{name}" was generated, but the Enterprise WeChat bot lacks media upload or file message capability. Please check the bot permissions.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the file size this Enterprise WeChat bot can send and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0C\u4F01\u4E1A\u5FAE\u4FE1\u4E0D\u5141\u8BB8\u53D1\u9001\u7A7A\u6587\u4EF6\u3002":'The result file "{name}" is empty. Enterprise WeChat does not allow sending empty files.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u4F01\u4E1A\u5FAE\u4FE1\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was rate-limited by Enterprise WeChat and could not be sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u4F01\u4E1A\u5FAE\u4FE1\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6216\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but Enterprise WeChat rejected the file or file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7\u4F01\u4E1A\u5FAE\u4FE1\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated but could not be sent via Enterprise WeChat right now. Please try again later.',"\u4EFB\u52A1\u5DF2\u5B8C\u6210\uFF0C\u4F46\u6CA1\u6709\u751F\u6210\u53EF\u663E\u793A\u7684\u6587\u672C\u3002":"The task completed, but no displayable text was generated.","\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u8BED\u97F3\u8F6C\u5199\u6D88\u606F\u3002":"Currently only text, images, and voice transcription messages are supported.","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The connection between the Enterprise WeChat bot and DeepSeek Harness is working.","\u6B63\u5728\u601D\u8003\u4E2D\u2026":"Thinking\u2026","\u4F01\u4E1A\u5FAE\u4FE1\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the Enterprise WeChat interaction question.","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The Enterprise WeChat bot credentials are missing. Please remove the bot and scan the QR code again.","\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The Enterprise WeChat connection is not ready. The plugin will retry automatically.","\u626B\u7801\u7ED1\u5B9A\u5DF2\u53D6\u6D88\u3002":"QR code binding has been cancelled.","\u65E0\u6CD5\u751F\u6210\u4F01\u4E1A\u5FAE\u4FE1\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Unable to generate the Enterprise WeChat QR code. Please try again later.","\u4F01\u4E1A\u5FAE\u4FE1\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002":"The Enterprise WeChat QR code has expired. Please generate a new one.","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u5DF2\u7ED1\u5B9A\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"The Enterprise WeChat bot is bound, but the message connection is not ready yet.","\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The Enterprise WeChat connection is still not ready. Please try again later.","\u4F01\u4E1A\u5FAE\u4FE1\u626B\u7801\u6CA1\u6709\u5B8C\u6210\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The Enterprise WeChat QR scan was not completed. Please generate a new QR code.","\u4F01\u4E1A\u5FAE\u4FE1\u626B\u7801\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The Enterprise WeChat QR service is temporarily unavailable. Please generate a new QR code.","\u4F01\u4E1A\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002":"Enterprise WeChat authorization succeeded, but the connection configuration could not be saved safely.",\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA:"Enterprise WeChat bot","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\uFF08{botId}\uFF09":"Enterprise WeChat bot ({botId})","\u4F01\u4E1A\u5FAE\u4FE1 WebSocket \u957F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The Enterprise WeChat WebSocket long connection is running normally","\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The Enterprise WeChat connection is not ready. The plugin will retry automatically",\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF:"The Enterprise WeChat connection is currently offline"};var eY={"QQ \u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"The QQ bot is connected to DeepSeek Harness.","\u56DE\u7B54\u8F83\u957F\uFF0C\u540E\u7EED\u5185\u5BB9\u672A\u80FD\u901A\u8FC7 QQ \u5B8C\u6574\u53D1\u9001\uFF0C\u8BF7\u56DE\u590D\u201C\u7EE7\u7EED\u201D\u3002":"The answer is long and the rest could not be sent fully through QQ. Reply \u201C\u7EE7\u7EED\u201D (continue) to receive it.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 QQ \u4ECA\u65E5\u6587\u4EF6\u4E0A\u4F20\u989D\u5EA6\u5DF2\u7528\u5B8C\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":`The result file "{name}" was generated, but QQ's daily file upload quota is used up. Please try again later.`,"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D QQ \u673A\u5668\u4EBA\u6CA1\u6709\u6587\u4EF6\u6D88\u606F\u6743\u9650\u3002":'The result file "{name}" was generated, but the current QQ bot does not have file message permission.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D QQ \u673A\u5668\u4EBA\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the file size the current QQ bot can send and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0CQQ \u4E0D\u5141\u8BB8\u53D1\u9001\u7A7A\u6587\u4EF6\u3002":'The result file "{name}" is empty, and QQ does not allow sending empty files.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB QQ \u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was temporarily rate-limited by QQ and was not sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 QQ \u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6216\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but QQ rejected the file or file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7 QQ \u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated but could not be sent via QQ right now. Please try again later.',"QQ \u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The QQ bot is connected to DeepSeek Harness normally.","QQ \u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the QQ interaction question.","QQ \u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The QQ bot credentials are missing. Remove the bot and scan the QR code again.","QQ \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The QQ connection is not ready; the plugin will retry automatically.","QQ \u626B\u7801\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The QQ QR service is temporarily unavailable. Please generate a new QR code.","\u65E0\u6CD5\u751F\u6210 QQ \u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Unable to generate the QQ QR code. Please try again later.","QQ \u673A\u5668\u4EBA\u5DF2\u7ED1\u5B9A\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"The QQ bot is bound, but the message connection is not ready yet.","QQ \u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The QQ connection is still not ready. Please try again later.",QQ\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5:"The QQ bot is not connected yet","QQ \u673A\u5668\u4EBA\uFF08{appId}\uFF09":"QQ bot ({appId})",QQ\u673A\u5668\u4EBA:"QQ bot","QQ WebSocket \u957F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The QQ WebSocket long connection is running normally","QQ \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The QQ connection is not ready; the plugin will retry automatically","QQ \u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF":"The QQ connection is currently offline","QQ \u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002":"QQ authorization succeeded, but the connection configuration could not be saved safely."};var AY={"\u5FAE\u4FE1\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"WeChat is connected to DeepSeek Harness.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5FAE\u4FE1\u673A\u5668\u4EBA\u5F53\u524D\u6CA1\u6709\u6587\u4EF6\u6D88\u606F\u53D1\u9001\u6743\u9650\uFF0C\u8BF7\u68C0\u67E5\u673A\u5668\u4EBA\u6587\u4EF6\u6D88\u606F\u80FD\u529B\u3002":`The result file "{name}" was generated, but the WeChat bot currently has no permission to send file messages. Please check the bot's file messaging capability.`,"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u5FAE\u4FE1\u4F1A\u8BDD\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the file size limit of the current WeChat conversation and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u5FAE\u4FE1\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was temporarily rate-limited by WeChat and was not sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5FAE\u4FE1\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but WeChat rejected the file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7\u5FAE\u4FE1\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated but could not be sent via WeChat right now. Please try again later.',"\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\uFF0C\u4EE5\u53CA\u5FAE\u4FE1\u5DF2\u8F6C\u6210\u6587\u5B57\u7684\u8BED\u97F3\u6D88\u606F\u3002":"Currently supports text, images, and voice messages that WeChat has converted to text.","\u5FAE\u4FE1\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"WeChat is connected to DeepSeek Harness normally.","\u5FAE\u4FE1\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the WeChat interaction question.","\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5FAE\u4FE1\u53D1\u9001\u5931\u8D25\uFF0C\u53EF\u80FD\u53EA\u6536\u5230\u90E8\u5206\u5185\u5BB9\u3002\u8BF7\u5C06\u4E0B\u9762\u7684\u8BCA\u65AD\u4FE1\u606F\u5B8C\u6574\u53CD\u9988\u7ED9\u7BA1\u7406\u5458\u3002":"The reply was generated, but WeChat delivery failed and only part of it may have arrived. Please send the complete diagnostic below to the administrator.","\u5FAE\u4FE1\u53D1\u9001\u8BCA\u65AD\uFF1A{diagnostic}":"WeChat delivery diagnostic: {diagnostic}","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u8BFB\u53D6\u73B0\u6709\u767B\u5F55\u51ED\u636E\u3002\u8BF7\u68C0\u67E5 DSH \u51ED\u636E\u5B58\u50A8\u3002":"WeChat was authorized, but the existing login credential could not be read. Please check the DSH credential store.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u767B\u5F55\u51ED\u636E\u65E0\u6CD5\u5199\u5165 DSH \u51ED\u636E\u5B58\u50A8\u3002\u8BF7\u68C0\u67E5\u51ED\u636E\u5B58\u50A8\u662F\u5426\u53EF\u5199\u3002":"WeChat was authorized, but the login credential could not be written to the DSH credential store. Please check that the credential store is writable.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u8D26\u53F7\u914D\u7F6E\u65E0\u6CD5\u5199\u5165\u672C\u673A\u3002\u8BF7\u68C0\u67E5 DSH_HOME \u76EE\u5F55\u6743\u9650\u3002":"WeChat was authorized, but the account configuration could not be written locally. Please check the DSH_HOME directory permissions.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u521D\u59CB\u5316\u8D26\u53F7\u72B6\u6001\u6216\u5DE5\u4F5C\u533A\u3002\u8BF7\u68C0\u67E5 DSH_HOME \u548C\u5DE5\u4F5C\u533A\u76EE\u5F55\u3002":"WeChat was authorized, but the account state or workspace could not be initialized. Please check DSH_HOME and the workspace directories.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u63D2\u4EF6\u65E0\u6CD5\u8FDE\u63A5\u672C\u673A Harness\u3002\u8BF7\u68C0\u67E5 dsh web \u5730\u5740\u548C\u7AEF\u53E3\u3002":"WeChat was authorized, but the plugin could not connect to the local Harness. Please check the dsh web address and port.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5065\u5EB7\u68C0\u67E5\u8D85\u65F6\u3002\u8BF7\u786E\u8BA4 dsh web \u672A\u963B\u585E\u3002":"WeChat was authorized, but the Harness health check timed out. Please confirm dsh web is not blocked.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5065\u5EB7\u68C0\u67E5\u9700\u8981\u8EAB\u4EFD\u8BA4\u8BC1\u3002\u8BF7\u68C0\u67E5\u4EE3\u7406\u3001\u7F51\u5173\u6216\u81EA\u5B9A\u4E49\u9274\u6743\u914D\u7F6E\u3002":"WeChat was authorized, but the Harness health check requires authentication. Please check proxy, gateway, or custom auth configuration.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u672C\u673A Harness \u8BF7\u6C42\u88AB\u4EE3\u7406\u8981\u6C42\u8BA4\u8BC1\u3002\u8BF7\u8BA9\u56DE\u73AF\u5730\u5740\u7ED5\u8FC7\u4EE3\u7406\uFF0C\u5E76\u68C0\u67E5 NO_PROXY \u914D\u7F6E\u3002":"WeChat was authorized, but the local Harness request was challenged for proxy authentication. Please bypass the proxy for loopback addresses and check the NO_PROXY configuration.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5F02\u5E38\u62D2\u7EDD\u4E86\u56DE\u73AF\u5730\u5740\u7684\u5065\u5EB7\u68C0\u67E5\u3002\u8BF7\u68C0\u67E5 HTTP \u4EE3\u7406\u3001Harness \u6E90\u7801\u7248\u672C\u548C\u6784\u5EFA\u4EA7\u7269\u3002":"WeChat was authorized, but Harness unexpectedly rejected the health check from a loopback address. Please check the HTTP proxy, Harness source version, and build artifacts.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u7684 Host \u4FE1\u4EFB\u68C0\u67E5\u62D2\u7EDD\u4E86\u975E\u56DE\u73AF\u5730\u5740\u8BF7\u6C42\u3002\u8BF7\u68C0\u67E5 harnessBaseUrl \u4E0E trustedHosts \u914D\u7F6E\u3002":"WeChat was authorized, but the Harness Host trust check rejected a non-loopback request. Please check the harnessBaseUrl and trustedHosts configuration.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u5065\u5EB7\u68C0\u67E5\u6536\u5230\u4E86\u975E Harness \u6807\u51C6\u7684 403 \u62D2\u7EDD\u54CD\u5E94\u3002\u8BF7\u68C0\u67E5\u4EE3\u7406\u6216\u7F51\u5173\u914D\u7F6E\u3002":"WeChat was authorized, but the health check received a non-standard Harness 403 rejection. Please check the proxy or gateway configuration.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u627E\u4E0D\u5230 Harness \u5065\u5EB7\u68C0\u67E5\u63A5\u53E3\u3002\u8BF7\u786E\u8BA4 Harness \u4E0E\u63D2\u4EF6\u7248\u672C\u517C\u5BB9\u3002":"WeChat was authorized, but the Harness health check endpoint was not found. Please confirm the Harness and plugin versions are compatible.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5065\u5EB7\u68C0\u67E5\u8FD4\u56DE\u670D\u52A1\u9519\u8BEF\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"WeChat was authorized, but the Harness health check returned a server error. Please check the dsh web logs.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u54CD\u5E94\u3002\u8BF7\u786E\u8BA4 Harness \u4E0E\u63D2\u4EF6\u7248\u672C\u517C\u5BB9\u3002":"WeChat was authorized, but Harness returned an unrecognized response. Please confirm the Harness and plugin versions are compatible.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u62D2\u7EDD\u4E86\u5065\u5EB7\u68C0\u67E5\u8BF7\u6C42\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"WeChat was authorized, but Harness rejected the health check request. Please check the dsh web logs.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5065\u5EB7\u68C0\u67E5\u53D1\u751F\u672A\u77E5\u9519\u8BEF\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"WeChat was authorized, but the Harness health check failed with an unknown error. Please check the dsh web logs.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u521D\u59CB\u5316\u5931\u8D25\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u540E\u91CD\u8BD5\u3002":"WeChat was authorized, but the message connection failed to initialize. Please check the dsh web logs and try again.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u6FC0\u6D3B\u8FC7\u7A0B\u4E2D\u53D1\u751F\u672A\u77E5\u9519\u8BEF\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"WeChat was authorized, but an unknown error occurred during activation. Please check the dsh web logs.","\u767B\u5F55\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u8D26\u53F7\u540E\u91CD\u65B0\u626B\u7801\u3002":"The login credential is missing. Please remove the account and scan the QR code again.","\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The WeChat connection is not ready; the plugin will retry automatically.","\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The WeChat connection is not ready; the plugin will retry automatically","\u65E0\u6CD5\u751F\u6210\u5FAE\u4FE1\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Unable to generate the WeChat QR code. Please try again later.","\u5FAE\u4FE1\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The WeChat connection is still not ready. Please try again later.",\u5FAE\u4FE1\u673A\u5668\u4EBA:"WeChat Bot","\u5FAE\u4FE1\u673A\u5668\u4EBA\uFF08{name}\uFF09":"WeChat Bot ({name})",\u5FAE\u4FE1\u6D88\u606F\u957F\u8F6E\u8BE2\u8FD0\u884C\u6B63\u5E38:"WeChat message long-polling is running normally",\u5FAE\u4FE1\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF:"The WeChat connection is currently offline","\u914D\u5BF9\u7801\u591A\u6B21\u9519\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The pairing code was entered incorrectly too many times. Please generate a new QR code.","\u8BE5\u5FAE\u4FE1\u8D26\u53F7\u5DF2\u7ED1\u5B9A\uFF0C\u4F46\u672C\u673A\u6CA1\u6709\u53EF\u6062\u590D\u7684\u51ED\u636E\u3002":"This WeChat account is already bound, but no recoverable credential exists on this machine.","\u5FAE\u4FE1\u6388\u6743\u6210\u529F\uFF0C\u4F46\u8FD4\u56DE\u7684\u8D26\u53F7\u51ED\u636E\u4E0D\u5B8C\u6574\u3002":"WeChat authorization succeeded, but the returned account credential is incomplete.","\u5FAE\u4FE1\u767B\u5F55\u51ED\u636E\u5DF2\u5931\u6548\uFF0C\u8BF7\u79FB\u9664\u8D26\u53F7\u540E\u91CD\u65B0\u626B\u7801\u3002":"The WeChat login credential has expired. Please remove the account and scan the QR code again.","\u5FAE\u4FE1\u6D88\u606F\u540C\u6B65\u8BF7\u6C42\u88AB\u62D2\u7EDD\u3002":"The WeChat message sync request was rejected.","\u5FAE\u4FE1\u56FE\u7247\u7684\u52A0\u5BC6\u5BC6\u94A5\u65E0\u6548\u3002":"The encryption key of the WeChat image is invalid.","\u5FAE\u4FE1\u56FE\u7247\u7684\u52A0\u5BC6\u6570\u636E\u65E0\u6548\u3002":"The encrypted data of the WeChat image is invalid.","\u5FAE\u4FE1\u56FE\u7247\u89E3\u5BC6\u5931\u8D25\u3002":"Failed to decrypt the WeChat image.","\u5FAE\u4FE1\u56FE\u7247\u6CA1\u6709\u53EF\u7528\u7684\u4E0B\u8F7D\u5730\u5740\u3002":"The WeChat image has no usable download URL.","\u5FAE\u4FE1\u56FE\u7247\u7684\u4E0B\u8F7D\u5730\u5740\u65E0\u6548\u3002":"The download URL of the WeChat image is invalid.","\u5FAE\u4FE1\u56FE\u7247\u7684\u4E0B\u8F7D\u5730\u5740\u4E0D\u53D7\u4FE1\u4EFB\u3002":"The download URL of the WeChat image is not trusted.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u8FDE\u63A5\u5730\u5740\u3002":"The WeChat service returned an invalid connection URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u4E0D\u53D7\u4FE1\u4EFB\u7684\u8FDE\u63A5\u5730\u5740\u3002":"The WeChat service returned an untrusted connection URL.","\u5FAE\u4FE1\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u626B\u7801\u5730\u5740\u3002":"The WeChat service did not return a QR-code URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u626B\u7801\u5730\u5740\u3002":"The WeChat service returned an invalid QR-code URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u4E0D\u53D7\u4FE1\u4EFB\u7684\u626B\u7801\u5730\u5740\u3002":"The WeChat service returned an untrusted QR-code URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6587\u4EF6\u4E0A\u4F20\u5730\u5740\u3002":"The WeChat service returned an invalid file upload URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u4E0D\u53D7\u4FE1\u4EFB\u7684\u6587\u4EF6\u4E0A\u4F20\u5730\u5740\u3002":"The WeChat service returned an untrusted file upload URL.","\u5FAE\u4FE1\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u6587\u4EF6\u4E0A\u4F20\u5730\u5740\u3002":"The WeChat service did not return a file upload URL.","\u5FAE\u4FE1\u6587\u4EF6\u4E0A\u4F20\u88AB\u62D2\u7EDD\uFF08HTTP {status}\uFF09\u3002":"The WeChat file upload was rejected (HTTP {status}).","\u5FAE\u4FE1\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF08HTTP {status}\uFF09\u3002":"The WeChat file upload failed (HTTP {status}).","\u5FAE\u4FE1\u6587\u4EF6\u4E0A\u4F20\u54CD\u5E94\u7F3A\u5C11\u4E0B\u8F7D\u53C2\u6570\u3002":"The WeChat file upload response is missing the download parameter.","\u5FAE\u4FE1\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\u3002":"The WeChat file upload failed.","\u62D2\u7EDD\u8BBF\u95EE\u4E0D\u53D7\u4FE1\u4EFB\u7684\u5FAE\u4FE1\u670D\u52A1\u5730\u5740\u3002":"Refusing to access an untrusted WeChat service URL.","\u5FAE\u4FE1\u670D\u52A1\u8BF7\u6C42\u5931\u8D25\uFF08HTTP {status}\uFF09\u3002":"The WeChat service request failed (HTTP {status}).","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u89E3\u6790\u7684\u54CD\u5E94\u3002":"The WeChat service returned an unparseable response.","\u5FAE\u4FE1\u670D\u52A1\u8BF7\u6C42\u8D85\u65F6\u3002":"The WeChat service request timed out.","\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u5FAE\u4FE1\u670D\u52A1\u3002":"The WeChat service is temporarily unreachable.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u626B\u7801\u72B6\u6001\u3002":"The WeChat service returned an unrecognized QR-code status.","\u5FAE\u4FE1\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u4E8C\u7EF4\u7801\u4EE4\u724C\u3002":"The WeChat service did not return a QR-code token.","\u5FAE\u4FE1\u670D\u52A1\u62D2\u7EDD\u4E86\u56DE\u590D\u6D88\u606F\u3002":"The WeChat service rejected the reply message.","\u5FAE\u4FE1\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u4E0A\u4F20\u8BF7\u6C42\u3002":"The WeChat service rejected the file upload request.","\u5FAE\u4FE1\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u6D88\u606F\u3002":"The WeChat service rejected the file message.","\u5FAE\u4FE1\u8D26\u53F7\u8FDE\u63A5\u542F\u52A8\u5931\u8D25\u3002":"Failed to start the WeChat account connection."};var tY={Slack\u673A\u5668\u4EBA:"Slack bot","Slack\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u63A5\u5165\u3002":"Slack bot credentials are missing. Remove the bot and connect it again.","Slack Socket Mode \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The Slack Socket Mode connection is not ready yet. The plugin will retry automatically.","Slack\u673A\u5668\u4EBA\u5DF2\u63A5\u5165\uFF0CSocket Mode \u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"The Slack bot is connected, but the Socket Mode connection is not ready yet.","Slack Socket Mode \u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u68C0\u67E5\u4E24\u4E2A Token\u3002":"The Slack Socket Mode connection is still not ready. Check both tokens.",Slack\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5:"The Slack bot is not connected yet","Slack Socket Mode \u957F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The Slack Socket Mode long-lived connection is running normally","Slack\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The Slack connection is not ready. The plugin will retry automatically",Slack\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF:"The Slack connection is currently offline","Slack \u672A\u6388\u6743\u673A\u5668\u4EBA\u8BFB\u53D6\u8BE5\u6587\u4EF6\u3002\u8BF7\u4E3A\u5E94\u7528\u6DFB\u52A0 files:read \u540E\u91CD\u65B0\u5B89\u88C5\uFF0C\u518D\u91CD\u65B0\u53D1\u9001\u56FE\u7247\u3002":"Slack has not granted the bot access to this file. Add the files:read scope to the app, reinstall it, then send the image again.","Slack Bot Token \u5FC5\u987B\u4EE5 xoxb- \u5F00\u5934\u3002":"The Slack Bot Token must start with xoxb-.","Slack App Token \u5FC5\u987B\u4EE5 xapp- \u5F00\u5934\u3002":"The Slack App Token must start with xapp-.","Slack Bot Token \u6CA1\u6709\u8FD4\u56DE\u5B8C\u6574\u7684\u673A\u5668\u4EBA\u8EAB\u4EFD\u3002":"The Slack Bot Token did not return a complete bot identity.","Slack App Token \u65E0\u6CD5\u521B\u5EFA Socket Mode \u8FDE\u63A5\uFF0C\u8BF7\u786E\u8BA4\u5DF2\u542F\u7528 Socket Mode \u548C connections:write\u3002":"The Slack App Token could not create a Socket Mode connection. Make sure Socket Mode and connections:write are enabled."};var rY={\u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD:"Start a brand-new Session",\u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587:"Compact the earlier context of the current Session",\u5207\u6362\u5DE5\u4F5C\u533A:"Switch Workspace",\u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84:"List Workspace absolute paths","\u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898":"List Session IDs and titles",\u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD:"Bind the current chat to a specific Session",\u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B:"List all available models by number",\u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B:"View or switch the model of the current Session","\u5217\u51FA\u53EF\u7528 Agent Preset":"List available Agent Presets","\u67E5\u770B\u6216\u8BBE\u7F6E\u65B0\u4F1A\u8BDD Agent Preset":"View or set the Agent Preset for new Sessions",\u505C\u6B62\u5F53\u524D\u4EFB\u52A1:"Stop the current task",\u7EA0\u504F\u5F53\u524D\u4EFB\u52A1:"Steer the current task",\u68C0\u67E5\u8FDE\u63A5\u72B6\u6001:"Check connection status",\u67E5\u770B\u63D2\u4EF6\u7248\u672C:"Show plugin version",\u663E\u793A\u5E2E\u52A9:"Show help","\u8BE5 Telegram \u673A\u5668\u4EBA\u5DF2\u914D\u7F6E Webhook\uFF0C\u8BF7\u5148\u5728\u539F\u670D\u52A1\u4E2D\u79FB\u9664 Webhook \u540E\u91CD\u8BD5\u3002":"This Telegram bot already has a Webhook configured. Remove the Webhook from the original service and try again.",Telegram\u673A\u5668\u4EBA:"Telegram Bot"," Bot API \u957F\u8F6E\u8BE2":" Bot API long polling"};var iY={"Discord Bot Token \u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\u3002":"The Discord Bot Token is invalid. Please enter it again.","Discord Gateway Intents \u914D\u7F6E\u4E0D\u6B63\u786E\uFF0C\u8BF7\u68C0\u67E5 Developer Portal \u7684 Bot \u8BBE\u7F6E\u3002":"The Discord Gateway Intents are misconfigured. Please check the Bot settings in the Developer Portal.",Discord\u673A\u5668\u4EBA:"Discord Bot"," Gateway \u957F\u8FDE\u63A5":" Gateway long-lived connection"};var aY={"WhatsApp \u5173\u8054\u8BBE\u5907\u5DF2\u5931\u6548\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The WhatsApp linked device is no longer valid. Remove it and scan the QR code again.","WhatsApp \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The WhatsApp connection is not ready yet; the plugin will retry automatically.","WhatsApp \u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The WhatsApp connection is still not ready. Please try again later.",WhatsApp\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5:"The WhatsApp bot is not connected yet",WhatsApp\u673A\u5668\u4EBA:"WhatsApp bot","WhatsApp Web \u5173\u8054\u8BBE\u5907\u8FD0\u884C\u6B63\u5E38":"The WhatsApp Web linked device is working normally","WhatsApp \u8FDE\u63A5\u672A\u5C31\u7EEA":"The WhatsApp connection is not ready","WhatsApp \u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF":"The WhatsApp connection is currently offline","WhatsApp \u5DF2\u7ED1\u5B9A\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"WhatsApp is linked, but the messaging connection is not ready yet.","WhatsApp \u5DF2\u626B\u7801\uFF0C\u4F46\u65E0\u6CD5\u4FDD\u5B58\u5173\u8054\u8BBE\u5907\u3002":"The QR code was scanned, but the linked device could not be saved.","\u65E0\u6CD5\u8FDE\u63A5 WhatsApp\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"Unable to connect to WhatsApp. Please generate a new QR code.",WhatsApp\u8D26\u53F7:"WhatsApp account"," Web \u5173\u8054\u8BBE\u5907":" Web linked device"};var oY={"AI Office \u62D2\u7EDD\u4E86 Device Token\u3002":"AI Office rejected the Device Token.","AI Office Connector Hook \u5C1A\u672A\u5C31\u7EEA\u3002":"The AI Office Connector Hook is not ready yet.","AI Office Connector \u534F\u8BAE\u7248\u672C\u4E0D\u517C\u5BB9\u3002":"The AI Office Connector protocol version is incompatible.","\u672C\u673A\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE AI Office\u3002":"This machine cannot reach AI Office right now.","AI Office \u8FDE\u63A5\u5DF2\u4E2D\u65AD\u3002":"The AI Office connection was interrupted.","\u672C\u673A Harness \u5DF2\u505C\u6B62\u8FD9\u6B21\u6267\u884C\u3002":"The local Harness stopped this run.","Office Job \u5DF2\u88AB\u9886\u53D6\u3001\u53D6\u6D88\u6216\u7ED3\u675F\u3002":"The Office Job has already been claimed, cancelled, or finished.","\u672C\u673A Harness \u672A\u80FD\u5B8C\u6210\u4EFB\u52A1\uFF1B\u8BF7\u68C0\u67E5 Harness \u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002":"The local Harness could not complete the task; check the Harness Session and try again.","Office Job \u5F15\u7528\u4E86\u672C\u673A\u672A\u914D\u7F6E\u7684 Workspace/Preset alias\u3002":"The Office Job references a Workspace/Preset alias that is not configured locally.","\u4F60\u6B63\u5728\u672C\u673A DeepSeek Harness \u4E2D\u7EE7\u7EED\u4E00\u4E2A\u6765\u81EA AI Office \u7684\u4EFB\u52A1\u3002":"You are continuing an AI Office task inside the local DeepSeek Harness.","\u53EA\u5728\u5F53\u524D Workspace \u5185\u884C\u52A8\u3002\u5B8C\u6210\u540E\u5FC5\u987B\u8FD4\u56DE\uFF1A\u7ED3\u679C\u6458\u8981\u3001\u6539\u52A8\u6587\u4EF6\u3001\u9A8C\u8BC1\u8BC1\u636E\u3001\u672A\u89E3\u51B3\u98CE\u9669\u3002":"Act only within the current Workspace. When finished you must return: a result summary, changed files, verification evidence, and unresolved risks.","## \u672C\u673A Instruction Preset":"## Local Instruction Preset","## \u672C\u8F6E\u8865\u5145\u6307\u4EE4":"## Additional Instructions for This Round","## Office \u65F6\u95F4\u7EBF":"## Office Timeline","\u6279\u51C6 {tool}":"Approve {tool}","Harness \u5DE5\u5177":"Harness tool","Harness \u9700\u8981 {count} \u9879\u8865\u5145\u4FE1\u606F":"Harness needs {count} pieces of additional information","\u5DF2\u9886\u53D6 Job\uFF0C\u51C6\u5907 Workspace alias\uFF1A{alias}":"Job claimed; preparing Workspace alias: {alias}","Harness Session \u5DF2\u521B\u5EFA\u3002":"Harness Session created.","\u6B63\u5728\u4F7F\u7528 {tool}\u2026":"Using {tool}\u2026"};var nY=Object.freeze(Object.assign({},zx,Vx,Wx,Zx,Xx,$x,eY,AY,tY,rY,iY,aY,oY));var sY="zh";function gY(n){let t=typeof n=="string"?n.trim().toLowerCase():"";sY=t==="english"||/^en(?:[-_].*)?$/u.test(t)?"en":"zh"}function w(n,t){if(typeof n!="string")return n;let o=sY==="en"?nY[n]??n:n;return t==null?o:o.replace(/\{(\w+)\}/g,(a,e)=>Object.hasOwn(t,e)?String(t[e]):a)}var O_=Object.freeze({version:1,bots:Object.freeze([])}),Epe=new Set(["clientId","secretRef","approvedSenders"]);function mn(n){return typeof n=="string"&&n.trim()?n.trim():null}function upe(n){return cpe("sha256").update(n).digest("hex")}function lY(n){let t=mn(n);return t&&/^dt_[a-f0-9]{24}$/.test(t)?t:null}function Cpe(n){let t=mn(n);return t&&/^DSH_DINGTALK_BOT_SECRET_[A-F0-9]{24}$/.test(t)?t:null}function Bpe(n){let t=mn(n);return t&&/^dt_sender_[a-f0-9]{32}$/.test(t)?t:null}function fpe(n){let t=typeof n=="string"?{staffId:n}:n;if(!t||typeof t!="object"||Array.isArray(t))return null;let o=Bpe(t.senderKey),a=mn(t.staffId);return!o||!a?null:Object.freeze({senderKey:o,staffId:a,displayName:mn(t.displayName),approvedAt:mn(t.approvedAt)})}function Qpe(n){if(!Array.isArray(n))return null;let t=n.map(fpe);if(t.some(e=>e===null))return null;let o=new Set,a=new Set;for(let e of t){if(o.has(e.staffId)||a.has(e.senderKey))return null;o.add(e.staffId),a.add(e.senderKey)}return Object.freeze(t)}function xQ(n){let t=mn(n);if(!t)throw new TypeError("clientId is required");let o=upe(t).slice(0,24);return Object.freeze({botId:`dt_${o}`,secretRef:`DSH_DINGTALK_BOT_SECRET_${o.toUpperCase()}`})}function dY(){return`dt_sender_${IY().replaceAll("-","")}`}function b_(n){return mn(n)?w("\u8EAB\u4EFD\u5DF2\u9690\u85CF"):w("\u9489\u9489\u7528\u6237")}function M_(n){let t=mn(n);return t?t.length<=8?`${t.slice(0,2)}\u2022\u2022\u2022\u2022`:`${t.slice(0,4)}\u2022\u2022\u2022\u2022${t.slice(-4)}`:w("\u9489\u9489\u673A\u5668\u4EBA")}function pY(n,{stored:t=!1}={}){if(!n||typeof n!="object"||Array.isArray(n)||"clientSecret"in n||"client_secret"in n||"deviceCode"in n||t&&Object.keys(n).some(r=>!Epe.has(r)))return null;let o=mn(n.clientId),a=Cpe(n.secretRef),e=Qpe(n.approvedSenders??[]);if(!o||!a||!e)return null;let i=xQ(o);return i.secretRef!==a||(n.botId===void 0?i.botId:lY(n.botId))!==i.botId?null:Object.freeze({botId:i.botId,clientId:o,secretRef:a,approvedSenders:e})}function ype(n){if(!n||n.version!==1||!Array.isArray(n.bots))return null;let t=n.bots.map(i=>pY(i,{stored:!0}));if(t.some(i=>i===null))return null;let o=new Set,a=new Set,e=new Set;for(let i of t){if(o.has(i.botId)||a.has(i.clientId)||e.has(i.secretRef))return null;o.add(i.botId),a.add(i.clientId),e.add(i.secretRef)}return Object.freeze({version:1,bots:Object.freeze(t)})}function mpe(n){return{version:1,bots:n.bots.map(t=>({clientId:t.clientId,secretRef:t.secretRef,approvedSenders:t.approvedSenders.map(o=>({senderKey:o.senderKey,staffId:o.staffId,displayName:o.displayName,approvedAt:o.approvedAt}))}))}}var KQ=class{#e;#A=O_;#t=Promise.resolve();constructor(t){if(!mn(t))throw new TypeError("config path is required");this.#e=t}async load(){try{let t=ype(JSON.parse(await lpe(this.#e,"utf8")));if(!t)throw new Error("dsh-dingtalk config contains invalid bot data");this.#A=t}catch(t){if(t?.code!=="ENOENT")throw t;this.#A=O_}return this}list(){return structuredClone(this.#A.bots)}get(t){let o=this.#A.bots.find(a=>a.botId===t);return o?structuredClone(o):null}getByClientId(t){let o=this.#A.bots.find(a=>a.clientId===t);return o?structuredClone(o):null}async save(t){let o=pY(t);if(!o)throw new Error("Refusing to persist invalid dsh-dingtalk bot data");return this.#r(a=>{if(a.find(A=>(A.clientId===o.clientId||A.secretRef===o.secretRef)&&A.botId!==o.botId))throw new Error("Duplicate DingTalk bot identity");let i=a.findIndex(A=>A.botId===o.botId);return i===-1?a.push(o):a[i]=o,structuredClone(o)})}async remove(t){if(!lY(t))throw new TypeError("Invalid DingTalk bot id");return this.#r(o=>{let a=o.findIndex(i=>i.botId===t);if(a===-1)return null;let[e]=o.splice(a,1);return structuredClone(e)})}async clear(){let t=this.#t.then(async()=>{try{await cY(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#A=O_});this.#t=t.then(()=>{},()=>{}),await t}async#r(t){let o,a=this.#t.then(async()=>{let e=[...this.#A.bots];o=t(e);let i=Object.freeze({version:1,bots:Object.freeze(e)});await this.#I(i),this.#A=i});return this.#t=a.then(()=>{},()=>{}),await a,o}async#I(t){await Ipe(hpe(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.${process.pid}.${IY()}.tmp`;try{await ppe(o,`${JSON.stringify(mpe(t),null,2)} +`,{encoding:"utf8",flag:"wx",mode:384}),await dpe(o,this.#e)}catch(a){try{await cY(o)}catch(e){if(e?.code!=="ENOENT")throw new AggregateError([a,e])}throw a}}};var EY="https://oapi.dingtalk.com",Spe="DING_DWS_CLAW";function Sn(n){return typeof n=="string"&&n.trim()?n.trim():null}function hY(n,t){let o=Number(n);return Number.isFinite(o)&&o>0?o:t}function wpe(n){let t;try{t=new URL(Sn(n)??EY)}catch{throw new TypeError("DingTalk registration base URL must be a valid HTTPS URL")}let o=t.hostname==="dingtalk.com"||t.hostname.endsWith(".dingtalk.com");if(t.protocol!=="https:"||t.port||!o||t.username||t.password||t.search||t.hash)throw new TypeError("DingTalk registration base URL must be a valid HTTPS URL");return t.pathname=t.pathname.replace(/\/+$/,""),t.href.replace(/\/$/,"")}function Dpe(n){let t=typeof n?.now=="function"?n.now():n();if(!Number.isFinite(t))throw new TypeError("clock must return a finite timestamp");return t}function Ope(n,t){if(!n||typeof n!="object"||Array.isArray(n))throw new cs("invalid-response",`DingTalk ${t} returned an invalid response`,t);if(Number(n.errcode)!==0)throw new cs("api-error",`DingTalk ${t} request was rejected`,t);return n}var cs=class extends Error{constructor(t,o,a,e={}){super(o,e),this.name="DingtalkDeviceAuthError",this.code=t,this.action=a}},YQ=class{#e;#A;#t;#r;constructor({fetch:t=globalThis.fetch,clock:o=Date,baseUrl:a=EY,timeoutMs:e=15e3}={}){if(typeof t!="function")throw new TypeError("fetch is required");if(typeof o!="function"&&typeof o?.now!="function")throw new TypeError("clock must be a function or expose now()");if(!Number.isFinite(e)||e<=0)throw new TypeError("timeoutMs must be a positive number");this.#e=t,this.#A=o,this.#t=wpe(a),this.#r=e}async start({signal:t}={}){let o=await this.#I("/app/registration/init",{source:Spe},"initialization",t),a=Sn(o.nonce);if(!a)throw new cs("missing-nonce","DingTalk registration initialization did not return a nonce","initialization");let e=await this.#I("/app/registration/begin",{nonce:a},"begin",t),i=Sn(e.device_code),A=Sn(e.verification_uri_complete);if(!i||!A)throw new cs("incomplete-registration","DingTalk registration did not return complete QR metadata","begin");let r=hY(e.expires_in,7200),s=hY(e.interval,5)*1e3;return Object.freeze({deviceCode:i,verificationUrl:A,verificationUri:Sn(e.verification_uri),userCode:Sn(e.user_code),expiresAt:Dpe(this.#A)+r*1e3,pollIntervalMs:s})}async poll(t){let o=Sn(typeof t=="string"?t:t?.deviceCode),a=typeof t=="object"?t?.signal:void 0;if(!o)throw new TypeError("deviceCode is required");let e=await this.#I("/app/registration/poll",{device_code:o},"poll",a),i=Sn(e.status)?.toUpperCase(),A=["WAITING","SUCCESS","FAIL","EXPIRED"].includes(i)?i:"UNKNOWN";return Object.freeze({status:A,clientId:Sn(e.client_id),clientSecret:Sn(e.client_secret),failReason:Sn(e.fail_reason)})}async#I(t,o,a,e){let i,A=AbortSignal.timeout(this.#r),r=e?AbortSignal.any([e,A]):A;try{i=await this.#e(`${this.#t}${t}`,{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify(o),redirect:"error",signal:r})}catch(g){throw e?.aborted?e.reason??g:A.aborted?new cs("timeout",`DingTalk ${a} request timed out`,a,{cause:g}):g?.name==="AbortError"?g:new cs("network-error",`DingTalk ${a} request could not be completed`,a,{cause:g})}if(!i||i.ok===!1||typeof i.json!="function")throw new cs("http-error",`DingTalk ${a} request failed`,a);let s;try{s=await i.json()}catch(g){throw new cs("invalid-json",`DingTalk ${a} returned invalid JSON`,a,{cause:g})}return Ope(s,a)}};import{randomUUID as Vpe}from"node:crypto";var uY=new WeakMap,__=Symbol("dsh-im.connection-test-state-identity");function CY(n){return n?.[__]??n}function bpe(n){return typeof n=="string"&&n.trim()?n.trim():null}function To(n,t){if(!n||!t||typeof t!="object")return!1;try{return uY.set(CY(n),structuredClone(t)),!0}catch{return!1}}function ou(n){let t=n?uY.get(CY(n)):null;return t?structuredClone(t):null}function xi(n,t=w("\u673A\u5668\u4EBA")){let o=bpe(n)??t;return`${w("\u2705 DeepSeek Harness \u8FDE\u63A5\u6D4B\u8BD5\u6210\u529F")} +${w("\u8FD9\u6761\u6D88\u606F\u7531\u300CIM\u673A\u5668\u4EBA\u300D\u8BBE\u7F6E\u9875\u4E2D\u7684\u201C{name}\u201D\u673A\u5668\u4EBA\u5361\u7247\u53D1\u51FA\u3002",{name:o})}`}function Qr(n=w("\u673A\u5668\u4EBA")){let t=new Error(w("{channelLabel}\u5C1A\u672A\u6536\u5230\u53EF\u7528\u4E8E\u6D4B\u8BD5\u7684\u79C1\u804A\u6D88\u606F\u3002",{channelLabel:n}));return t.code="test-target-unavailable",t}async function mc({state:n,send:t,text:o,channelLabel:a}){let e=ou(n);if(!e)throw Qr(a);return await t(e,o),{sent:!0}}function dr(n){return Object.freeze(n?{sent:!1,code:n?.code==="test-target-unavailable"?"test-target-unavailable":"test-message-failed"}:{sent:!0})}import{randomUUID as Mpe}from"node:crypto";var _pe=Object.freeze({AUTH:"MODEL_AUTH",MISSING_CREDENTIAL:"MODEL_AUTH",INVALID_CREDENTIAL:"MODEL_AUTH",QUOTA:"MODEL_QUOTA",RATE_LIMIT:"MODEL_RATE_LIMIT",CONTEXT_WINDOW_EXCEEDED:"MODEL_CONTEXT_LIMIT",UNKNOWN_MODEL:"MODEL_UNAVAILABLE",NO_ADAPTER:"MODEL_UNAVAILABLE",UNSUPPORTED_OPTION:"MODEL_CONFIG",UNSUPPORTED_REASONING_EFFORT:"MODEL_CONFIG",TIMEOUT:"MODEL_TIMEOUT",TRANSPORT:"MODEL_TRANSPORT",SERVER:"MODEL_SERVICE",STREAM_CLOSED:"MODEL_STREAM",MALFORMED_RESPONSE:"MODEL_STREAM",EMPTY_RESPONSE:"MODEL_EMPTY_REPLY",CONTENT_FILTER:"MODEL_CONTENT_REJECTED",UNSUPPORTED_CONTENT:"MODEL_CONFIG"}),Tpe=Object.freeze({HARNESS_CONNECT:"\u65E0\u6CD5\u8FDE\u63A5\u5904\u7406\u670D\u52A1\uFF0C\u6D88\u606F\u5C1A\u672A\u63D0\u4EA4\u3002\u8BF7\u786E\u8BA4 DeepSeek Harness \u6B63\u5728\u8FD0\u884C\u540E\u91CD\u8BD5\u3002",HARNESS_TIMEOUT:"\u5904\u7406\u670D\u52A1\u54CD\u5E94\u8D85\u65F6\uFF0C\u6D88\u606F\u5C1A\u672A\u5F00\u59CB\u5904\u7406\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",HARNESS_RESULT_UNCERTAIN:"\u6682\u65F6\u65E0\u6CD5\u786E\u8BA4\u4EFB\u52A1\u72B6\u6001\uFF0C\u4EFB\u52A1\u53EF\u80FD\u5DF2\u7ECF\u5F00\u59CB\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",HARNESS_ACCESS:"\u5904\u7406\u670D\u52A1\u62D2\u7EDD\u4E86\u673A\u5668\u4EBA\u8FDE\u63A5\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5 Harness \u5730\u5740\u3001\u4EE3\u7406\u6216\u8BBF\u95EE\u914D\u7F6E\u540E\u91CD\u8BD5\u3002",HARNESS_PROTOCOL:"\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u7684\u63A5\u53E3\u4E0D\u517C\u5BB9\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5 Harness \u5730\u5740\u5E76\u66F4\u65B0\u76F8\u5173\u7248\u672C\u3002",HARNESS_SERVICE:"DeepSeek Harness \u6682\u65F6\u65E0\u6CD5\u5B8C\u6210\u8BF7\u6C42\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_REPLY_TIMEOUT:"\u7B49\u5F85\u6A21\u578B\u56DE\u590D\u8D85\u65F6\uFF0C\u4EFB\u52A1\u53EF\u80FD\u4ECD\u5728\u8FD0\u884C\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",MODEL_AUTH:"\u6A21\u578B\u51ED\u636E\u7F3A\u5931\u6216\u5DF2\u5931\u6548\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5\u6A21\u578B\u914D\u7F6E\u540E\u91CD\u8BD5\u3002",MODEL_QUOTA:"\u6A21\u578B\u989D\u5EA6\u6216\u4F59\u989D\u4E0D\u8DB3\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7BA1\u7406\u5458\u8865\u5145\u989D\u5EA6\u6216\u5207\u6362\u6A21\u578B\u540E\u91CD\u8BD5\u3002",MODEL_RATE_LIMIT:"\u6A21\u578B\u670D\u52A1\u6B63\u5728\u9650\u6D41\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_CONTEXT_LIMIT:"\u5F53\u524D\u4F1A\u8BDD\u5185\u5BB9\u8D85\u8FC7\u6A21\u578B\u4E0A\u4E0B\u6587\u4E0A\u9650\u3002\u8BF7\u53D1\u9001 /compact \u6216 /new \u540E\u91CD\u8BD5\u3002",MODEL_UNAVAILABLE:"\u5F53\u524D\u6A21\u578B\u4E0D\u5B58\u5728\u6216\u4E0D\u652F\u6301\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u53D1\u9001 /models\uFF0C\u5E76\u4F7F\u7528 /model \u91CD\u65B0\u9009\u62E9\u3002",MODEL_CONFIG:"\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u8FD9\u7C7B\u5185\u5BB9\u6216\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u8C03\u6574\u5185\u5BB9\u3001\u6A21\u578B\u6216\u63A8\u7406\u7B49\u7EA7\u540E\u91CD\u8BD5\u3002",MODEL_TIMEOUT:"\u6A21\u578B\u670D\u52A1\u54CD\u5E94\u8D85\u65F6\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_TRANSPORT:"\u6682\u65F6\u65E0\u6CD5\u8FDE\u63A5\u6A21\u578B\u670D\u52A1\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_SERVICE:"\u6A21\u578B\u670D\u52A1\u6682\u65F6\u5F02\u5E38\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_STREAM:"\u6A21\u578B\u56DE\u590D\u4E2D\u65AD\u6216\u683C\u5F0F\u5F02\u5E38\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u3002",MODEL_EMPTY_REPLY:"\u6A21\u578B\u6CA1\u6709\u8FD4\u56DE\u53EF\u663E\u793A\u7684\u5185\u5BB9\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5207\u6362\u6A21\u578B\u3002",MODEL_CONTENT_REJECTED:"\u6A21\u578B\u62D2\u7EDD\u5904\u7406\u5F53\u524D\u5185\u5BB9\u3002\u8BF7\u8C03\u6574\u95EE\u9898\u5185\u5BB9\u540E\u91CD\u8BD5\u3002",MODEL_OUTPUT_LIMIT:"\u6A21\u578B\u8FBE\u5230\u8F93\u51FA\u957F\u5EA6\u4E0A\u9650\uFF0C\u4F46\u6CA1\u6709\u751F\u6210\u53EF\u663E\u793A\u7684\u7ED3\u679C\u3002\u8BF7\u7F29\u5C0F\u4EFB\u52A1\u8303\u56F4\u540E\u91CD\u8BD5\u3002",TURN_BLOCKED:"\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u65E0\u6CD5\u5728\u5F53\u524D\u6E20\u9053\u5B8C\u6210\u7684\u64CD\u4F5C\u3002\u8BF7\u5728 DeepSeek Harness \u4E2D\u5904\u7406\u540E\u518D\u8BD5\u3002",TURN_INTERRUPTED:"\u4EFB\u52A1\u88AB\u610F\u5916\u4E2D\u65AD\uFF0C\u672C\u6B21\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u3002",SESSION_NOT_FOUND:"\u5F53\u524D\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\u3002\u8BF7\u53D1\u9001 /new \u521B\u5EFA\u65B0\u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002",SESSION_BUSY:"\u5F53\u524D\u4F1A\u8BDD\u4ECD\u5728\u5904\u7406\u4E0A\u4E00\u9879\u4EFB\u52A1\u3002\u8BF7\u7B49\u5F85\u5B8C\u6210\uFF0C\u6216\u53D1\u9001 /stop \u540E\u91CD\u8BD5\u3002",SESSION_STALE:"\u5DE5\u4F5C\u533A\u6216\u4F1A\u8BDD\u72B6\u6001\u521A\u521A\u53D1\u751F\u53D8\u5316\u3002\u8BF7\u91CD\u65B0\u53D1\u9001\u8FD9\u6761\u6D88\u606F\u3002",WORKSPACE_UNAVAILABLE:"\u5F53\u524D\u5DE5\u4F5C\u533A\u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u91CD\u65B0\u9009\u62E9\u5DE5\u4F5C\u533A\u540E\u91CD\u8BD5\u3002",PRESET_UNAVAILABLE:"\u5F53\u524D Agent Preset \u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u53D1\u9001 /presetlist \u540E\u91CD\u65B0\u9009\u62E9\u3002",CHANNEL_PERMISSION:"\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u673A\u5668\u4EBA\u6CA1\u6709\u53D1\u9001\u6743\u9650\u3002\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u68C0\u67E5\u6E20\u9053\u6743\u9650\u6216\u91CD\u65B0\u7ED1\u5B9A\u673A\u5668\u4EBA\u3002",CHANNEL_RATE_LIMIT:"\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6B63\u5728\u9650\u6D41\uFF0C\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",CHANNEL_DELIVERY_UNCERTAIN:"\u56DE\u590D\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\u3002\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u7ECF\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",CHANNEL_DELIVERY:"\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",INPUT_INVALID:"\u5F53\u524D\u6D88\u606F\u5305\u542B\u65E0\u6CD5\u5904\u7406\u7684\u56FE\u7247\u6216\u6587\u4EF6\u3002\u8BF7\u8C03\u6574\u540E\u91CD\u65B0\u53D1\u9001\u3002",INTERNAL_UNKNOWN:"\u4EFB\u52A1\u672A\u5B8C\u6210\uFF0C\u6682\u65F6\u65E0\u6CD5\u786E\u5B9A\u539F\u56E0\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5C06\u53C2\u8003\u53F7\u63D0\u4F9B\u7ED9\u7BA1\u7406\u5458\u3002"});function Npe(n){if(n?.code!=="harness-turn-failed")return null;let t=n?.providerCode??n?.details?.providerCode;return typeof t!="string"?null:_pe[t.trim().toUpperCase()]??null}function Rpe(n){let t=typeof n?.code=="string"?n.code:"",o=Npe(n);if(o)return o;if(t==="harness-connect-failed")return["session.prompt","session.history"].includes(n?.method)?"HARNESS_RESULT_UNCERTAIN":"HARNESS_CONNECT";if(t==="harness-timeout")return["session.prompt","session.history"].includes(n?.method)?"HARNESS_RESULT_UNCERTAIN":"HARNESS_TIMEOUT";if(t==="harness-reply-timeout")return"MODEL_REPLY_TIMEOUT";if(["harness-auth-required","harness-proxy-auth-required","harness-loopback-forbidden","harness-host-untrusted","harness-request-forbidden"].includes(t))return"HARNESS_ACCESS";if(["harness-api-not-found","harness-response-invalid"].includes(t))return"HARNESS_PROTOCOL";if(t==="harness-turn-failed")return"INTERNAL_UNKNOWN";if(["harness-http-failed","harness-rpc-rejected"].includes(t))return"HARNESS_SERVICE";if(t==="model-empty-response")return"MODEL_EMPTY_REPLY";if(t==="model-max-tokens")return"MODEL_OUTPUT_LIMIT";if(t==="turn-blocked")return"TURN_BLOCKED";if(["turn-interrupted","turn-aborted"].includes(t))return"TURN_INTERRUPTED";if(t==="session-not-found")return"SESSION_NOT_FOUND";if(t==="agent-busy")return"SESSION_BUSY";if(t==="workspace-session-stale")return"SESSION_STALE";if(t.startsWith("workspace-"))return"WORKSPACE_UNAVAILABLE";if(t.startsWith("agent-preset-"))return"PRESET_UNAVAILABLE";if(t.startsWith("image-")||t.startsWith("inbound-file-")||t==="attachment-error")return"INPUT_INVALID";let a=Number(n?.status??n?.httpStatus);return a===401||a===403||["channel-permission","permission-required","artifact-permission-required","forbidden","stale-token"].includes(t)?"CHANNEL_PERMISSION":a===429||["channel-rate-limit","rate-limited","artifact-rate-limited"].includes(t)?"CHANNEL_RATE_LIMIT":["channel-delivery-uncertain","delivery-uncertain","artifact-delivery-uncertain"].includes(t)?"CHANNEL_DELIVERY_UNCERTAIN":t==="channel-delivery-failed"||t.startsWith("artifact-")||["network-error","timeout"].includes(t)?"CHANNEL_DELIVERY":"INTERNAL_UNKNOWN"}function kpe(n){return typeof n=="string"&&/^[A-Z0-9-]{6,40}$/u.test(n)?n:`MF-${Mpe().slice(0,8).toUpperCase()}`}function vpe(n){return typeof n!="string"||!/^[A-Za-z0-9_-]{1,64}$/u.test(n)?null:n.toUpperCase().replaceAll("-","_")}function Ppe(n,{userMessage:t,reason:o,referenceId:a,at:e=Date.now()}={}){let i=vpe(o),A=Rpe(n),r=A==="INTERNAL_UNKNOWN"&&i&&typeof t=="string"&&t.trim()?"INPUT_INVALID":A;return Object.freeze({code:r,reason:i??r,message:typeof t=="string"&&t.trim()?t.trim():w(Tpe[r]),referenceId:kpe(a),at:Number.isFinite(e)?e:Date.now()})}function ut(n){return`${n.message} -${w("\u9519\u8BEF\u7801\uFF1A{code}\uFF1B\u53C2\u8003\u53F7\uFF1A{referenceId}",n)}`}function rt(n,t,o){let a=Rpe(t,o);return n.lastMessageError=a,a}function No(n){n.lastMessageError=null}function xi(n,{uncertain:t=!0}={}){let o=new Error("Channel message delivery failed",{cause:n}),a=Number(n?.status??n?.httpStatus);return o.code=a===401||a===403?"channel-permission":a===429?"channel-rate-limit":t?"channel-delivery-uncertain":"channel-delivery-failed",Number.isInteger(a)&&(o.status=a),o}function ii(n){return!n||typeof n!="object"||typeof n.code!="string"||!n.code||typeof n.reason!="string"||!n.reason||typeof n.message!="string"||!n.message||typeof n.referenceId!="string"||!n.referenceId||!Number.isFinite(n.at)?null:{code:n.code.slice(0,64),reason:n.reason.slice(0,64),message:n.message.slice(0,500),referenceId:n.referenceId.slice(0,40),at:n.at}}import{randomUUID as kpe}from"node:crypto";import{createRequire as BY}from"node:module";var vpe=BY(import.meta.url),T_=new Set(["dingtalk-harness-connect-failed","dingtalk-runtime-prepare-failed","dingtalk-stream-client-load-failed","dingtalk-stream-listener-failed","dingtalk-stream-connect-failed"]),Ppe=Object.freeze(["HTTPS_PROXY","https_proxy","HTTP_PROXY","http_proxy","ALL_PROXY","all_proxy"]),Gpe=/^\d+\.\d+\.\d+(?:[-+][A-Za-z0-9.-]+)?$/,Fpe=/^DT-CONN-[A-F0-9]{8}$/,YQ;function Is(n,t=500){if(typeof n!="string")return null;let o=n.trim();return o?o.slice(0,t):null}function xd(n){let t=Is(n,80);return t&&Gpe.test(t)?t:null}function jQ(n,t=vpe){try{let o=t.resolve(`${n}/package.json`);return{version:xd(t(o)?.version),require:BY(o)}}catch{return null}}function Lpe(){if(YQ)return YQ;let n=jQ("dingtalk-stream"),t=n?jQ("axios",n.require):null,o=t?jQ("https-proxy-agent",t.require):null,a=o?jQ("agent-base",o.require):null;return YQ=Object.freeze({dingtalkStream:n?.version??null,axios:t?.version??null,httpsProxyAgent:o?.version??null,agentBase:a?.version??null}),YQ}function Upe(n){let t=[],o=new Set,a=n;for(;a&&typeof a=="object"&&t.length<4&&!o.has(a);)o.add(a),t.push(a),a=a.cause;return t}function fY(n){return Number.isInteger(n?.status)?n.status:Number.isInteger(n?.statusCode)?n.statusCode:Number.isInteger(n?.response?.status)?n.response.status:null}function Hpe(n){let t=Is(n?.providerCode??n?.response?.data?.code??n?.response?.data?.errorCode??n?.response?.data?.errcode,100);return t&&/^[A-Za-z0-9_.:-]+$/.test(t)?t:null}function Kpe(n,t){let o=Is(n);if(!o)return null;for(let a of t){let e=Is(a,2048);e&&e.length>=4&&(o=o.replaceAll(e,"\u2022\u2022\u2022\u2022"))}return o.replace(/(https?:\/\/)[^/\s@]+@/giu,"$1\u2022\u2022\u2022\u2022@").replace(/([?&](?:appsecret|client_secret|clientsecret|access_token|token|password)=)[^&\s]*/giu,"$1\u2022\u2022\u2022\u2022").replace(/((?:app|client|access)[_-]?secret|authorization|password|token)\s*[=:]\s*[^\s,;,。]+/giu,"$1=\u2022\u2022\u2022\u2022").replace(/\b[A-Za-z0-9_.-]*secret[A-Za-z0-9_.-]*\b/giu,"\u2022\u2022\u2022\u2022").slice(0,500)}function xpe(n){let t=n&&typeof n=="object"?n:{};return{dingtalkStream:xd(t.dingtalkStream),axios:xd(t.axios),httpsProxyAgent:xd(t.httpsProxyAgent),agentBase:xd(t.agentBase)}}function Ype(n,t){return n.map(o=>{let a=Is(o?.name,80),e=Is(o?.code,100),i=fY(o),A=Hpe(o),r=Kpe(o?.message,t);return{...a?{name:a}:{},...e?{code:e}:{},...i!==null?{status:i}:{},...A?{providerCode:A}:{},...r?{message:r}:{}}})}function jpe(n){return Fpe.test(n??"")?n:`DT-CONN-${kpe().replaceAll("-","").slice(0,8).toUpperCase()}`}function Ro(n,t,o,a){return Object.freeze({code:n,message:w(t),hint:w(o),referenceId:a})}function Yd(n,t){if(t?.name==="AbortError"||T_.has(t?.code))return t;let o=new Error(Is(t?.message)??"DingTalk runtime startup failed",{cause:t});return o.name="DingtalkRuntimeStartError",o.code=T_.has(n)?n:"dingtalk-runtime-prepare-failed",o}function QY(n,{fallbackMessage:t="\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",clientId:o,clientSecret:a,environment:e=process.env,dependencies:i=Lpe(),nodeVersion:A=process.versions.node,referenceId:r}={}){let s=jpe(r),g=Upe(n),c=new Set(g.map(L=>Is(L?.code,100)?.toUpperCase()).filter(Boolean)),I=g.map(L=>Is(L?.message)?.toLowerCase()).filter(Boolean),d=g.map(fY).filter(L=>L!==null),B=g.map(L=>L?.code).find(L=>T_.has(L))??null,f=Ppe.filter(L=>Is(e?.[L],4096)),Q=f.length>0,y=xpe(i),m=L=>I.some(U=>L.test(U)),_=L=>[...c].some(U=>L.test(U)),T=d.includes(407)||_(/(?:PROXY|ERR_INVALID_PROTOCOL)/u)||m(/proxy|tunneling socket/u),R;return B==="dingtalk-stream-connect-failed"&&Q&&y.agentBase==="6.0.0"?R=Ro("stream-proxy-dependency-incompatible","\u9489\u9489 Stream \u8FDE\u63A5\u5931\u8D25\uFF1A\u68C0\u6D4B\u5230\u4EE3\u7406\u4F9D\u8D56 agent-base 6.0.0\u3002","\u8BF7\u5C06 DSH profile \u4E2D\u7684 agent-base@6 \u56FA\u5B9A\u4E3A 6.0.2 \u540E\u91CD\u65B0\u5B89\u88C5\u4F9D\u8D56\uFF0C\u6216\u5347\u7EA7 pnpm \u540E\u91CD\u65B0\u89E3\u6790 lockfile\u3002",s):B==="dingtalk-harness-connect-failed"?R=Ro("harness-unavailable","\u63D2\u4EF6\u65E0\u6CD5\u8FDE\u63A5\u672C\u673A Harness\u3002","\u8BF7\u786E\u8BA4 dsh web \u6B63\u5E38\u8FD0\u884C\uFF0C\u5E76\u67E5\u770B dsh web \u65E5\u5FD7\u4E2D\u76F8\u540C\u53C2\u8003\u53F7\u5BF9\u5E94\u7684\u8BCA\u65AD\u4FE1\u606F\u3002",s):B==="dingtalk-stream-client-load-failed"?R=Ro("stream-sdk-load-failed","\u9489\u9489 Stream SDK \u52A0\u8F7D\u5931\u8D25\u3002","\u8BF7\u91CD\u65B0\u5B89\u88C5\u5F53\u524D DSH profile \u7684\u63D2\u4EF6\u4F9D\u8D56\uFF0C\u5E76\u67E5\u770B dsh web \u65E5\u5FD7\u4E2D\u76F8\u540C\u53C2\u8003\u53F7\u5BF9\u5E94\u7684\u8BCA\u65AD\u4FE1\u606F\u3002",s):d.some(L=>L===401||L===403)?R=Ro("stream-credentials-rejected","\u9489\u9489\u62D2\u7EDD\u4E86\u5F53\u524D\u5E94\u7528\u51ED\u636E\u3002","\u8BF7\u6838\u5BF9 Client ID\u3001Client Secret \u548C\u673A\u5668\u4EBA\u6743\u9650\u540E\u91CD\u8BD5\u3002",s):_(/(?:TIMEOUT|ETIMEDOUT)/u)||m(/timed? out|timeout/u)?R=Ro("stream-handshake-timeout","\u8FDE\u63A5\u9489\u9489 Stream \u8D85\u65F6\u3002","\u8BF7\u68C0\u67E5\u7F51\u7EDC\u3001\u4EE3\u7406\u548C\u9632\u706B\u5899\u540E\u91CD\u8BD5\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002",s):_(/^(?:ENOTFOUND|EAI_AGAIN)$/u)?R=Ro("stream-dns-failed","\u65E0\u6CD5\u89E3\u6790\u9489\u9489\u670D\u52A1\u5730\u5740\u3002","\u8BF7\u68C0\u67E5 DNS\u3001\u7F51\u7EDC\u548C\u4EE3\u7406\u8BBE\u7F6E\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002",s):_(/(?:CERT|TLS|SSL|UNABLE_TO_VERIFY)/u)?R=Ro("stream-tls-failed","\u9489\u9489 Stream \u7684 TLS \u8FDE\u63A5\u6821\u9A8C\u5931\u8D25\u3002","\u8BF7\u68C0\u67E5\u7CFB\u7EDF\u8BC1\u4E66\u3001\u4EE3\u7406\u8BC1\u4E66\u6216 HTTPS \u4E2D\u95F4\u4EE3\u7406\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002",s):B==="dingtalk-stream-connect-failed"&&T?R=Ro("stream-proxy-failed","\u9489\u9489 Stream \u65E0\u6CD5\u901A\u8FC7\u5F53\u524D\u4EE3\u7406\u5EFA\u7ACB\u8FDE\u63A5\u3002","\u8BF7\u68C0\u67E5 HTTP_PROXY\u3001HTTPS_PROXY\u3001NO_PROXY \u548C\u4EE3\u7406\u8FDE\u901A\u6027\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002",s):B==="dingtalk-stream-connect-failed"?R=Ro("stream-connect-failed","\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u5EFA\u7ACB\u5931\u8D25\u3002","\u8BF7\u68C0\u67E5\u7F51\u7EDC\u548C\u673A\u5668\u4EBA\u914D\u7F6E\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002",s):B==="dingtalk-stream-listener-failed"?R=Ro("stream-listener-failed","\u9489\u9489 Stream \u6D88\u606F\u76D1\u542C\u521D\u59CB\u5316\u5931\u8D25\u3002","\u8BF7\u786E\u8BA4 dsh-im \u4E0E dingtalk-stream \u7248\u672C\u517C\u5BB9\uFF0C\u5E76\u6309\u53C2\u8003\u53F7\u67E5\u770B dsh web \u65E5\u5FD7\u3002",s):B==="dingtalk-runtime-prepare-failed"?R=Ro("runtime-prepare-failed","\u9489\u9489\u673A\u5668\u4EBA\u8FD0\u884C\u73AF\u5883\u521D\u59CB\u5316\u5931\u8D25\u3002","\u8BF7\u68C0\u67E5 DSH \u6570\u636E\u76EE\u5F55\u3001\u5DE5\u4F5C\u533A\u548C\u63D2\u4EF6\u4F9D\u8D56\uFF0C\u5E76\u6309\u53C2\u8003\u53F7\u67E5\u770B dsh web \u65E5\u5FD7\u3002",s):R=Ro("connection-failed",t,"\u8BF7\u5728 dsh web \u65E5\u5FD7\u4E2D\u67E5\u627E\u76F8\u540C\u53C2\u8003\u53F7\uFF0C\u4EE5\u83B7\u53D6\u5DF2\u8131\u654F\u7684\u5177\u4F53\u9519\u8BEF\u3002",s),Object.freeze({publicError:R,diagnostic:Object.freeze({referenceId:s,category:R.code,stage:B,runtime:{node:xd(A)},proxy:{configured:Q,variables:f},dependencies:y,errors:Ype(g,[o,a])})})}function N_(n,t){let o=new Error(n.message,{cause:t});return o.name="DingtalkPublicConnectionError",o.code=n.code,o.publicError=structuredClone(n),o}var yY=new Set(["starting","pending","connecting"]),JQ=new Set(["connected","expired","failed","cancelled"]);function ai(n){return typeof n=="string"&&n.trim()?n.trim():null}function wn(n,t){return Object.freeze({code:n,message:t})}function wY(n){return typeof n?.now=="function"?n.now():n()}function qpe(n){return new Date(wY(n)).toISOString()}function mc(){return new DOMException("DingTalk provisioning was cancelled","AbortError")}function zI(n){return n?{attemptId:n.id,status:n.state,...n.verificationUrl?{verificationUrl:n.verificationUrl}:{},...n.expiresAt?{expiresAt:n.expiresAt}:{},...n.pollIntervalMs?{pollIntervalMs:n.pollIntervalMs}:{},...n.botId?{botId:n.botId}:{},...n.alreadyConnected?{alreadyConnected:!0}:{},...n.error?{error:structuredClone(n.error)}:{}}:null}function R_(n){if(!n)return{};let t=typeof n.status=="function"?n.status():n.status;return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}function mY(n,t){if(!n||t.connected===!1||t.ready===!1)return!1;let o=ai(t.dingtalkStreamState??t.dingtalkConnectionState??t.connectionState??t.state)?.toLowerCase();return["failed","error","offline","disconnected","stopped"].includes(o)?!1:t.connected===!0||t.ready===!0||o==="connected"||o==="ready"}function DY(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let t=ai(n.staffId??n.senderStaffId??n.senderId);if(!t)return null;let o=ai(n.requestId),a=o&&/^ding_sender_[A-Za-z0-9_-]{1,100}$/.test(o)&&!o.includes(t)?o:null;return a?{requestId:a,staffId:t,displayName:ai(n.displayName??n.senderName??n.senderNick)??w("\u9489\u9489\u7528\u6237"),requestedAt:ai(n.requestedAt)}:null}function SY(n){if(!Array.isArray(n.pendingSenders))return[];let t=new Set,o=[];for(let a of n.pendingSenders){let e=DY(a);!e||t.has(e.staffId)||(t.add(e.staffId),o.push(e))}return o}function zpe(n){return{requestId:n.requestId,displayName:n.displayName,senderIdMasked:b_(n.staffId),requestedAt:n.requestedAt}}function Vpe(n){return{senderKey:n.senderKey,displayName:ai(n.displayName)??w("\u9489\u9489\u7528\u6237"),senderIdMasked:b_(n.staffId),approvedAt:ai(n.approvedAt)}}var nu=class{#e;#A;#t;#r;#I;#o;#g;#i=new Map;#a=new Map;#s=new Map;#l=null;#c=new Map;#d=0;#n=!1;constructor({deviceAuth:t,credentials:o,configStore:a,createRuntime:e,deleteState:i=async()=>{},logger:A=console,clock:r=Date}){if(!t||typeof t.start!="function"||typeof t.poll!="function")throw new TypeError("DingtalkController requires a DingTalk device auth client");if(!o||typeof o.resolve!="function"||typeof o.set!="function"||typeof o.unset!="function")throw new TypeError("DingtalkController requires the DSH credential provider");if(!a||typeof a.list!="function"||typeof a.get!="function"||typeof a.getByClientId!="function"||typeof a.save!="function"||typeof a.remove!="function")throw new TypeError("DingtalkController requires a loaded config store");if(typeof e!="function")throw new TypeError("createRuntime is required");if(typeof i!="function")throw new TypeError("deleteState must be a function");if(typeof r!="function"&&typeof r?.now!="function")throw new TypeError("clock must be a function or expose now()");this.#e=t,this.#A=o,this.#t=a,this.#r=e,this.#I=i,this.#o=A,this.#g=r}async initialize(){if(this.#n)return this.status();for(let t of this.#t.list()){let o=this.#i.get(t.botId);try{if(mY(o,R_(o)))continue}catch{}await this.#Q(t.botId,async()=>{let a=this.#t.get(t.botId);if(!a||this.#n)return;let e=await this.#y(a.secretRef);if(!e){this.#a.set(a.botId,wn("missing-secret",w("\u9489\u9489\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002"))),this.#E();return}try{await this.#C(a,e),this.#a.delete(a.botId)}catch(i){this.#B({config:a,clientSecret:e,error:i,fallbackMessage:"\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`bot ${a.botId} failed to initialize`})}this.#E()})}return this.status()}async startProvisioning({signal:t}={}){if(this.#n)throw new Error("dsh-dingtalk controller is closed");this.#l&&await this.cancelProvisioning(this.#l);let o={id:Jpe(),state:"starting",controller:new AbortController,deviceCode:null,verificationUrl:null,expiresAt:null,pollIntervalMs:null,pollTask:null,botId:null,alreadyConnected:!1,error:null};this.#s.set(o.id,o),this.#l=o.id,this.#E();let a=()=>o.controller.abort(t?.reason);t?.aborted?a():t?.addEventListener("abort",a,{once:!0});try{let e=await this.#e.start({signal:o.controller.signal});if(this.#m(o),o.deviceCode=ai(e.deviceCode),o.verificationUrl=ai(e.verificationUrl),o.expiresAt=Number(e.expiresAt),o.pollIntervalMs=Number(e.pollIntervalMs),!o.deviceCode||!o.verificationUrl||!Number.isFinite(o.expiresAt)||!Number.isFinite(o.pollIntervalMs)||o.pollIntervalMs<=0)throw new Error("DingTalk device auth returned incomplete registration metadata");return o.state="pending",this.#E(),zI(o)}catch(e){if(o.controller.signal.aborted||e?.name==="AbortError"?(o.state="cancelled",o.error=wn("cancelled",w("\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002"))):(o.state="failed",o.error=wn("qr-start-failed",w("\u65E0\u6CD5\u751F\u6210\u9489\u9489\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))),this.#l===o.id&&(this.#l=null),this.#E(),o.state==="failed")throw e;return zI(o)}finally{t?.removeEventListener("abort",a)}}async bindCredentials({clientId:t,clientSecret:o}={}){if(this.#n)throw new Error("dsh-dingtalk controller is closed");let a=ai(t),e=ai(o);if(!a||!e)throw new TypeError("DingTalk Client ID and Client Secret are required");if(this.#l&&await this.cancelProvisioning(this.#l),this.#n)throw new Error("dsh-dingtalk controller is closed");let i=KQ(a);return await this.#Q(i.botId,async()=>{if(this.#n)throw mc();let A=this.#t.getByClientId(a),r=await this.#A.resolve(i.secretRef).catch(()=>{});if(this.#n)throw mc();let s={botId:i.botId,clientId:a,secretRef:i.secretRef,approvedSenders:A?.approvedSenders??[]};await this.#A.set(i.secretRef,e);try{await this.#t.save(s)}catch(g){throw await this.#w(i.secretRef,r),g}try{await this.#C(s,e),this.#a.delete(i.botId)}catch(g){this.#B({config:s,clientSecret:e,error:g,fallbackMessage:"\u9489\u9489\u5DF2\u63A5\u5165\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`credential-bound bot ${i.botId} is not ready`})}this.#E()}),this.status()}async registrationStatus(t){let o=this.#s.get(t);if(!o)return null;if(JQ.has(o.state)||o.state==="starting")return zI(o);if(wY(this.#g)>=o.expiresAt)return o.state="expired",o.error=wn("expired",w("\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002")),this.#l===o.id&&(this.#l=null),this.#E(),zI(o);if(!o.pollTask){let a=this.#p(o).finally(()=>{o.pollTask===a&&(o.pollTask=null)});o.pollTask=a}return await o.pollTask,zI(o)}async cancelProvisioning(t){let o=this.#s.get(t);return o?(JQ.has(o.state)||(o.controller.abort(),await o.pollTask?.catch(()=>{}),JQ.has(o.state)||(o.state="cancelled"),o.error??=wn("cancelled",w("\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002"))),this.#l===o.id&&(this.#l=null),this.#E(),zI(o)):null}async reconnectBot(t){let o=this.#t.get(t);if(!o)throw new Error("Unknown DingTalk bot");return await this.#Q(t,async()=>{let a=await this.#y(o.secretRef);if(!a)throw new Error("The DingTalk client secret is missing");try{await this.#C(o,a),this.#a.delete(t)}catch(e){let i=this.#B({config:o,clientSecret:a,error:e,fallbackMessage:"\u9489\u9489\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`bot ${t} failed to reconnect`});throw N_(i,e)}finally{this.#E()}}),this.status()}async sendConnectionTest(t){let o=this.#t.get(t);if(!o)throw new Error("Unknown DingTalk bot");return this.#Q(t,async()=>{let a=this.#i.get(t);if(!a?.status?.ready||typeof a.sendConnectionTest!="function")throw Qr(w("\u9489\u9489\u673A\u5668\u4EBA"));return a.sendConnectionTest(Ki(w("\u9489\u9489\u673A\u5668\u4EBA\uFF08{clientId}\uFF09",{clientId:M_(o.clientId)})))})}async sendProactiveText(t,o,a,e={}){if(!this.#t.get(t))throw new Error("Unknown DingTalk bot");return this.#Q(t,async()=>{let A=this.#i.get(t);if(!A?.status?.ready||typeof A.sendProactiveText!="function"){let r=new Error(w("\u9489\u9489\u6D88\u606F\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF"));throw r.code="bot-not-connected",r}return A.sendProactiveText(o,a,e)})}async deleteBot(t){let o=this.#t.get(t);if(!o)throw new Error("Unknown DingTalk bot");return await this.#Q(t,async()=>{let a=await this.#A.resolve(o.secretRef).catch(()=>{});await this.#f(t);try{await this.#A.unset(o.secretRef),await this.#t.remove(t)}catch(e){throw ai(a?.value)&&(await this.#A.set(o.secretRef,a.value).catch(()=>{}),await this.#C(o,a.value).catch(()=>{})),new Error("Unable to remove the DingTalk bot safely.",{cause:e})}try{await this.#I({botId:t,config:o})}catch{this.#o.warn?.(`[dsh-dingtalk] bot ${t} state cleanup failed`)}this.#a.delete(t),this.#E()}),this.status()}async approveSender(t,o){let a=this.#t.get(t);if(!a)throw new Error("Unknown DingTalk bot");let e=this.#i.get(t),i=typeof e?.pendingSender=="function"?DY(e.pendingSender(o)):null,A=SY(R_(e)),r=i?.requestId===o?i:A.find(g=>g.requestId===o);if(!r)throw new Error("Unknown DingTalk sender approval request");if(a.approvedSenders.some(g=>g.staffId===r.staffId))return this.status();let s={...a,approvedSenders:[...a.approvedSenders,{senderKey:dY(),staffId:r.staffId,displayName:r.displayName,approvedAt:qpe(this.#g)}]};return await this.#u(a,s),this.status()}async revokeSender(t,o){let a=this.#t.get(t);if(!a)throw new Error("Unknown DingTalk bot");let e=a.approvedSenders.findIndex(A=>A.senderKey===o);if(e===-1)throw new Error("Unknown approved DingTalk sender");let i=[...a.approvedSenders];return i.splice(e,1),await this.#u(a,{...a,approvedSenders:i}),this.status()}status(){let t=this.#t.list().map(e=>{let i=this.#i.get(e.botId),A={};try{A=R_(i)}catch{A={state:"error"}}let r=mY(i,A),s=this.#a.get(e.botId),g=r?"connected":s?"error":"offline",c=new Set(e.approvedSenders.map(d=>d.staffId)),I=SY(A).filter(d=>!c.has(d.staffId)).map(zpe);return{botId:e.botId,state:g,connected:r,configured:!0,bot:{name:w("\u9489\u9489\u673A\u5668\u4EBA"),clientIdMasked:M_(e.clientId)},health:{status:r?"healthy":s?"error":"offline",summary:r?w("\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38"):s?.message??w("\u9489\u9489\u6D88\u606F\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF"),lastCheckedAt:A.lastCheckedAt??null},stats:{messagesReceived:Number(A.messagesReceived)||0,messagesReplied:Number(A.messagesReplied)||0},lastMessageError:ii(A.lastMessageError),senders:{pending:I,approved:e.approvedSenders.map(Vpe)},error:s?structuredClone(s):null}}),o=t.filter(e=>e.connected).length,a=this.#l?this.#s.get(this.#l):null;return{schemaVersion:1,revision:this.#d,state:a&&yY.has(a.state)?"provisioning":t.length===0?"disconnected":o===t.length?"connected":o>0?"degraded":"offline",bots:t,totals:{configured:t.length,connected:o},...a&&yY.has(a.state)?{provisioning:zI(a)}:{}}}async close(){this.#n||(this.#n=!0,this.#l&&await this.cancelProvisioning(this.#l),await Promise.allSettled([...this.#i.keys()].map(t=>this.#f(t))),await Promise.allSettled([...this.#c.values()]),await Promise.allSettled([...this.#i.keys()].map(t=>this.#f(t))))}async#p(t){try{this.#m(t);let o=await this.#e.poll({deviceCode:t.deviceCode,signal:t.controller.signal});this.#m(t);let a=ai(o.status)?.toUpperCase();if(a==="WAITING")t.state="pending",t.error=null;else if(a==="SUCCESS"){let e=ai(o.clientId),i=ai(o.clientSecret);if(!e||!i)throw new Error("DingTalk returned incomplete credentials");t.state="connecting",t.error=null,this.#E();let A=await this.#h(t,{clientId:e,clientSecret:i});t.botId=A.botId,t.alreadyConnected=A.alreadyConnected,t.state="connected",this.#l===t.id&&(this.#l=null)}else a==="EXPIRED"?(t.state="expired",t.error=wn("expired",w("\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002")),this.#l===t.id&&(this.#l=null)):a==="FAIL"?(t.state="failed",t.error=wn("authorization-failed",w("\u9489\u9489\u672A\u5B8C\u6210\u673A\u5668\u4EBA\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u626B\u7801\u3002")),this.#l===t.id&&(this.#l=null)):(t.state="pending",t.error=wn("poll-pending",w("\u9489\u9489\u6388\u6743\u72B6\u6001\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002")))}catch(o){t.controller.signal.aborted||o?.name==="AbortError"?(t.state="cancelled",t.error=wn("cancelled",w("\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002")),this.#l===t.id&&(this.#l=null)):t.state==="connecting"?(t.state="failed",t.error=wn("activation-failed",w("\u9489\u9489\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002")),this.#l===t.id&&(this.#l=null),this.#o.error?.("[dsh-dingtalk] bot activation failed")):(t.state="pending",t.error=wn("poll-failed",w("\u9489\u9489\u6388\u6743\u67E5\u8BE2\u6682\u65F6\u5931\u8D25\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002")))}finally{this.#E(),this.#D()}}async#h(t,{clientId:o,clientSecret:a}){let e=KQ(o),i=this.#t.getByClientId(o),A=await this.#A.resolve(e.secretRef).catch(()=>{}),r={botId:e.botId,clientId:o,secretRef:e.secretRef,approvedSenders:i?.approvedSenders??[]};return this.#Q(e.botId,async()=>{let s=async()=>{await this.#f(e.botId),i?await this.#t.save(i).catch(()=>{}):this.#t.get(e.botId)&&await this.#t.remove(e.botId).catch(()=>null)&&await this.#I({botId:e.botId,config:r}).catch(c=>{this.#o.warn?.("[dsh-dingtalk] failed to clean up cancelled bot state:",c)}),await this.#w(e.secretRef,A),i&&ai(A?.value)&&await this.#C(i,A.value).catch(()=>{})};await this.#A.set(e.secretRef,a);try{this.#m(t),await this.#t.save(r),this.#m(t)}catch(g){throw await s(),g}try{await this.#C(r,a),this.#m(t),this.#a.delete(e.botId)}catch(g){if(t.controller.signal.aborted||this.#l!==t.id)throw await s(),mc();this.#B({config:r,clientSecret:a,error:g,fallbackMessage:"\u9489\u9489\u5DF2\u63A5\u5165\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`authorized bot ${e.botId} is not ready`})}return{botId:e.botId,alreadyConnected:!!i}})}async#u(t,o){return this.#Q(t.botId,async()=>{let a=await this.#y(t.secretRef);if(!a)throw new Error("The DingTalk client secret is missing");await this.#t.save(o);try{await this.#C(o,a),this.#a.delete(t.botId)}catch(e){await this.#t.save(t).catch(()=>{}),await this.#C(t,a).catch(()=>{});let i=this.#B({config:t,clientSecret:a,error:e,fallbackMessage:"\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`bot ${t.botId} failed to apply updated settings`});throw N_(i,e)}finally{this.#E()}})}async#C(t,o){if(this.#n||(await this.#f(t.botId),this.#n))throw mc();let a;try{a=await this.#r({botId:t.botId,config:structuredClone(t),clientSecret:o})}catch(e){throw Yd("dingtalk-runtime-prepare-failed",e)}if(!a||typeof a.start!="function"||typeof a.stop!="function")throw Yd("dingtalk-runtime-prepare-failed",new TypeError("createRuntime returned an invalid DingTalk runtime"));if(this.#n)throw await a.stop().catch(()=>{}),mc();this.#i.set(t.botId,a);try{if(await a.start(),this.#n)throw await a.stop().catch(()=>{}),mc()}catch(e){throw this.#i.get(t.botId)===a&&this.#i.delete(t.botId),await a.stop().catch(()=>{}),Yd("dingtalk-stream-connect-failed",e)}}#B({config:t,clientSecret:o,error:a,fallbackMessage:e,context:i}){let A=QY(a,{fallbackMessage:e,clientId:t.clientId,clientSecret:o});return this.#a.set(t.botId,A.publicError),this.#o.error?.(`[dsh-dingtalk] ${i} [${A.publicError.referenceId}]`,A.diagnostic),A.publicError}async#f(t){let o=this.#i.get(t);this.#i.delete(t),await o?.stop().catch(()=>{this.#o.warn?.(`[dsh-dingtalk] bot ${t} failed to stop cleanly`)})}async#y(t){let o=await this.#A.resolve(t).catch(()=>{});return ai(o?.value)}async#w(t,o){try{ai(o?.value)?await this.#A.set(t,o.value):await this.#A.unset(t)}catch{this.#o.error?.(`[dsh-dingtalk] failed to restore credential ${t}`)}}#m(t){if(t.controller.signal.aborted||this.#l!==t.id)throw mc()}#Q(t,o){if(this.#n)return Promise.reject(new Error("dsh-dingtalk controller is closed"));let i=(this.#c.get(t)??Promise.resolve()).catch(()=>{}).then(o).finally(()=>{this.#c.get(t)===i&&this.#c.delete(t)});return this.#c.set(t,i),i}#D(){for(let[t,o]of this.#s)t!==this.#l&&JQ.has(o.state)&&this.#s.size>16&&this.#s.delete(t)}#E(){this.#d+=1}};import{randomUUID as su}from"node:crypto";import{extname as ohe}from"node:path";var bY=5*1024*1024,Wpe=20,Zpe=20*1024*1024,Xpe="\u8BF7\u5206\u6790\u8FD9\u5F20\u56FE\u7247\u3002",MY="\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B\u4E0D\u652F\u6301\u76F4\u63A5\u63A5\u6536\u56FE\u7247\u8F93\u5165\u3002\u7528\u6237\u53D1\u9001\u7684\u56FE\u7247\u5DF2\u4F5C\u4E3A\u6587\u4EF6\u4FDD\u5B58\u5230\u5DE5\u4F5C\u533A\uFF08\u89C1\u4E0B\u65B9\u6587\u4EF6\u6E05\u5355\uFF09\u3002\u8BF7\u4F7F\u7528\u53EF\u7528\u5DE5\u5177\u5206\u6790\u8FD9\u4E9B\u56FE\u7247\u6587\u4EF6\u540E\u56DE\u7B54\uFF0C\u4F8B\u5982 run_code \u6216 pwsh \u8BFB\u53D6\u5B57\u8282\u3001\u89E3\u6790\u5143\u6570\u636E\u3001\u8C03\u7528\u56FE\u50CF\u5904\u7406\u6216 OCR \u5E93\uFF1B\u4E0D\u8981\u5047\u8BBE\u81EA\u5DF1\u80FD\u76F4\u63A5\u770B\u5230\u56FE\u7247\u5185\u5BB9\u3002",Qt=class extends Error{constructor(t,o,a,e={}){super(o,e),this.name="ImagePromptError",this.code=t,this.userMessage=a}},OY=Object.freeze({MODEL_DOES_NOT_SUPPORT_IMAGES:"\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u56FE\u7247\uFF0C\u8BF7\u7528 /models \u67E5\u770B\u53EF\u7528\u6A21\u578B\uFF0C\u518D\u7528 /model <\u5E8F\u53F7> \u5207\u6362\u540E\u91CD\u53D1\u3002",IMAGE_TOO_LARGE:"\u56FE\u7247\u8D85\u8FC7\u5BBF\u4E3B\u5141\u8BB8\u7684\u5927\u5C0F\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002",IMAGE_TOO_MANY_PIXELS:"\u56FE\u7247\u5206\u8FA8\u7387\u8FC7\u9AD8\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002",INVALID_IMAGE:"\u56FE\u7247\u5185\u5BB9\u65E0\u6548\u6216\u683C\u5F0F\u4E0D\u53D7\u652F\u6301\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002",INVALID_IMAGE_BASE64:"\u672A\u80FD\u8BFB\u53D6\u56FE\u7247\u5185\u5BB9\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002",IMAGE_TYPE_MISMATCH:"\u56FE\u7247\u683C\u5F0F\u4E0E\u5B9E\u9645\u5185\u5BB9\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002",TOO_MANY_IMAGES:"\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u6570\u91CF\u8D85\u8FC7\u5BBF\u4E3B\u9650\u5236\uFF0C\u8BF7\u51CF\u5C11\u540E\u91CD\u8BD5\u3002",IMAGES_TOO_LARGE:"\u56FE\u7247\u603B\u5927\u5C0F\u8D85\u8FC7\u5BBF\u4E3B\u9650\u5236\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002"});function $pe(n,t){let o=AbortSignal.timeout(t);return n?AbortSignal.any([n,o]):o}async function k_(n){try{await n?.body?.cancel?.()}catch{}}async function ko(n,{fetchImpl:t=fetch,headers:o,signal:a,maxBytes:e=bY,timeoutMs:i=15e3,allowedHosts:A}={}){let r=new URL(n);if(r.protocol!=="https:")throw new Error("Image download URL must use HTTPS");if(Array.isArray(A)&&!A.some(I=>typeof I=="string"&&(r.hostname===I||I.startsWith(".")&&(r.hostname===I.slice(1)||r.hostname.endsWith(I)))))throw new Error("Image download URL is not hosted by the messaging platform");let s=await t(r,{method:"GET",headers:o,signal:$pe(a,i),redirect:"manual"});if(Number.isInteger(s?.status)&&s.status>=300&&s.status<400)throw await k_(s),new Qt("image-redirect-blocked",`Image download redirect was blocked (HTTP ${s.status})`,w("\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\u53D1\u751F\u4E86\u91CD\u5B9A\u5411\uFF0C\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u3002"));if(!s?.ok)throw await k_(s),new Qt("image-http-error",`Image download failed with HTTP ${s?.status??"unknown"}`,w("\u56FE\u7247\u4E0B\u8F7D\u5931\u8D25\uFF08HTTP {status}\uFF09\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002",{status:s?.status??"unknown"}));let g=Number(s.headers?.get?.("content-length"));if(Number.isFinite(g)&&g>e)throw await k_(s),new Qt("image-too-large",`Image response declares ${g} bytes; the limit is ${e}`,w("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));if(s.body?.[Symbol.asyncIterator]){let I=[],d=0;for await(let B of s.body){let f=Buffer.from(B);if(d+=f.length,d>e)throw await s.body.cancel?.().catch?.(()=>{}),new Qt("image-too-large",`Image response exceeded ${e} bytes`,w("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));I.push(f)}return Buffer.concat(I,d)}let c=Buffer.from(await s.arrayBuffer());if(c.length>e)throw new Qt("image-too-large",`Image response contains ${c.length} bytes; the limit is ${e}`,w("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));return c}function ehe(n){return typeof n=="string"?n.trim():""}function _Y(n){return Array.isArray(n?.images)?n.images.filter(Boolean):[]}function v_(n){return typeof n!="string"?void 0:n.replaceAll("\\","/").split("/").at(-1)?.replace(/[\u0000-\u001f\u007f]/g,"").trim().slice(0,255)||void 0}function Ahe(n){if(n.length>=8&&n[0]===137&&n[1]===80&&n[2]===78&&n[3]===71&&n[4]===13&&n[5]===10&&n[6]===26&&n[7]===10)return"image/png";if(n.length>=3&&n[0]===255&&n[1]===216&&n[2]===255)return"image/jpeg";if(n.length>=6){let t=n.subarray(0,6).toString("ascii");if(t==="GIF87a"||t==="GIF89a")return"image/gif"}return n.length>=12&&n.subarray(0,4).toString("ascii")==="RIFF"&&n.subarray(8,12).toString("ascii")==="WEBP"?"image/webp":null}function the(n){if(Buffer.isBuffer(n)||n instanceof Uint8Array)return{data:Buffer.from(n)};let t=n?.data??n?.buffer;return Buffer.isBuffer(t)||t instanceof Uint8Array?{data:Buffer.from(t),name:n?.name??n?.filename}:null}function Pt(n){return _Y(n).length>0}async function P_(n,{signal:t,maxImageBytes:o=bY,maxImages:a=Wpe,maxTotalImageBytes:e=Zpe}={}){let i=_Y(n);if(i.length>a)throw new Qt("too-many-images",`Image message contains ${i.length} images; the limit is ${a}`,w("\u4E00\u6B21\u6700\u591A\u53EA\u80FD\u5904\u7406 {maxImages} \u5F20\u56FE\u7247\u3002",{maxImages:a}));let A=ehe(n?.content),r=[],s=0;A?r.push({type:"text",text:A}):i.length>0&&r.push({type:"text",text:w(Xpe)});for(let[g,c]of i.entries()){if(t?.throwIfAborted(),Number.isFinite(c?.size)&&c.size>o)throw new Qt("image-too-large",`Image ${g+1} declares ${c.size} bytes; the limit is ${o}`,w("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));if(Number.isFinite(c?.size)&&s+c.size>e)throw new Qt("images-too-large",`Images declare more than ${e} bytes in total`,w("\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u603B\u5927\u5C0F\u8FC7\u5927\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6570\u91CF\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));let I;try{I=c?.data===void 0?await c?.load?.({signal:t,maxBytes:o}):c.data}catch(f){throw t?.aborted||f?.name==="AbortError"||f?.name==="TimeoutError"||f instanceof Qt?f:new Qt("image-download-failed",`Unable to download image ${g+1}: ${f?.message??String(f)}`,w("\u56FE\u7247\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),{cause:f})}let d=the(I);if(!d?.data.length)throw new Qt("invalid-image-data",`Image ${g+1} returned no data`,w("\u672A\u80FD\u8BFB\u53D6\u56FE\u7247\u5185\u5BB9\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002"));if(d.data.length>o)throw new Qt("image-too-large",`Image ${g+1} contains ${d.data.length} bytes; the limit is ${o}`,w("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));if(s+d.data.length>e)throw new Qt("images-too-large",`Images contain more than ${e} bytes in total`,w("\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u603B\u5927\u5C0F\u8FC7\u5927\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6570\u91CF\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));s+=d.data.length;let B=Ahe(d.data);if(!B)throw new Qt("unsupported-image-type",`Image ${g+1} is not JPEG, PNG, GIF, or WebP`,w("\u6682\u4E0D\u652F\u6301\u8BE5\u56FE\u7247\u683C\u5F0F\uFF0C\u8BF7\u53D1\u9001 JPEG\u3001PNG\u3001WebP \u6216 GIF \u56FE\u7247\u3002"));r.push({type:"image",mediaType:B,data:d.data.toString("base64"),...v_(d.name??c?.name)?{name:v_(d.name??c?.name)}:{}})}return r}function so(n){if(n instanceof Qt)return{code:"image-prompt-error",reason:n.code,userMessage:n.userMessage};if(n?.code!=="attachment-error"||typeof n?.details?.reason!="string")return null;let t=n.details.reason,o=Object.hasOwn(OY,t)?w(OY[t]):null;return o?{code:"attachment-error",reason:t,userMessage:o}:null}function vo(n){return so(n)?.userMessage??null}var rhe=new Map([["image/png",".png"],["image/jpeg",".jpg"],["image/gif",".gif"],["image/webp",".webp"]]),ihe=/\.(?:png|jpe?g|gif|webp)$/i;function ahe(n,t,o){let a=rhe.get(t)??".img",e=v_(n);return e&&ihe.test(e)?e:`${e??`image-${o+1}`}${a}`}function TY(n){return Array.isArray(n)?n.filter(t=>t?.type==="image").map((t,o)=>({name:ahe(t.name,t.mediaType,o),...typeof t.mediaType=="string"&&t.mediaType.trim()?{mediaType:t.mediaType.trim()}:{},data:Buffer.from(typeof t.data=="string"?t.data:"","base64")})):[]}function NY(n){return Array.isArray(n)?n.filter(t=>t?.type!=="image"):n}function RY(n){return n?.code==="attachment-error"&&n?.details?.reason==="MODEL_DOES_NOT_SUPPORT_IMAGES"}var kY="https://oapi.dingtalk.com/",nhe="https://api.dingtalk.com/",she="DING_DWS_CLAW",ghe="02fcf2f4-5e02-4a85-b672-46d1f715543e.schema",VI="\u{1F914}\u601D\u8003\u4E2D",GY="\u2705\u5DF2\u5B8C\u6210",FY="\u274C\u5904\u7406\u5931\u8D25",che=15e3,Ihe=5e3,lhe="2659900",dhe="im_bg_1",phe=new Set(["WAITING","SUCCESS","FAIL","EXPIRED"]),It=class extends Error{constructor(t,o,a={}){super(o,a),this.name="DingtalkApiError",this.code=t,this.status=a.status,this.providerCode=a.providerCode}};function WA(n){return typeof n=="string"&&n.trim()?n.trim():null}function Iu(n){let t=n==null?null:String(n).trim();return t&&/^-?[A-Za-z0-9_.:-]{1,160}$/.test(t)?t:void 0}function LY(n,t){return Number.isInteger(t?.status)&&(n.status=t.status),t?.providerCode!==void 0&&(n.providerCode=t.providerCode),n}function gu(n,{fallback:t="artifact-provider-rejected"}={}){if(n?.code?.startsWith?.("artifact-"))return n;let o=Number(n?.status),a=Iu(n?.providerCode),e=a??"",i=t,A="DingTalk could not prepare the file for delivery.";o===401||o===403||a==="401"||a==="403"||/(?:permission|forbidden|unauthor|access.?denied|\.auth(?:\.|$))/i.test(e)?(i="artifact-permission-required",A="DingTalk denied permission to send the file."):o===413||a==="413"||/(?:too.?large|size.?limit)/i.test(e)?(i="artifact-too-large",A="The file exceeds DingTalk's size limit."):o===429||a==="429"||/(?:rate.?limit|too.?many|throttl)/i.test(e)?(i="artifact-rate-limited",A="DingTalk rate-limited file delivery."):t==="artifact-provider-rejected"&&(A="DingTalk rejected the file message.");let r=new Error(A,{cause:n});return r.code=i,LY(r,n)}function hhe(n){let t=new Error("DingTalk file delivery result is uncertain",{cause:n});return t.code="artifact-delivery-uncertain",LY(t,n)}function qQ(n){if(!n||typeof n!="object")return null;for(let t of["errcode","code"])if(n[t]!==void 0&&n[t]!==0&&n[t]!=="0")return Iu(n[t])??"rejected";return null}function Ehe(n,t){if(t?.aborted)throw ls(t);let o=Number(n?.status);return n?.code==="network-error"||n?.code==="timeout"||n?.code==="invalid-response"||o>=500&&o<600?hhe(n):gu(n)}function uhe(n){let t;try{t=new URL(n)}catch(o){throw new It("invalid-image-download","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\u3002",{cause:o})}return t.protocol==="http:"&&(!t.port||t.port==="80")&&(t.protocol="https:",t.port=""),t}function vY(n){let t=n.toLowerCase().replace(/\.$/,"");return t==="dingtalk.com"||t.endsWith(".dingtalk.com")}function U_(n,{label:t,requireSubdomain:o=!0}={}){let a;try{a=new URL(n)}catch{throw new It("invalid-url",`${t??"\u9489\u9489\u670D\u52A1"}\u8FD4\u56DE\u4E86\u65E0\u6548\u5730\u5740\u3002`)}let e=a.hostname.toLowerCase().replace(/\.$/,""),i=o?e!=="dingtalk.com"&&vY(e):vY(e);if(a.protocol!=="https:"||!i||a.port&&a.port!=="443")throw new It("untrusted-url",`${t??"\u9489\u9489\u670D\u52A1"}\u5730\u5740\u4E0D\u53D7\u4FE1\u4EFB\u3002`);if(a.username||a.password)throw new It("untrusted-url",`${t??"\u9489\u9489\u670D\u52A1"}\u5730\u5740\u4E0D\u53D7\u4FE1\u4EFB\u3002`);return a}function Sc(n){let t=WA(n);if(!t)throw new It("invalid-session-webhook","\u9489\u9489\u6D88\u606F\u6CA1\u6709\u53EF\u7528\u7684\u56DE\u590D\u5730\u5740\u3002");let o=U_(t,{label:"\u9489\u9489\u56DE\u590D",requireSubdomain:!1});return o.hash="",o.toString()}function UY(n,t=4e3){let o=typeof n=="string"?n.trim():"";if(!o)return[];if(!Number.isInteger(t)||t<1)throw new TypeError("maxChars must be a positive integer");if(o.length<=t)return[o];let a=[],e=o;for(;e.length>t;){let i=e.lastIndexOf(` -`,t);i{if(t?.aborted){a(ls(t));return}let e=setTimeout(()=>{t?.removeEventListener("abort",i),o()},n),i=()=>{clearTimeout(e),a(ls(t))};t?.addEventListener("abort",i,{once:!0})})}async function Dn(n,t,{body:o,signal:a,timeoutMs:e=che,headers:i={},method:A="POST",action:r="request"}={}){let s=new AbortController,g=!1,c=()=>s.abort(a?.reason);if(a?.aborted)throw ls(a);a?.addEventListener("abort",c,{once:!0});let I=e>0?setTimeout(()=>{g=!0,s.abort()},e):null;try{let d=await n(t,{method:A,redirect:"error",headers:{"content-type":"application/json",...i},body:JSON.stringify(o??{}),signal:s.signal});if(!d.ok){let B;try{let f=await d.json();B=Iu(f?.code??f?.errcode)}catch{}throw new It("http-error",`\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u5931\u8D25\uFF08HTTP ${d.status}\uFF09\u3002`,{status:d.status,providerCode:B})}try{return await d.json()}catch(B){throw new It("invalid-response","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u89E3\u6790\u7684\u54CD\u5E94\u3002",{cause:B})}}catch(d){throw a?.aborted?ls(a):g?new It("timeout","\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u8D85\u65F6\u3002",{cause:d}):d instanceof It?d:new It("network-error",`\u6682\u65F6\u65E0\u6CD5\u5B8C\u6210\u9489\u9489${r}\u8BF7\u6C42\u3002`,{cause:d})}finally{I&&clearTimeout(I),a?.removeEventListener("abort",c)}}async function Bhe(n,t,{body:o,signal:a,timeoutMs:e=6e4}={}){let i=new AbortController,A=!1,r=()=>i.abort(a?.reason);if(a?.aborted)throw ls(a);a?.addEventListener("abort",r,{once:!0});let s=setTimeout(()=>{A=!0,i.abort()},e);try{let g=await n(t,{method:"POST",body:o,signal:i.signal,redirect:"error"}),c,I;try{c=await g.json()}catch(d){I=d}if(!g.ok)throw new It("http-error",`\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u5931\u8D25\uFF08HTTP ${g.status}\uFF09\u3002`,{status:g.status,providerCode:Iu(c?.code??c?.errcode)});if(I)throw new It("invalid-response","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u89E3\u6790\u7684\u54CD\u5E94\u3002",{cause:I});return c}catch(g){throw a?.aborted?ls(a):A?new It("timeout","\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u8D85\u65F6\u3002",{cause:g}):g instanceof It?g:new It("network-error","\u6682\u65F6\u65E0\u6CD5\u5B8C\u6210\u9489\u9489\u6587\u4EF6\u4E0A\u4F20\u8BF7\u6C42\u3002",{cause:g})}finally{clearTimeout(s),a?.removeEventListener("abort",r)}}function PY(n){let t=WA(n?.robotCode);if(!t)throw new TypeError("DingTalk robotCode is required");if(n?.type==="group"){let o=WA(n.openConversationId);if(o)return{type:"group",robotCode:t,openConversationId:o}}if(n?.type==="user"){let o=WA(n.userId);if(o)return{type:"user",robotCode:t,userId:o}}throw new TypeError("DingTalk file target is invalid")}function fhe(n){return ohe(n).slice(1).toLowerCase()}function Qhe(n){if(n?.type==="user"){let t=WA(n.userId);if(t)return{type:"user",userId:t}}if(n?.type==="group"){let t=WA(n.openConversationId);if(t)return{type:"group",openConversationId:t,atUserIds:n.atUserIds}}throw new TypeError("DingTalk AI Card target is invalid")}function cu(n,t){let o=e=>String(e).replace(/[&<>"']/g,i=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[i]),a=t?.type==="group"?Object.entries(t.atUserIds??{}).map(([e,i])=>`${o(i)}`).join(" "):"";return mhe(a?`${a} +${w("\u9519\u8BEF\u7801\uFF1A{code}\uFF1B\u53C2\u8003\u53F7\uFF1A{referenceId}",n)}`}function rt(n,t,o){let a=Ppe(t,o);return n.lastMessageError=a,a}function No(n){n.lastMessageError=null}function Yi(n,{uncertain:t=!0}={}){let o=new Error("Channel message delivery failed",{cause:n}),a=Number(n?.status??n?.httpStatus);return o.code=a===401||a===403?"channel-permission":a===429?"channel-rate-limit":t?"channel-delivery-uncertain":"channel-delivery-failed",Number.isInteger(a)&&(o.status=a),o}function ii(n){return!n||typeof n!="object"||typeof n.code!="string"||!n.code||typeof n.reason!="string"||!n.reason||typeof n.message!="string"||!n.message||typeof n.referenceId!="string"||!n.referenceId||!Number.isFinite(n.at)?null:{code:n.code.slice(0,64),reason:n.reason.slice(0,64),message:n.message.slice(0,500),referenceId:n.referenceId.slice(0,40),at:n.at}}import{randomUUID as Gpe}from"node:crypto";import{createRequire as BY}from"node:module";var Fpe=BY(import.meta.url),T_=new Set(["dingtalk-harness-connect-failed","dingtalk-runtime-prepare-failed","dingtalk-stream-client-load-failed","dingtalk-stream-listener-failed","dingtalk-stream-connect-failed"]),Lpe=Object.freeze(["HTTPS_PROXY","https_proxy","HTTP_PROXY","http_proxy","ALL_PROXY","all_proxy"]),Upe=/^\d+\.\d+\.\d+(?:[-+][A-Za-z0-9.-]+)?$/,Hpe=/^DT-CONN-[A-F0-9]{8}$/,jQ;function Is(n,t=500){if(typeof n!="string")return null;let o=n.trim();return o?o.slice(0,t):null}function xd(n){let t=Is(n,80);return t&&Upe.test(t)?t:null}function JQ(n,t=Fpe){try{let o=t.resolve(`${n}/package.json`);return{version:xd(t(o)?.version),require:BY(o)}}catch{return null}}function Kpe(){if(jQ)return jQ;let n=JQ("dingtalk-stream"),t=n?JQ("axios",n.require):null,o=t?JQ("https-proxy-agent",t.require):null,a=o?JQ("agent-base",o.require):null;return jQ=Object.freeze({dingtalkStream:n?.version??null,axios:t?.version??null,httpsProxyAgent:o?.version??null,agentBase:a?.version??null}),jQ}function xpe(n){let t=[],o=new Set,a=n;for(;a&&typeof a=="object"&&t.length<4&&!o.has(a);)o.add(a),t.push(a),a=a.cause;return t}function fY(n){return Number.isInteger(n?.status)?n.status:Number.isInteger(n?.statusCode)?n.statusCode:Number.isInteger(n?.response?.status)?n.response.status:null}function Ype(n){let t=Is(n?.providerCode??n?.response?.data?.code??n?.response?.data?.errorCode??n?.response?.data?.errcode,100);return t&&/^[A-Za-z0-9_.:-]+$/.test(t)?t:null}function jpe(n,t){let o=Is(n);if(!o)return null;for(let a of t){let e=Is(a,2048);e&&e.length>=4&&(o=o.replaceAll(e,"\u2022\u2022\u2022\u2022"))}return o.replace(/(https?:\/\/)[^/\s@]+@/giu,"$1\u2022\u2022\u2022\u2022@").replace(/([?&](?:appsecret|client_secret|clientsecret|access_token|token|password)=)[^&\s]*/giu,"$1\u2022\u2022\u2022\u2022").replace(/((?:app|client|access)[_-]?secret|authorization|password|token)\s*[=:]\s*[^\s,;,。]+/giu,"$1=\u2022\u2022\u2022\u2022").replace(/\b[A-Za-z0-9_.-]*secret[A-Za-z0-9_.-]*\b/giu,"\u2022\u2022\u2022\u2022").slice(0,500)}function Jpe(n){let t=n&&typeof n=="object"?n:{};return{dingtalkStream:xd(t.dingtalkStream),axios:xd(t.axios),httpsProxyAgent:xd(t.httpsProxyAgent),agentBase:xd(t.agentBase)}}function qpe(n,t){return n.map(o=>{let a=Is(o?.name,80),e=Is(o?.code,100),i=fY(o),A=Ype(o),r=jpe(o?.message,t);return{...a?{name:a}:{},...e?{code:e}:{},...i!==null?{status:i}:{},...A?{providerCode:A}:{},...r?{message:r}:{}}})}function zpe(n){return Hpe.test(n??"")?n:`DT-CONN-${Gpe().replaceAll("-","").slice(0,8).toUpperCase()}`}function Ro(n,t,o,a){return Object.freeze({code:n,message:w(t),hint:w(o),referenceId:a})}function Yd(n,t){if(t?.name==="AbortError"||T_.has(t?.code))return t;let o=new Error(Is(t?.message)??"DingTalk runtime startup failed",{cause:t});return o.name="DingtalkRuntimeStartError",o.code=T_.has(n)?n:"dingtalk-runtime-prepare-failed",o}function QY(n,{fallbackMessage:t="\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",clientId:o,clientSecret:a,environment:e=process.env,dependencies:i=Kpe(),nodeVersion:A=process.versions.node,referenceId:r}={}){let s=zpe(r),g=xpe(n),c=new Set(g.map(L=>Is(L?.code,100)?.toUpperCase()).filter(Boolean)),I=g.map(L=>Is(L?.message)?.toLowerCase()).filter(Boolean),d=g.map(fY).filter(L=>L!==null),B=g.map(L=>L?.code).find(L=>T_.has(L))??null,f=Lpe.filter(L=>Is(e?.[L],4096)),Q=f.length>0,y=Jpe(i),m=L=>I.some(U=>L.test(U)),_=L=>[...c].some(U=>L.test(U)),T=d.includes(407)||_(/(?:PROXY|ERR_INVALID_PROTOCOL)/u)||m(/proxy|tunneling socket/u),R;return B==="dingtalk-stream-connect-failed"&&Q&&y.agentBase==="6.0.0"?R=Ro("stream-proxy-dependency-incompatible","\u9489\u9489 Stream \u8FDE\u63A5\u5931\u8D25\uFF1A\u68C0\u6D4B\u5230\u4EE3\u7406\u4F9D\u8D56 agent-base 6.0.0\u3002","\u8BF7\u5C06 DSH profile \u4E2D\u7684 agent-base@6 \u56FA\u5B9A\u4E3A 6.0.2 \u540E\u91CD\u65B0\u5B89\u88C5\u4F9D\u8D56\uFF0C\u6216\u5347\u7EA7 pnpm \u540E\u91CD\u65B0\u89E3\u6790 lockfile\u3002",s):B==="dingtalk-harness-connect-failed"?R=Ro("harness-unavailable","\u63D2\u4EF6\u65E0\u6CD5\u8FDE\u63A5\u672C\u673A Harness\u3002","\u8BF7\u786E\u8BA4 dsh web \u6B63\u5E38\u8FD0\u884C\uFF0C\u5E76\u67E5\u770B dsh web \u65E5\u5FD7\u4E2D\u76F8\u540C\u53C2\u8003\u53F7\u5BF9\u5E94\u7684\u8BCA\u65AD\u4FE1\u606F\u3002",s):B==="dingtalk-stream-client-load-failed"?R=Ro("stream-sdk-load-failed","\u9489\u9489 Stream SDK \u52A0\u8F7D\u5931\u8D25\u3002","\u8BF7\u91CD\u65B0\u5B89\u88C5\u5F53\u524D DSH profile \u7684\u63D2\u4EF6\u4F9D\u8D56\uFF0C\u5E76\u67E5\u770B dsh web \u65E5\u5FD7\u4E2D\u76F8\u540C\u53C2\u8003\u53F7\u5BF9\u5E94\u7684\u8BCA\u65AD\u4FE1\u606F\u3002",s):d.some(L=>L===401||L===403)?R=Ro("stream-credentials-rejected","\u9489\u9489\u62D2\u7EDD\u4E86\u5F53\u524D\u5E94\u7528\u51ED\u636E\u3002","\u8BF7\u6838\u5BF9 Client ID\u3001Client Secret \u548C\u673A\u5668\u4EBA\u6743\u9650\u540E\u91CD\u8BD5\u3002",s):_(/(?:TIMEOUT|ETIMEDOUT)/u)||m(/timed? out|timeout/u)?R=Ro("stream-handshake-timeout","\u8FDE\u63A5\u9489\u9489 Stream \u8D85\u65F6\u3002","\u8BF7\u68C0\u67E5\u7F51\u7EDC\u3001\u4EE3\u7406\u548C\u9632\u706B\u5899\u540E\u91CD\u8BD5\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002",s):_(/^(?:ENOTFOUND|EAI_AGAIN)$/u)?R=Ro("stream-dns-failed","\u65E0\u6CD5\u89E3\u6790\u9489\u9489\u670D\u52A1\u5730\u5740\u3002","\u8BF7\u68C0\u67E5 DNS\u3001\u7F51\u7EDC\u548C\u4EE3\u7406\u8BBE\u7F6E\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002",s):_(/(?:CERT|TLS|SSL|UNABLE_TO_VERIFY)/u)?R=Ro("stream-tls-failed","\u9489\u9489 Stream \u7684 TLS \u8FDE\u63A5\u6821\u9A8C\u5931\u8D25\u3002","\u8BF7\u68C0\u67E5\u7CFB\u7EDF\u8BC1\u4E66\u3001\u4EE3\u7406\u8BC1\u4E66\u6216 HTTPS \u4E2D\u95F4\u4EE3\u7406\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002",s):B==="dingtalk-stream-connect-failed"&&T?R=Ro("stream-proxy-failed","\u9489\u9489 Stream \u65E0\u6CD5\u901A\u8FC7\u5F53\u524D\u4EE3\u7406\u5EFA\u7ACB\u8FDE\u63A5\u3002","\u8BF7\u68C0\u67E5 HTTP_PROXY\u3001HTTPS_PROXY\u3001NO_PROXY \u548C\u4EE3\u7406\u8FDE\u901A\u6027\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002",s):B==="dingtalk-stream-connect-failed"?R=Ro("stream-connect-failed","\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u5EFA\u7ACB\u5931\u8D25\u3002","\u8BF7\u68C0\u67E5\u7F51\u7EDC\u548C\u673A\u5668\u4EBA\u914D\u7F6E\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002",s):B==="dingtalk-stream-listener-failed"?R=Ro("stream-listener-failed","\u9489\u9489 Stream \u6D88\u606F\u76D1\u542C\u521D\u59CB\u5316\u5931\u8D25\u3002","\u8BF7\u786E\u8BA4 dsh-im \u4E0E dingtalk-stream \u7248\u672C\u517C\u5BB9\uFF0C\u5E76\u6309\u53C2\u8003\u53F7\u67E5\u770B dsh web \u65E5\u5FD7\u3002",s):B==="dingtalk-runtime-prepare-failed"?R=Ro("runtime-prepare-failed","\u9489\u9489\u673A\u5668\u4EBA\u8FD0\u884C\u73AF\u5883\u521D\u59CB\u5316\u5931\u8D25\u3002","\u8BF7\u68C0\u67E5 DSH \u6570\u636E\u76EE\u5F55\u3001\u5DE5\u4F5C\u533A\u548C\u63D2\u4EF6\u4F9D\u8D56\uFF0C\u5E76\u6309\u53C2\u8003\u53F7\u67E5\u770B dsh web \u65E5\u5FD7\u3002",s):R=Ro("connection-failed",t,"\u8BF7\u5728 dsh web \u65E5\u5FD7\u4E2D\u67E5\u627E\u76F8\u540C\u53C2\u8003\u53F7\uFF0C\u4EE5\u83B7\u53D6\u5DF2\u8131\u654F\u7684\u5177\u4F53\u9519\u8BEF\u3002",s),Object.freeze({publicError:R,diagnostic:Object.freeze({referenceId:s,category:R.code,stage:B,runtime:{node:xd(A)},proxy:{configured:Q,variables:f},dependencies:y,errors:qpe(g,[o,a])})})}function N_(n,t){let o=new Error(n.message,{cause:t});return o.name="DingtalkPublicConnectionError",o.code=n.code,o.publicError=structuredClone(n),o}var yY=new Set(["starting","pending","connecting"]),qQ=new Set(["connected","expired","failed","cancelled"]);function ai(n){return typeof n=="string"&&n.trim()?n.trim():null}function wn(n,t){return Object.freeze({code:n,message:t})}function wY(n){return typeof n?.now=="function"?n.now():n()}function Wpe(n){return new Date(wY(n)).toISOString()}function Sc(){return new DOMException("DingTalk provisioning was cancelled","AbortError")}function VI(n){return n?{attemptId:n.id,status:n.state,...n.verificationUrl?{verificationUrl:n.verificationUrl}:{},...n.expiresAt?{expiresAt:n.expiresAt}:{},...n.pollIntervalMs?{pollIntervalMs:n.pollIntervalMs}:{},...n.botId?{botId:n.botId}:{},...n.alreadyConnected?{alreadyConnected:!0}:{},...n.error?{error:structuredClone(n.error)}:{}}:null}function R_(n){if(!n)return{};let t=typeof n.status=="function"?n.status():n.status;return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}function mY(n,t){if(!n||t.connected===!1||t.ready===!1)return!1;let o=ai(t.dingtalkStreamState??t.dingtalkConnectionState??t.connectionState??t.state)?.toLowerCase();return["failed","error","offline","disconnected","stopped"].includes(o)?!1:t.connected===!0||t.ready===!0||o==="connected"||o==="ready"}function DY(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let t=ai(n.staffId??n.senderStaffId??n.senderId);if(!t)return null;let o=ai(n.requestId),a=o&&/^ding_sender_[A-Za-z0-9_-]{1,100}$/.test(o)&&!o.includes(t)?o:null;return a?{requestId:a,staffId:t,displayName:ai(n.displayName??n.senderName??n.senderNick)??w("\u9489\u9489\u7528\u6237"),requestedAt:ai(n.requestedAt)}:null}function SY(n){if(!Array.isArray(n.pendingSenders))return[];let t=new Set,o=[];for(let a of n.pendingSenders){let e=DY(a);!e||t.has(e.staffId)||(t.add(e.staffId),o.push(e))}return o}function Zpe(n){return{requestId:n.requestId,displayName:n.displayName,senderIdMasked:b_(n.staffId),requestedAt:n.requestedAt}}function Xpe(n){return{senderKey:n.senderKey,displayName:ai(n.displayName)??w("\u9489\u9489\u7528\u6237"),senderIdMasked:b_(n.staffId),approvedAt:ai(n.approvedAt)}}var nu=class{#e;#A;#t;#r;#I;#o;#g;#i=new Map;#a=new Map;#s=new Map;#l=null;#c=new Map;#d=0;#n=!1;constructor({deviceAuth:t,credentials:o,configStore:a,createRuntime:e,deleteState:i=async()=>{},logger:A=console,clock:r=Date}){if(!t||typeof t.start!="function"||typeof t.poll!="function")throw new TypeError("DingtalkController requires a DingTalk device auth client");if(!o||typeof o.resolve!="function"||typeof o.set!="function"||typeof o.unset!="function")throw new TypeError("DingtalkController requires the DSH credential provider");if(!a||typeof a.list!="function"||typeof a.get!="function"||typeof a.getByClientId!="function"||typeof a.save!="function"||typeof a.remove!="function")throw new TypeError("DingtalkController requires a loaded config store");if(typeof e!="function")throw new TypeError("createRuntime is required");if(typeof i!="function")throw new TypeError("deleteState must be a function");if(typeof r!="function"&&typeof r?.now!="function")throw new TypeError("clock must be a function or expose now()");this.#e=t,this.#A=o,this.#t=a,this.#r=e,this.#I=i,this.#o=A,this.#g=r}async initialize(){if(this.#n)return this.status();for(let t of this.#t.list()){let o=this.#i.get(t.botId);try{if(mY(o,R_(o)))continue}catch{}await this.#Q(t.botId,async()=>{let a=this.#t.get(t.botId);if(!a||this.#n)return;let e=await this.#y(a.secretRef);if(!e){this.#a.set(a.botId,wn("missing-secret",w("\u9489\u9489\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002"))),this.#E();return}try{await this.#C(a,e),this.#a.delete(a.botId)}catch(i){this.#B({config:a,clientSecret:e,error:i,fallbackMessage:"\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`bot ${a.botId} failed to initialize`})}this.#E()})}return this.status()}async startProvisioning({signal:t}={}){if(this.#n)throw new Error("dsh-dingtalk controller is closed");this.#l&&await this.cancelProvisioning(this.#l);let o={id:Vpe(),state:"starting",controller:new AbortController,deviceCode:null,verificationUrl:null,expiresAt:null,pollIntervalMs:null,pollTask:null,botId:null,alreadyConnected:!1,error:null};this.#s.set(o.id,o),this.#l=o.id,this.#E();let a=()=>o.controller.abort(t?.reason);t?.aborted?a():t?.addEventListener("abort",a,{once:!0});try{let e=await this.#e.start({signal:o.controller.signal});if(this.#m(o),o.deviceCode=ai(e.deviceCode),o.verificationUrl=ai(e.verificationUrl),o.expiresAt=Number(e.expiresAt),o.pollIntervalMs=Number(e.pollIntervalMs),!o.deviceCode||!o.verificationUrl||!Number.isFinite(o.expiresAt)||!Number.isFinite(o.pollIntervalMs)||o.pollIntervalMs<=0)throw new Error("DingTalk device auth returned incomplete registration metadata");return o.state="pending",this.#E(),VI(o)}catch(e){if(o.controller.signal.aborted||e?.name==="AbortError"?(o.state="cancelled",o.error=wn("cancelled",w("\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002"))):(o.state="failed",o.error=wn("qr-start-failed",w("\u65E0\u6CD5\u751F\u6210\u9489\u9489\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))),this.#l===o.id&&(this.#l=null),this.#E(),o.state==="failed")throw e;return VI(o)}finally{t?.removeEventListener("abort",a)}}async bindCredentials({clientId:t,clientSecret:o}={}){if(this.#n)throw new Error("dsh-dingtalk controller is closed");let a=ai(t),e=ai(o);if(!a||!e)throw new TypeError("DingTalk Client ID and Client Secret are required");if(this.#l&&await this.cancelProvisioning(this.#l),this.#n)throw new Error("dsh-dingtalk controller is closed");let i=xQ(a);return await this.#Q(i.botId,async()=>{if(this.#n)throw Sc();let A=this.#t.getByClientId(a),r=await this.#A.resolve(i.secretRef).catch(()=>{});if(this.#n)throw Sc();let s={botId:i.botId,clientId:a,secretRef:i.secretRef,approvedSenders:A?.approvedSenders??[]};await this.#A.set(i.secretRef,e);try{await this.#t.save(s)}catch(g){throw await this.#w(i.secretRef,r),g}try{await this.#C(s,e),this.#a.delete(i.botId)}catch(g){this.#B({config:s,clientSecret:e,error:g,fallbackMessage:"\u9489\u9489\u5DF2\u63A5\u5165\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`credential-bound bot ${i.botId} is not ready`})}this.#E()}),this.status()}async registrationStatus(t){let o=this.#s.get(t);if(!o)return null;if(qQ.has(o.state)||o.state==="starting")return VI(o);if(wY(this.#g)>=o.expiresAt)return o.state="expired",o.error=wn("expired",w("\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002")),this.#l===o.id&&(this.#l=null),this.#E(),VI(o);if(!o.pollTask){let a=this.#p(o).finally(()=>{o.pollTask===a&&(o.pollTask=null)});o.pollTask=a}return await o.pollTask,VI(o)}async cancelProvisioning(t){let o=this.#s.get(t);return o?(qQ.has(o.state)||(o.controller.abort(),await o.pollTask?.catch(()=>{}),qQ.has(o.state)||(o.state="cancelled"),o.error??=wn("cancelled",w("\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002"))),this.#l===o.id&&(this.#l=null),this.#E(),VI(o)):null}async reconnectBot(t){let o=this.#t.get(t);if(!o)throw new Error("Unknown DingTalk bot");return await this.#Q(t,async()=>{let a=await this.#y(o.secretRef);if(!a)throw new Error("The DingTalk client secret is missing");try{await this.#C(o,a),this.#a.delete(t)}catch(e){let i=this.#B({config:o,clientSecret:a,error:e,fallbackMessage:"\u9489\u9489\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`bot ${t} failed to reconnect`});throw N_(i,e)}finally{this.#E()}}),this.status()}async sendConnectionTest(t){let o=this.#t.get(t);if(!o)throw new Error("Unknown DingTalk bot");return this.#Q(t,async()=>{let a=this.#i.get(t);if(!a?.status?.ready||typeof a.sendConnectionTest!="function")throw Qr(w("\u9489\u9489\u673A\u5668\u4EBA"));return a.sendConnectionTest(xi(w("\u9489\u9489\u673A\u5668\u4EBA\uFF08{clientId}\uFF09",{clientId:M_(o.clientId)})))})}async sendProactiveText(t,o,a,e={}){if(!this.#t.get(t))throw new Error("Unknown DingTalk bot");return this.#Q(t,async()=>{let A=this.#i.get(t);if(!A?.status?.ready||typeof A.sendProactiveText!="function"){let r=new Error(w("\u9489\u9489\u6D88\u606F\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF"));throw r.code="bot-not-connected",r}return A.sendProactiveText(o,a,e)})}async deleteBot(t){let o=this.#t.get(t);if(!o)throw new Error("Unknown DingTalk bot");return await this.#Q(t,async()=>{let a=await this.#A.resolve(o.secretRef).catch(()=>{});await this.#f(t);try{await this.#A.unset(o.secretRef),await this.#t.remove(t)}catch(e){throw ai(a?.value)&&(await this.#A.set(o.secretRef,a.value).catch(()=>{}),await this.#C(o,a.value).catch(()=>{})),new Error("Unable to remove the DingTalk bot safely.",{cause:e})}try{await this.#I({botId:t,config:o})}catch{this.#o.warn?.(`[dsh-dingtalk] bot ${t} state cleanup failed`)}this.#a.delete(t),this.#E()}),this.status()}async approveSender(t,o){let a=this.#t.get(t);if(!a)throw new Error("Unknown DingTalk bot");let e=this.#i.get(t),i=typeof e?.pendingSender=="function"?DY(e.pendingSender(o)):null,A=SY(R_(e)),r=i?.requestId===o?i:A.find(g=>g.requestId===o);if(!r)throw new Error("Unknown DingTalk sender approval request");if(a.approvedSenders.some(g=>g.staffId===r.staffId))return this.status();let s={...a,approvedSenders:[...a.approvedSenders,{senderKey:dY(),staffId:r.staffId,displayName:r.displayName,approvedAt:Wpe(this.#g)}]};return await this.#u(a,s),this.status()}async revokeSender(t,o){let a=this.#t.get(t);if(!a)throw new Error("Unknown DingTalk bot");let e=a.approvedSenders.findIndex(A=>A.senderKey===o);if(e===-1)throw new Error("Unknown approved DingTalk sender");let i=[...a.approvedSenders];return i.splice(e,1),await this.#u(a,{...a,approvedSenders:i}),this.status()}status(){let t=this.#t.list().map(e=>{let i=this.#i.get(e.botId),A={};try{A=R_(i)}catch{A={state:"error"}}let r=mY(i,A),s=this.#a.get(e.botId),g=r?"connected":s?"error":"offline",c=new Set(e.approvedSenders.map(d=>d.staffId)),I=SY(A).filter(d=>!c.has(d.staffId)).map(Zpe);return{botId:e.botId,state:g,connected:r,configured:!0,bot:{name:w("\u9489\u9489\u673A\u5668\u4EBA"),clientIdMasked:M_(e.clientId)},health:{status:r?"healthy":s?"error":"offline",summary:r?w("\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38"):s?.message??w("\u9489\u9489\u6D88\u606F\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF"),lastCheckedAt:A.lastCheckedAt??null},stats:{messagesReceived:Number(A.messagesReceived)||0,messagesReplied:Number(A.messagesReplied)||0},lastMessageError:ii(A.lastMessageError),senders:{pending:I,approved:e.approvedSenders.map(Xpe)},error:s?structuredClone(s):null}}),o=t.filter(e=>e.connected).length,a=this.#l?this.#s.get(this.#l):null;return{schemaVersion:1,revision:this.#d,state:a&&yY.has(a.state)?"provisioning":t.length===0?"disconnected":o===t.length?"connected":o>0?"degraded":"offline",bots:t,totals:{configured:t.length,connected:o},...a&&yY.has(a.state)?{provisioning:VI(a)}:{}}}async close(){this.#n||(this.#n=!0,this.#l&&await this.cancelProvisioning(this.#l),await Promise.allSettled([...this.#i.keys()].map(t=>this.#f(t))),await Promise.allSettled([...this.#c.values()]),await Promise.allSettled([...this.#i.keys()].map(t=>this.#f(t))))}async#p(t){try{this.#m(t);let o=await this.#e.poll({deviceCode:t.deviceCode,signal:t.controller.signal});this.#m(t);let a=ai(o.status)?.toUpperCase();if(a==="WAITING")t.state="pending",t.error=null;else if(a==="SUCCESS"){let e=ai(o.clientId),i=ai(o.clientSecret);if(!e||!i)throw new Error("DingTalk returned incomplete credentials");t.state="connecting",t.error=null,this.#E();let A=await this.#h(t,{clientId:e,clientSecret:i});t.botId=A.botId,t.alreadyConnected=A.alreadyConnected,t.state="connected",this.#l===t.id&&(this.#l=null)}else a==="EXPIRED"?(t.state="expired",t.error=wn("expired",w("\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002")),this.#l===t.id&&(this.#l=null)):a==="FAIL"?(t.state="failed",t.error=wn("authorization-failed",w("\u9489\u9489\u672A\u5B8C\u6210\u673A\u5668\u4EBA\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u626B\u7801\u3002")),this.#l===t.id&&(this.#l=null)):(t.state="pending",t.error=wn("poll-pending",w("\u9489\u9489\u6388\u6743\u72B6\u6001\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002")))}catch(o){t.controller.signal.aborted||o?.name==="AbortError"?(t.state="cancelled",t.error=wn("cancelled",w("\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002")),this.#l===t.id&&(this.#l=null)):t.state==="connecting"?(t.state="failed",t.error=wn("activation-failed",w("\u9489\u9489\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002")),this.#l===t.id&&(this.#l=null),this.#o.error?.("[dsh-dingtalk] bot activation failed")):(t.state="pending",t.error=wn("poll-failed",w("\u9489\u9489\u6388\u6743\u67E5\u8BE2\u6682\u65F6\u5931\u8D25\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002")))}finally{this.#E(),this.#D()}}async#h(t,{clientId:o,clientSecret:a}){let e=xQ(o),i=this.#t.getByClientId(o),A=await this.#A.resolve(e.secretRef).catch(()=>{}),r={botId:e.botId,clientId:o,secretRef:e.secretRef,approvedSenders:i?.approvedSenders??[]};return this.#Q(e.botId,async()=>{let s=async()=>{await this.#f(e.botId),i?await this.#t.save(i).catch(()=>{}):this.#t.get(e.botId)&&await this.#t.remove(e.botId).catch(()=>null)&&await this.#I({botId:e.botId,config:r}).catch(c=>{this.#o.warn?.("[dsh-dingtalk] failed to clean up cancelled bot state:",c)}),await this.#w(e.secretRef,A),i&&ai(A?.value)&&await this.#C(i,A.value).catch(()=>{})};await this.#A.set(e.secretRef,a);try{this.#m(t),await this.#t.save(r),this.#m(t)}catch(g){throw await s(),g}try{await this.#C(r,a),this.#m(t),this.#a.delete(e.botId)}catch(g){if(t.controller.signal.aborted||this.#l!==t.id)throw await s(),Sc();this.#B({config:r,clientSecret:a,error:g,fallbackMessage:"\u9489\u9489\u5DF2\u63A5\u5165\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`authorized bot ${e.botId} is not ready`})}return{botId:e.botId,alreadyConnected:!!i}})}async#u(t,o){return this.#Q(t.botId,async()=>{let a=await this.#y(t.secretRef);if(!a)throw new Error("The DingTalk client secret is missing");await this.#t.save(o);try{await this.#C(o,a),this.#a.delete(t.botId)}catch(e){await this.#t.save(t).catch(()=>{}),await this.#C(t,a).catch(()=>{});let i=this.#B({config:t,clientSecret:a,error:e,fallbackMessage:"\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`bot ${t.botId} failed to apply updated settings`});throw N_(i,e)}finally{this.#E()}})}async#C(t,o){if(this.#n||(await this.#f(t.botId),this.#n))throw Sc();let a;try{a=await this.#r({botId:t.botId,config:structuredClone(t),clientSecret:o})}catch(e){throw Yd("dingtalk-runtime-prepare-failed",e)}if(!a||typeof a.start!="function"||typeof a.stop!="function")throw Yd("dingtalk-runtime-prepare-failed",new TypeError("createRuntime returned an invalid DingTalk runtime"));if(this.#n)throw await a.stop().catch(()=>{}),Sc();this.#i.set(t.botId,a);try{if(await a.start(),this.#n)throw await a.stop().catch(()=>{}),Sc()}catch(e){throw this.#i.get(t.botId)===a&&this.#i.delete(t.botId),await a.stop().catch(()=>{}),Yd("dingtalk-stream-connect-failed",e)}}#B({config:t,clientSecret:o,error:a,fallbackMessage:e,context:i}){let A=QY(a,{fallbackMessage:e,clientId:t.clientId,clientSecret:o});return this.#a.set(t.botId,A.publicError),this.#o.error?.(`[dsh-dingtalk] ${i} [${A.publicError.referenceId}]`,A.diagnostic),A.publicError}async#f(t){let o=this.#i.get(t);this.#i.delete(t),await o?.stop().catch(()=>{this.#o.warn?.(`[dsh-dingtalk] bot ${t} failed to stop cleanly`)})}async#y(t){let o=await this.#A.resolve(t).catch(()=>{});return ai(o?.value)}async#w(t,o){try{ai(o?.value)?await this.#A.set(t,o.value):await this.#A.unset(t)}catch{this.#o.error?.(`[dsh-dingtalk] failed to restore credential ${t}`)}}#m(t){if(t.controller.signal.aborted||this.#l!==t.id)throw Sc()}#Q(t,o){if(this.#n)return Promise.reject(new Error("dsh-dingtalk controller is closed"));let i=(this.#c.get(t)??Promise.resolve()).catch(()=>{}).then(o).finally(()=>{this.#c.get(t)===i&&this.#c.delete(t)});return this.#c.set(t,i),i}#D(){for(let[t,o]of this.#s)t!==this.#l&&qQ.has(o.state)&&this.#s.size>16&&this.#s.delete(t)}#E(){this.#d+=1}};import{randomUUID as su}from"node:crypto";import{extname as ghe}from"node:path";var bY=5*1024*1024,$pe=20,ehe=20*1024*1024,Ahe="\u8BF7\u5206\u6790\u8FD9\u5F20\u56FE\u7247\u3002",MY="\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B\u4E0D\u652F\u6301\u76F4\u63A5\u63A5\u6536\u56FE\u7247\u8F93\u5165\u3002\u7528\u6237\u53D1\u9001\u7684\u56FE\u7247\u5DF2\u4F5C\u4E3A\u6587\u4EF6\u4FDD\u5B58\u5230\u5DE5\u4F5C\u533A\uFF08\u89C1\u4E0B\u65B9\u6587\u4EF6\u6E05\u5355\uFF09\u3002\u8BF7\u4F7F\u7528\u53EF\u7528\u5DE5\u5177\u5206\u6790\u8FD9\u4E9B\u56FE\u7247\u6587\u4EF6\u540E\u56DE\u7B54\uFF0C\u4F8B\u5982 run_code \u6216 pwsh \u8BFB\u53D6\u5B57\u8282\u3001\u89E3\u6790\u5143\u6570\u636E\u3001\u8C03\u7528\u56FE\u50CF\u5904\u7406\u6216 OCR \u5E93\uFF1B\u4E0D\u8981\u5047\u8BBE\u81EA\u5DF1\u80FD\u76F4\u63A5\u770B\u5230\u56FE\u7247\u5185\u5BB9\u3002",Qt=class extends Error{constructor(t,o,a,e={}){super(o,e),this.name="ImagePromptError",this.code=t,this.userMessage=a}},OY=Object.freeze({MODEL_DOES_NOT_SUPPORT_IMAGES:"\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u56FE\u7247\uFF0C\u8BF7\u7528 /models \u67E5\u770B\u53EF\u7528\u6A21\u578B\uFF0C\u518D\u7528 /model <\u5E8F\u53F7> \u5207\u6362\u540E\u91CD\u53D1\u3002",IMAGE_TOO_LARGE:"\u56FE\u7247\u8D85\u8FC7\u5BBF\u4E3B\u5141\u8BB8\u7684\u5927\u5C0F\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002",IMAGE_TOO_MANY_PIXELS:"\u56FE\u7247\u5206\u8FA8\u7387\u8FC7\u9AD8\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002",INVALID_IMAGE:"\u56FE\u7247\u5185\u5BB9\u65E0\u6548\u6216\u683C\u5F0F\u4E0D\u53D7\u652F\u6301\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002",INVALID_IMAGE_BASE64:"\u672A\u80FD\u8BFB\u53D6\u56FE\u7247\u5185\u5BB9\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002",IMAGE_TYPE_MISMATCH:"\u56FE\u7247\u683C\u5F0F\u4E0E\u5B9E\u9645\u5185\u5BB9\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002",TOO_MANY_IMAGES:"\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u6570\u91CF\u8D85\u8FC7\u5BBF\u4E3B\u9650\u5236\uFF0C\u8BF7\u51CF\u5C11\u540E\u91CD\u8BD5\u3002",IMAGES_TOO_LARGE:"\u56FE\u7247\u603B\u5927\u5C0F\u8D85\u8FC7\u5BBF\u4E3B\u9650\u5236\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002"});function the(n,t){let o=AbortSignal.timeout(t);return n?AbortSignal.any([n,o]):o}async function k_(n){try{await n?.body?.cancel?.()}catch{}}async function ko(n,{fetchImpl:t=fetch,headers:o,signal:a,maxBytes:e=bY,timeoutMs:i=15e3,allowedHosts:A}={}){let r=new URL(n);if(r.protocol!=="https:")throw new Error("Image download URL must use HTTPS");if(Array.isArray(A)&&!A.some(I=>typeof I=="string"&&(r.hostname===I||I.startsWith(".")&&(r.hostname===I.slice(1)||r.hostname.endsWith(I)))))throw new Error("Image download URL is not hosted by the messaging platform");let s=await t(r,{method:"GET",headers:o,signal:the(a,i),redirect:"manual"});if(Number.isInteger(s?.status)&&s.status>=300&&s.status<400)throw await k_(s),new Qt("image-redirect-blocked",`Image download redirect was blocked (HTTP ${s.status})`,w("\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\u53D1\u751F\u4E86\u91CD\u5B9A\u5411\uFF0C\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u3002"));if(!s?.ok)throw await k_(s),new Qt("image-http-error",`Image download failed with HTTP ${s?.status??"unknown"}`,w("\u56FE\u7247\u4E0B\u8F7D\u5931\u8D25\uFF08HTTP {status}\uFF09\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002",{status:s?.status??"unknown"}));let g=Number(s.headers?.get?.("content-length"));if(Number.isFinite(g)&&g>e)throw await k_(s),new Qt("image-too-large",`Image response declares ${g} bytes; the limit is ${e}`,w("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));if(s.body?.[Symbol.asyncIterator]){let I=[],d=0;for await(let B of s.body){let f=Buffer.from(B);if(d+=f.length,d>e)throw await s.body.cancel?.().catch?.(()=>{}),new Qt("image-too-large",`Image response exceeded ${e} bytes`,w("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));I.push(f)}return Buffer.concat(I,d)}let c=Buffer.from(await s.arrayBuffer());if(c.length>e)throw new Qt("image-too-large",`Image response contains ${c.length} bytes; the limit is ${e}`,w("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));return c}function rhe(n){return typeof n=="string"?n.trim():""}function _Y(n){return Array.isArray(n?.images)?n.images.filter(Boolean):[]}function v_(n){return typeof n!="string"?void 0:n.replaceAll("\\","/").split("/").at(-1)?.replace(/[\u0000-\u001f\u007f]/g,"").trim().slice(0,255)||void 0}function ihe(n){if(n.length>=8&&n[0]===137&&n[1]===80&&n[2]===78&&n[3]===71&&n[4]===13&&n[5]===10&&n[6]===26&&n[7]===10)return"image/png";if(n.length>=3&&n[0]===255&&n[1]===216&&n[2]===255)return"image/jpeg";if(n.length>=6){let t=n.subarray(0,6).toString("ascii");if(t==="GIF87a"||t==="GIF89a")return"image/gif"}return n.length>=12&&n.subarray(0,4).toString("ascii")==="RIFF"&&n.subarray(8,12).toString("ascii")==="WEBP"?"image/webp":null}function ahe(n){if(Buffer.isBuffer(n)||n instanceof Uint8Array)return{data:Buffer.from(n)};let t=n?.data??n?.buffer;return Buffer.isBuffer(t)||t instanceof Uint8Array?{data:Buffer.from(t),name:n?.name??n?.filename}:null}function Pt(n){return _Y(n).length>0}async function P_(n,{signal:t,maxImageBytes:o=bY,maxImages:a=$pe,maxTotalImageBytes:e=ehe}={}){let i=_Y(n);if(i.length>a)throw new Qt("too-many-images",`Image message contains ${i.length} images; the limit is ${a}`,w("\u4E00\u6B21\u6700\u591A\u53EA\u80FD\u5904\u7406 {maxImages} \u5F20\u56FE\u7247\u3002",{maxImages:a}));let A=rhe(n?.content),r=[],s=0;A?r.push({type:"text",text:A}):i.length>0&&r.push({type:"text",text:w(Ahe)});for(let[g,c]of i.entries()){if(t?.throwIfAborted(),Number.isFinite(c?.size)&&c.size>o)throw new Qt("image-too-large",`Image ${g+1} declares ${c.size} bytes; the limit is ${o}`,w("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));if(Number.isFinite(c?.size)&&s+c.size>e)throw new Qt("images-too-large",`Images declare more than ${e} bytes in total`,w("\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u603B\u5927\u5C0F\u8FC7\u5927\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6570\u91CF\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));let I;try{I=c?.data===void 0?await c?.load?.({signal:t,maxBytes:o}):c.data}catch(f){throw t?.aborted||f?.name==="AbortError"||f?.name==="TimeoutError"||f instanceof Qt?f:new Qt("image-download-failed",`Unable to download image ${g+1}: ${f?.message??String(f)}`,w("\u56FE\u7247\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),{cause:f})}let d=ahe(I);if(!d?.data.length)throw new Qt("invalid-image-data",`Image ${g+1} returned no data`,w("\u672A\u80FD\u8BFB\u53D6\u56FE\u7247\u5185\u5BB9\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002"));if(d.data.length>o)throw new Qt("image-too-large",`Image ${g+1} contains ${d.data.length} bytes; the limit is ${o}`,w("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));if(s+d.data.length>e)throw new Qt("images-too-large",`Images contain more than ${e} bytes in total`,w("\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u603B\u5927\u5C0F\u8FC7\u5927\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6570\u91CF\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));s+=d.data.length;let B=ihe(d.data);if(!B)throw new Qt("unsupported-image-type",`Image ${g+1} is not JPEG, PNG, GIF, or WebP`,w("\u6682\u4E0D\u652F\u6301\u8BE5\u56FE\u7247\u683C\u5F0F\uFF0C\u8BF7\u53D1\u9001 JPEG\u3001PNG\u3001WebP \u6216 GIF \u56FE\u7247\u3002"));r.push({type:"image",mediaType:B,data:d.data.toString("base64"),...v_(d.name??c?.name)?{name:v_(d.name??c?.name)}:{}})}return r}function so(n){if(n instanceof Qt)return{code:"image-prompt-error",reason:n.code,userMessage:n.userMessage};if(n?.code!=="attachment-error"||typeof n?.details?.reason!="string")return null;let t=n.details.reason,o=Object.hasOwn(OY,t)?w(OY[t]):null;return o?{code:"attachment-error",reason:t,userMessage:o}:null}function vo(n){return so(n)?.userMessage??null}var ohe=new Map([["image/png",".png"],["image/jpeg",".jpg"],["image/gif",".gif"],["image/webp",".webp"]]),nhe=/\.(?:png|jpe?g|gif|webp)$/i;function she(n,t,o){let a=ohe.get(t)??".img",e=v_(n);return e&&nhe.test(e)?e:`${e??`image-${o+1}`}${a}`}function TY(n){return Array.isArray(n)?n.filter(t=>t?.type==="image").map((t,o)=>({name:she(t.name,t.mediaType,o),...typeof t.mediaType=="string"&&t.mediaType.trim()?{mediaType:t.mediaType.trim()}:{},data:Buffer.from(typeof t.data=="string"?t.data:"","base64")})):[]}function NY(n){return Array.isArray(n)?n.filter(t=>t?.type!=="image"):n}function RY(n){return n?.code==="attachment-error"&&n?.details?.reason==="MODEL_DOES_NOT_SUPPORT_IMAGES"}var kY="https://oapi.dingtalk.com/",che="https://api.dingtalk.com/",Ihe="DING_DWS_CLAW",lhe="02fcf2f4-5e02-4a85-b672-46d1f715543e.schema",WI="\u{1F914}\u601D\u8003\u4E2D",GY="\u2705\u5DF2\u5B8C\u6210",FY="\u274C\u5904\u7406\u5931\u8D25",dhe=15e3,phe=5e3,hhe="2659900",Ehe="im_bg_1",uhe=new Set(["WAITING","SUCCESS","FAIL","EXPIRED"]),It=class extends Error{constructor(t,o,a={}){super(o,a),this.name="DingtalkApiError",this.code=t,this.status=a.status,this.providerCode=a.providerCode}};function WA(n){return typeof n=="string"&&n.trim()?n.trim():null}function Iu(n){let t=n==null?null:String(n).trim();return t&&/^-?[A-Za-z0-9_.:-]{1,160}$/.test(t)?t:void 0}function LY(n,t){return Number.isInteger(t?.status)&&(n.status=t.status),t?.providerCode!==void 0&&(n.providerCode=t.providerCode),n}function gu(n,{fallback:t="artifact-provider-rejected"}={}){if(n?.code?.startsWith?.("artifact-"))return n;let o=Number(n?.status),a=Iu(n?.providerCode),e=a??"",i=t,A="DingTalk could not prepare the file for delivery.";o===401||o===403||a==="401"||a==="403"||/(?:permission|forbidden|unauthor|access.?denied|\.auth(?:\.|$))/i.test(e)?(i="artifact-permission-required",A="DingTalk denied permission to send the file."):o===413||a==="413"||/(?:too.?large|size.?limit)/i.test(e)?(i="artifact-too-large",A="The file exceeds DingTalk's size limit."):o===429||a==="429"||/(?:rate.?limit|too.?many|throttl)/i.test(e)?(i="artifact-rate-limited",A="DingTalk rate-limited file delivery."):t==="artifact-provider-rejected"&&(A="DingTalk rejected the file message.");let r=new Error(A,{cause:n});return r.code=i,LY(r,n)}function Che(n){let t=new Error("DingTalk file delivery result is uncertain",{cause:n});return t.code="artifact-delivery-uncertain",LY(t,n)}function zQ(n){if(!n||typeof n!="object")return null;for(let t of["errcode","code"])if(n[t]!==void 0&&n[t]!==0&&n[t]!=="0")return Iu(n[t])??"rejected";return null}function Bhe(n,t){if(t?.aborted)throw ls(t);let o=Number(n?.status);return n?.code==="network-error"||n?.code==="timeout"||n?.code==="invalid-response"||o>=500&&o<600?Che(n):gu(n)}function fhe(n){let t;try{t=new URL(n)}catch(o){throw new It("invalid-image-download","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\u3002",{cause:o})}return t.protocol==="http:"&&(!t.port||t.port==="80")&&(t.protocol="https:",t.port=""),t}function vY(n){let t=n.toLowerCase().replace(/\.$/,"");return t==="dingtalk.com"||t.endsWith(".dingtalk.com")}function U_(n,{label:t,requireSubdomain:o=!0}={}){let a;try{a=new URL(n)}catch{throw new It("invalid-url",`${t??"\u9489\u9489\u670D\u52A1"}\u8FD4\u56DE\u4E86\u65E0\u6548\u5730\u5740\u3002`)}let e=a.hostname.toLowerCase().replace(/\.$/,""),i=o?e!=="dingtalk.com"&&vY(e):vY(e);if(a.protocol!=="https:"||!i||a.port&&a.port!=="443")throw new It("untrusted-url",`${t??"\u9489\u9489\u670D\u52A1"}\u5730\u5740\u4E0D\u53D7\u4FE1\u4EFB\u3002`);if(a.username||a.password)throw new It("untrusted-url",`${t??"\u9489\u9489\u670D\u52A1"}\u5730\u5740\u4E0D\u53D7\u4FE1\u4EFB\u3002`);return a}function wc(n){let t=WA(n);if(!t)throw new It("invalid-session-webhook","\u9489\u9489\u6D88\u606F\u6CA1\u6709\u53EF\u7528\u7684\u56DE\u590D\u5730\u5740\u3002");let o=U_(t,{label:"\u9489\u9489\u56DE\u590D",requireSubdomain:!1});return o.hash="",o.toString()}function UY(n,t=4e3){let o=typeof n=="string"?n.trim():"";if(!o)return[];if(!Number.isInteger(t)||t<1)throw new TypeError("maxChars must be a positive integer");if(o.length<=t)return[o];let a=[],e=o;for(;e.length>t;){let i=e.lastIndexOf(` +`,t);i{if(t?.aborted){a(ls(t));return}let e=setTimeout(()=>{t?.removeEventListener("abort",i),o()},n),i=()=>{clearTimeout(e),a(ls(t))};t?.addEventListener("abort",i,{once:!0})})}async function Dn(n,t,{body:o,signal:a,timeoutMs:e=dhe,headers:i={},method:A="POST",action:r="request"}={}){let s=new AbortController,g=!1,c=()=>s.abort(a?.reason);if(a?.aborted)throw ls(a);a?.addEventListener("abort",c,{once:!0});let I=e>0?setTimeout(()=>{g=!0,s.abort()},e):null;try{let d=await n(t,{method:A,redirect:"error",headers:{"content-type":"application/json",...i},body:JSON.stringify(o??{}),signal:s.signal});if(!d.ok){let B;try{let f=await d.json();B=Iu(f?.code??f?.errcode)}catch{}throw new It("http-error",`\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u5931\u8D25\uFF08HTTP ${d.status}\uFF09\u3002`,{status:d.status,providerCode:B})}try{return await d.json()}catch(B){throw new It("invalid-response","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u89E3\u6790\u7684\u54CD\u5E94\u3002",{cause:B})}}catch(d){throw a?.aborted?ls(a):g?new It("timeout","\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u8D85\u65F6\u3002",{cause:d}):d instanceof It?d:new It("network-error",`\u6682\u65F6\u65E0\u6CD5\u5B8C\u6210\u9489\u9489${r}\u8BF7\u6C42\u3002`,{cause:d})}finally{I&&clearTimeout(I),a?.removeEventListener("abort",c)}}async function yhe(n,t,{body:o,signal:a,timeoutMs:e=6e4}={}){let i=new AbortController,A=!1,r=()=>i.abort(a?.reason);if(a?.aborted)throw ls(a);a?.addEventListener("abort",r,{once:!0});let s=setTimeout(()=>{A=!0,i.abort()},e);try{let g=await n(t,{method:"POST",body:o,signal:i.signal,redirect:"error"}),c,I;try{c=await g.json()}catch(d){I=d}if(!g.ok)throw new It("http-error",`\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u5931\u8D25\uFF08HTTP ${g.status}\uFF09\u3002`,{status:g.status,providerCode:Iu(c?.code??c?.errcode)});if(I)throw new It("invalid-response","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u89E3\u6790\u7684\u54CD\u5E94\u3002",{cause:I});return c}catch(g){throw a?.aborted?ls(a):A?new It("timeout","\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u8D85\u65F6\u3002",{cause:g}):g instanceof It?g:new It("network-error","\u6682\u65F6\u65E0\u6CD5\u5B8C\u6210\u9489\u9489\u6587\u4EF6\u4E0A\u4F20\u8BF7\u6C42\u3002",{cause:g})}finally{clearTimeout(s),a?.removeEventListener("abort",r)}}function PY(n){let t=WA(n?.robotCode);if(!t)throw new TypeError("DingTalk robotCode is required");if(n?.type==="group"){let o=WA(n.openConversationId);if(o)return{type:"group",robotCode:t,openConversationId:o}}if(n?.type==="user"){let o=WA(n.userId);if(o)return{type:"user",robotCode:t,userId:o}}throw new TypeError("DingTalk file target is invalid")}function mhe(n){return ghe(n).slice(1).toLowerCase()}function She(n){if(n?.type==="user"){let t=WA(n.userId);if(t)return{type:"user",userId:t}}if(n?.type==="group"){let t=WA(n.openConversationId);if(t)return{type:"group",openConversationId:t,atUserIds:n.atUserIds}}throw new TypeError("DingTalk AI Card target is invalid")}function cu(n,t){let o=e=>String(e).replace(/[&<>"']/g,i=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[i]),a=t?.type==="group"?Object.entries(t.atUserIds??{}).map(([e,i])=>`${o(i)}`).join(" "):"";return Dhe(a?`${a} -${n}`:n)}function G_(n,t,o){return{cardParamMap:{flowStatus:t,msgContent:cu(n,o),staticMsgContent:"",sys_full_json_obj:JSON.stringify({order:["msgContent"]}),config:JSON.stringify({autoLayout:!0})}}}function yhe(n,t,o){let a={outTrackId:n,userIdType:1};return t.type==="group"?{...a,openSpaceId:`dtv1.card//IM_GROUP.${t.openConversationId}`,imGroupOpenDeliverModel:{robotCode:o,atUserIds:t.atUserIds}}:{...a,openSpaceId:`dtv1.card//IM_ROBOT.${t.userId}`,imRobotOpenDeliverModel:{spaceType:"IM_ROBOT",robotCode:o,extension:{dynamicSummary:"true"}}}}function mhe(n){let o=(typeof n=="string"?n.replace(/\r\n?/g,` +${n}`:n)}function G_(n,t,o){return{cardParamMap:{flowStatus:t,msgContent:cu(n,o),staticMsgContent:"",sys_full_json_obj:JSON.stringify({order:["msgContent"]}),config:JSON.stringify({autoLayout:!0})}}}function whe(n,t,o){let a={outTrackId:n,userIdType:1};return t.type==="group"?{...a,openSpaceId:`dtv1.card//IM_GROUP.${t.openConversationId}`,imGroupOpenDeliverModel:{robotCode:o,atUserIds:t.atUserIds}}:{...a,openSpaceId:`dtv1.card//IM_ROBOT.${t.userId}`,imRobotOpenDeliverModel:{spaceType:"IM_ROBOT",robotCode:o,extension:{dynamicSummary:"true"}}}}function Dhe(n){let o=(typeof n=="string"?n.replace(/\r\n?/g,` `):"").split(` `),a=!1;return o.map((e,i)=>{let A=/^\s{0,3}```/.test(e),r=a;return A&&(a=!a),i===o.length-1?e:r||A||a||!e||!o[i+1]?`${e} `:/^\s{0,3}(?:[-*+] |\d+[.)] |#{1,6} |\||> )/.test(o[i+1])?`${e} -`:`${e}
`}).join("")}function F_(n,t){if(!n||typeof n!="object"||n.errcode!==0)throw new It("registration-rejected",`\u9489\u9489\u626B\u7801${t}\u5931\u8D25\u3002`);return n}function L_(n,t){let o=Number(n);return Number.isFinite(o)&&o>0?o:t}function HY({fetchImpl:n=fetch,registrationBaseUrl:t=process.env.DINGTALK_REGISTRATION_BASE_URL||kY,registrationSource:o=process.env.DINGTALK_REGISTRATION_SOURCE||she,now:a=()=>Date.now(),cardMinIntervalMs:e=50,cardBackoffMs:i=1e3,delay:A=Che}={}){if(typeof n!="function")throw new TypeError("fetchImpl must be a function");if(typeof a!="function")throw new TypeError("now must be a function");if(!Number.isFinite(e)||e<0)throw new TypeError("cardMinIntervalMs must be a non-negative number");if(!Number.isFinite(i)||i<0)throw new TypeError("cardBackoffMs must be a non-negative number");if(typeof A!="function")throw new TypeError("delay must be a function");let r=U_(t,{label:"\u9489\u9489\u6CE8\u518C\u670D\u52A1",requireSubdomain:!1}),s=new URL(nhe),g=WA(o);if(!g)throw new TypeError("registrationSource is required");let c=new Map,I=new Map,d=new Map,B=Promise.resolve(),f=0,Q=(F,z)=>new URL(z.replace(/^\//,""),F);async function y({clientId:F,clientSecret:z,signal:J,requestKind:K="normal"}){let G=WA(F),V=WA(z);if(!G||!V)throw new TypeError("clientId and clientSecret are required");let H=c.get(G);if(H&&H.expiresAt>a())return H.token;let N=K==="reaction"?d:I;if(N.has(G))return N.get(G);let q=(async()=>{let X=await Dn(n,Q(s,"v1.0/oauth2/accessToken"),{body:{appKey:G,appSecret:V},signal:J,action:"\u9274\u6743"}),ie=WA(X?.accessToken);if(!ie)throw new It("invalid-access-token","\u9489\u9489\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u8BBF\u95EE\u4EE4\u724C\u3002");let De=L_(X?.expireIn??X?.expiresIn,7200),oe=Math.max(1e3,(De-60)*1e3);return c.set(G,{token:ie,expiresAt:a()+oe}),ie})().finally(()=>N.delete(G));return N.set(G,q),q}async function m({clientId:F,clientSecret:z,robotCode:J,messageId:K,conversationId:G,reactionName:V=VI,signal:H},N){let k=WA(F),q=WA(z),X=WA(J)??k,ie=WA(K),De=WA(G),oe=WA(V);if(!k||!q)throw new TypeError("clientId and clientSecret are required");if(!X)throw new TypeError("robotCode is required");if(!ie||!De)throw new TypeError("messageId and conversationId are required");if(!oe)throw new TypeError("reactionName is required");let Se=await y({clientId:k,clientSecret:q,signal:H,requestKind:"reaction"}),Be=await Dn(n,Q(s,`v1.0/robot/emotion/${N}`),{body:{robotCode:X,openMsgId:ie,openConversationId:De,emotionType:2,emotionName:oe,textEmotion:{emotionId:lhe,emotionName:oe,text:oe,backgroundId:dhe}},headers:{"x-acs-dingtalk-access-token":Se},signal:H,timeoutMs:Ihe,action:N==="reply"?"\u6D88\u606F\u72B6\u6001\u6DFB\u52A0":"\u6D88\u606F\u72B6\u6001\u64A4\u56DE"}),Re=Be?.success===!1?Iu(Be?.code??Be?.errcode)??"rejected":qQ(Be);if(Re)throw new It("reaction-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u6D88\u606F\u72B6\u6001\u8BF7\u6C42\u3002",{providerCode:Re});return!0}async function _({clientId:F,clientSecret:z,robotCode:J,downloadCode:K,signal:G,kind:V}){let H=WA(J),N=WA(K);if(!H||!N)throw new TypeError("robotCode and downloadCode are required");let k=await y({clientId:F,clientSecret:z,signal:G}),q;try{q=await Dn(n,Q(s,"v1.0/robot/messageFiles/download"),{body:{downloadCode:N,robotCode:H},headers:{"x-acs-dingtalk-access-token":k},signal:G,action:`${V==="image"?"\u56FE\u7247":"\u6587\u4EF6"}\u4E0B\u8F7D\u5730\u5740`})}catch(ie){throw G?.aborted?ie:new It(`${V}-download-address-failed`,`\u9489\u9489${V==="image"?"\u56FE\u7247":"\u6587\u4EF6"}\u4E0B\u8F7D\u5730\u5740\u83B7\u53D6\u5931\u8D25\u3002`,{cause:ie,status:ie?.status,providerCode:ie?.providerCode})}let X=WA(q?.downloadUrl??q?.download_url);if(!X)throw new It(`invalid-${V}-download`,`\u9489\u9489\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE${V==="image"?"\u56FE\u7247":"\u6587\u4EF6"}\u4E0B\u8F7D\u5730\u5740\u3002`);return uhe(X)}function T(F){let z=async()=>{let K=Math.max(0,f-a());K>0&&await A(K,F),f=Math.max(f,a())+e},J=B.then(z,z);return B=J.catch(()=>{}),J}async function R(F,z){await T(z.signal);try{return await Dn(n,Q(s,F),z)}catch(J){if(!(J instanceof It)||J.status!==403)throw J;return await A(i,z.signal),await T(z.signal),Dn(n,Q(s,F),z)}}async function L({clientId:F,clientSecret:z,cardInstanceId:J,text:K,target:G,signal:V}){let H=WA(J),N=WA(K);if(!H)throw new TypeError("cardInstanceId is required");if(!N)throw new TypeError("text is required");let q={"x-acs-dingtalk-access-token":await y({clientId:F,clientSecret:z,signal:V})},X=[R("v1.0/card/streaming",{method:"PUT",body:{outTrackId:H,guid:su(),key:"msgContent",content:cu(N,G),isFull:!0,isFinalize:!1,isError:!0},headers:q,signal:V,action:"AI Card \u5931\u8D25\u6536\u53E3"}),R("v1.0/card/instances",{method:"PUT",body:{outTrackId:H,cardData:G_(N,"5",G),cardUpdateOptions:{updateCardDataByKey:!0}},headers:q,signal:V,action:"AI Card \u5931\u8D25\u72B6\u6001"})],ie=await Promise.allSettled(X);if(ie.every(({status:De})=>De==="rejected"))throw ie[0].reason;return!0}async function U({clientId:F,clientSecret:z,target:J,file:K,signal:G},{uploadType:V,messageKey:H,createMessageParams:N}){if(!K||typeof K!="object"||typeof K.fileName!="string"||!K.fileName||!Buffer.isBuffer(K.bytes))throw new TypeError("A DingTalk file is required");let k=PY(J),q;try{q=await y({clientId:F,clientSecret:z,signal:G})}catch(ve){if(G?.aborted)throw ls(G);let tA=Number(ve?.status),fe=ve?.code==="http-error"&&tA>=400&&tA<500?"artifact-provider-rejected":"artifact-provider-failed";throw gu(ve,{fallback:fe})}let X=new URL("media/upload",kY);X.searchParams.set("access_token",q),X.searchParams.set("type",V);let ie=new FormData;ie.append("media",new Blob([K.bytes],{type:K.mediaType??"application/octet-stream"}),K.fileName);let De;try{De=await Bhe(n,X,{body:ie,signal:G})}catch(ve){if(G?.aborted)throw ls(G);let tA=Number(ve?.status),fe=ve?.code==="http-error"&&tA>=400&&tA<500?"artifact-provider-rejected":"artifact-provider-failed";throw gu(ve,{fallback:fe})}let oe=qQ(De),Se=WA(De?.media_id);if(oe||!Se)throw gu(new It("upload-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u4E0A\u4F20\u3002",{providerCode:oe??"missing-media-id"}));G?.throwIfAborted();let Be={robotCode:k.robotCode,msgKey:H,msgParam:JSON.stringify(N(Se,K)),...k.type==="group"?{openConversationId:k.openConversationId}:{userIds:[k.userId]}},Re=k.type==="group"?"v1.0/robot/groupMessages/send":"v1.0/robot/oToMessages/batchSend",Ne;try{Ne=await Dn(n,Q(s,Re),{body:Be,headers:{"x-acs-dingtalk-access-token":q},signal:G,action:"\u6587\u4EF6\u6D88\u606F\u53D1\u9001"})}catch(ve){throw Ehe(ve,G)}let Je=qQ(Ne);if(Je)throw gu(new It("send-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u6D88\u606F\u3002",{providerCode:Je}));return Ne}return Object.freeze({async beginRegistration({signal:F}={}){let z=F_(await Dn(n,Q(r,"app/registration/init"),{body:{source:g},signal:F,action:"\u521D\u59CB\u5316"}),"\u521D\u59CB\u5316"),J=WA(z.nonce);if(!J)throw new It("invalid-registration","\u9489\u9489\u626B\u7801\u521D\u59CB\u5316\u7F3A\u5C11 nonce\u3002");let K=F_(await Dn(n,Q(r,"app/registration/begin"),{body:{nonce:J},signal:F,action:"\u521B\u5EFA"}),"\u521B\u5EFA"),G=WA(K.device_code),V=WA(K.verification_uri_complete);if(!G||!V)throw new It("invalid-registration","\u9489\u9489\u626B\u7801\u670D\u52A1\u8FD4\u56DE\u7684\u4FE1\u606F\u4E0D\u5B8C\u6574\u3002");let H=U_(V,{label:"\u9489\u9489\u626B\u7801",requireSubdomain:!1}).toString();return{deviceCode:G,userCode:WA(K.user_code)??void 0,verificationUri:WA(K.verification_uri)??void 0,verificationUriComplete:H,expiresInSeconds:L_(K.expires_in,7200),intervalSeconds:L_(K.interval,5)}},async pollRegistration({deviceCode:F,signal:z}={}){let J=WA(F);if(!J)throw new TypeError("deviceCode is required");let K=F_(await Dn(n,Q(r,"app/registration/poll"),{body:{device_code:J},signal:z,action:"\u72B6\u6001\u67E5\u8BE2"}),"\u72B6\u6001\u67E5\u8BE2"),G=WA(K.status)?.toUpperCase();if(!G||!phe.has(G))throw new It("invalid-registration-status","\u9489\u9489\u626B\u7801\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u72B6\u6001\u3002");let V={status:G,failReason:WA(K.fail_reason)??void 0};if(G==="SUCCESS"&&(V.clientId=WA(K.client_id)??void 0,V.clientSecret=WA(K.client_secret)??void 0,!V.clientId||!V.clientSecret))throw new It("missing-credentials","\u9489\u9489\u626B\u7801\u5DF2\u786E\u8BA4\uFF0C\u4F46\u6CA1\u6709\u8FD4\u56DE\u673A\u5668\u4EBA\u51ED\u636E\u3002");return V},accessToken:y,async addReaction(F){return m(F,"reply")},async recallReaction(F){return m(F,"recall")},async addThinkingReaction(F){return m({...F,reactionName:VI},"reply")},async recallThinkingReaction(F){return m({...F,reactionName:VI},"recall")},async downloadImage({clientId:F,clientSecret:z,robotCode:J,downloadCode:K,signal:G,maxBytes:V}){let H=await _({clientId:F,clientSecret:z,robotCode:J,downloadCode:K,signal:G,kind:"image"});try{return await ko(H,{fetchImpl:n,signal:G,maxBytes:V})}catch(N){throw G?.aborted||N instanceof Qt?N:new It("image-content-download-failed","\u9489\u9489\u56FE\u7247\u5185\u5BB9\u4E0B\u8F7D\u5931\u8D25\u3002",{cause:N})}},async downloadFile({clientId:F,clientSecret:z,robotCode:J,downloadCode:K,signal:G}){let V=await _({clientId:F,clientSecret:z,robotCode:J,downloadCode:K,signal:G,kind:"file"});if(V.protocol!=="https:")throw new It("invalid-file-download","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6587\u4EF6\u4E0B\u8F7D\u5730\u5740\u3002");try{let H=await n(V,{method:"GET",redirect:"follow",signal:G});if(!H?.ok)throw await H?.body?.cancel?.().catch?.(()=>{}),new It("file-content-download-failed",`\u9489\u9489\u6587\u4EF6\u5185\u5BB9\u4E0B\u8F7D\u5931\u8D25\uFF08HTTP ${H?.status??"unknown"}\uFF09\u3002`,{status:H?.status});return Buffer.from(await H.arrayBuffer())}catch(H){throw G?.aborted?ls(G):H instanceof It?H:new It("file-content-download-failed","\u9489\u9489\u6587\u4EF6\u5185\u5BB9\u4E0B\u8F7D\u5931\u8D25\u3002",{cause:H})}},async createAiCard({clientId:F,clientSecret:z,target:J,initialText:K,signal:G}){let V=WA(F),H=WA(z),N=WA(K);if(!V||!H)throw new TypeError("clientId and clientSecret are required");if(!N)throw new TypeError("initialText is required");let k=Qhe(J),q=await y({clientId:V,clientSecret:H,signal:G}),X=`dsh_${su()}`,ie={"x-acs-dingtalk-access-token":q},De=!1;try{await R("v1.0/card/instances",{body:{cardTemplateId:ghe,outTrackId:X,cardData:{cardParamMap:{config:JSON.stringify({autoLayout:!0})}},callbackType:"STREAM",cardAtUserIds:k.atUserIds?Object.keys(k.atUserIds):void 0,imGroupOpenSpaceModel:{supportForward:!0},imRobotOpenSpaceModel:{supportForward:!0}},headers:ie,signal:G,action:"AI Card \u521B\u5EFA"}),await R("v1.0/card/instances/deliver",{body:yhe(X,k,V),headers:ie,signal:G,action:"AI Card \u6295\u653E"}),De=!0,await R("v1.0/card/instances",{method:"PUT",body:{outTrackId:X,cardData:G_(N,"2",k)},headers:ie,signal:G,action:"AI Card \u542F\u52A8"}),await R("v1.0/card/streaming",{method:"PUT",body:{outTrackId:X,guid:su(),key:"msgContent",content:cu(N,k).replace(/\n+$/,""),isFull:!0,isFinalize:!1,isError:!1},headers:ie,signal:G,action:"AI Card \u542F\u52A8"})}catch(oe){if(De){let Se=AbortSignal.timeout(5e3);await L({clientId:V,clientSecret:H,cardInstanceId:X,text:w("\u5361\u7247\u5DF2\u7ED3\u675F\uFF0C\u8BF7\u67E5\u770B\u540E\u7EED\u6D88\u606F\u3002"),target:k,signal:Se}).catch(()=>{})}throw oe}return{cardInstanceId:X}},async updateAiCard({clientId:F,clientSecret:z,cardInstanceId:J,text:K,target:G,signal:V}){let H=WA(J),N=WA(K);if(!H)throw new TypeError("cardInstanceId is required");if(!N)throw new TypeError("text is required");let k=await y({clientId:F,clientSecret:z,signal:V});return await R("v1.0/card/streaming",{method:"PUT",body:{outTrackId:H,guid:su(),key:"msgContent",content:cu(N,G).replace(/\n+$/,""),isFull:!0,isFinalize:!1,isError:!1},headers:{"x-acs-dingtalk-access-token":k},signal:V,action:"AI Card \u66F4\u65B0"}),!0},async finishAiCard({clientId:F,clientSecret:z,cardInstanceId:J,text:K,target:G,signal:V}){let H=WA(J),N=WA(K);if(!H)throw new TypeError("cardInstanceId is required");if(!N)throw new TypeError("text is required");let q={"x-acs-dingtalk-access-token":await y({clientId:F,clientSecret:z,signal:V})},X=cu(N,G);await R("v1.0/card/streaming",{method:"PUT",body:{outTrackId:H,guid:su(),key:"msgContent",content:X,isFull:!0,isFinalize:!0,isError:!1},headers:q,signal:V,action:"AI Card \u5B8C\u6210"});let ie=!0,De={method:"PUT",body:{outTrackId:H,cardData:G_(N,"3",G),cardUpdateOptions:{updateCardDataByKey:!0}},headers:q,signal:V,action:"AI Card \u6536\u53E3"};try{await R("v1.0/card/instances",De)}catch{try{await R("v1.0/card/instances",De)}catch{ie=!1}}return{delivered:!0,completed:ie}},failAiCard:L,async sendText({clientId:F,clientSecret:z,sessionWebhook:J,text:K,at:G,signal:V}){let H=WA(K);if(!H)throw new TypeError("text is required");let N=Sc(J),k=await y({clientId:F,clientSecret:z,signal:V}),q=G&&typeof G=="object"&&(Array.isArray(G.atUserIds)&&G.atUserIds.length>0||Array.isArray(G.atMobiles)&&G.atMobiles.length>0||G.isAtAll===!0)?{at:G}:{},X=await Dn(n,N,{body:{msgtype:"text",text:{content:H},...q},headers:{"x-acs-dingtalk-access-token":k},signal:V,action:"\u6D88\u606F\u56DE\u590D"});if(X?.errcode!==void 0&&X.errcode!==0||X?.code!==void 0&&X.code!==0)throw new It("send-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u56DE\u590D\u6D88\u606F\u3002");return!0},async sendRobotText({clientId:F,clientSecret:z,target:J,text:K,signal:G}){if(typeof K!="string"||!K.trim())throw new TypeError("text is required");let V=K,H=PY(J),N=await y({clientId:F,clientSecret:z,signal:G}),k={robotCode:H.robotCode,msgKey:"sampleText",msgParam:JSON.stringify({content:V}),...H.type==="group"?{openConversationId:H.openConversationId}:{userIds:[H.userId]}},q=H.type==="group"?"v1.0/robot/groupMessages/send":"v1.0/robot/oToMessages/batchSend",X=await Dn(n,Q(s,q),{body:k,headers:{"x-acs-dingtalk-access-token":N},signal:G,action:"\u4E3B\u52A8\u6587\u5B57\u6D88\u606F\u53D1\u9001"}),ie=qQ(X);if(ie)throw new It("send-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u4E3B\u52A8\u6587\u5B57\u6D88\u606F\u3002",{providerCode:ie});return X},async sendFile(F){return U(F,{uploadType:"file",messageKey:"sampleFile",createMessageParams:(z,J)=>({mediaId:z,fileName:J.fileName,fileType:fhe(J.fileName)})})},async sendImage(F){return U(F,{uploadType:"image",messageKey:"sampleImageMsg",createMessageParams:z=>({photoURL:z})})},clearAccessToken(F){let z=WA(F);z&&c.delete(z)}})}var She=500,whe="\u5361\u7247\u5DF2\u7ED3\u675F\uFF0C\u8BF7\u67E5\u770B\u540E\u7EED\u6D88\u606F\u3002";function H_(n,t){if(typeof n!="string")throw new TypeError(`${t} must be a string`);return n}function KY(n,t){if(typeof n!="string"||!n.trim())throw new TypeError(`${t} is required`);return n.trim()}function xY({api:n,clientId:t,clientSecret:o,target:a,signal:e,logger:i=console,updateIntervalMs:A=She,clock:r=()=>Date.now(),timer:s={setTimeout:(g,c)=>globalThis.setTimeout(g,c),clearTimeout:g=>globalThis.clearTimeout(g)}}={}){if(!n||typeof n.createAiCard!="function"||typeof n.updateAiCard!="function"||typeof n.finishAiCard!="function")throw new TypeError("DingTalk AI Card API is required");let g=KY(t,"clientId"),c=KY(o,"clientSecret");if(a==null)throw new TypeError("target is required");if(!Number.isFinite(A)||A<0)throw new TypeError("updateIntervalMs must be a non-negative number");if(typeof r!="function")throw new TypeError("clock must be a function");if(typeof s?.setTimeout!="function"||typeof s?.clearTimeout!="function")throw new TypeError("timer must provide setTimeout and clearTimeout");let I=()=>{let N=r();if(!Number.isFinite(N))throw new TypeError("clock must return a finite timestamp");return N};I();let d=e?.aborted?"aborted":"idle",B=null,f=null,Q=null,y=null,m=null,_=null,T=0,R=()=>{Q!==null&&(s.clearTimeout(Q),Q=null)},L=()=>e?.removeEventListener("abort",J),U=N=>{d=N,f=null,R(),L()},F=()=>!B||typeof n.failAiCard!="function"?Promise.resolve(!1):(_||(_=n.failAiCard({...B,text:w(whe),signal:AbortSignal.timeout(5e3)}).then(()=>!0,()=>!1)),_),z=N=>{d==="failed"||d==="finished"||d==="aborted"||(F(),U("failed"),i?.error?.(`[dsh-dingtalk] AI Card ${N} failed`))};function J(){d==="finished"||d==="failed"||d==="aborted"||(F(),U("aborted"))}d!=="aborted"&&e?.addEventListener("abort",J,{once:!0});let K=()=>{if(d!=="active"||y||f===null)return;let N=Math.max(0,T+A-I());if(N>0){Q=s.setTimeout(()=>{Q=null,K()},N);return}let k=f;f=null,y=(async()=>{try{await n.updateAiCard({...B,text:k,finished:!1}),T=I()}catch{if(e?.aborted||d==="aborted")return;z("update")}})().finally(()=>{y=null,d==="active"&&f!==null&&K()})};return Object.freeze({start:async N=>{if(H_(N,"initialText"),d!=="idle")return!1;d="starting";try{let k=await n.createAiCard({clientId:g,clientSecret:c,target:a,initialText:N,signal:e}),q=typeof k?.cardInstanceId=="string"?k.cardInstanceId.trim():"";if(!q)throw new TypeError("DingTalk did not return a card instance id");return B=Object.freeze({clientId:g,clientSecret:c,target:a,cardInstanceId:q,signal:e}),d!=="starting"?(F(),!1):(T=I(),d="active",!0)}catch{return e?.aborted||d==="aborted"?(U("aborted"),!1):(z("creation"),!1)}},push:N=>{H_(N,"progressText"),d==="active"&&(f=N,!Q&&!y&&K())},finish:N=>{if(H_(N,"finalText"),d==="finished")return Promise.resolve(!0);if(d==="finishing")return m;if(d!=="active")return Promise.resolve(!1);d="finishing",f=null,R();let k=y;return m=(async()=>{if(k&&await k,d!=="finishing")return!1;try{return await n.finishAiCard({...B,text:N}),d!=="finishing"?!1:(U("finished"),!0)}catch{return e?.aborted||d==="aborted"?(U("aborted"),!1):(z("finish"),!1)}})(),m},get providerMessageIds(){return B?.cardInstanceId?[B.cardInstanceId]:[]}})}function zQ(n){return typeof n=="string"&&n.trim()?n.trim():null}function Ta(n){return n&&typeof n.id=="string"&&typeof n.question=="string"&&(n.header===void 0||typeof n.header=="string")&&(n.detail===void 0||typeof n.detail=="string")&&(n.multiSelect===void 0||typeof n.multiSelect=="boolean")&&(n.options===void 0||Array.isArray(n.options)&&n.options.every(t=>t&&typeof t.label=="string"&&(t.description===void 0||typeof t.description=="string")))}function da(n,t,o,{requiresMention:a=!1}={}){let e=[],i=o>1?`\uFF08${t+1}/${o}\uFF09`:"";e.push(w("DeepSeek Harness \u9700\u8981\u4F60\u8865\u5145\u4FE1\u606F{progress}\uFF1A",{progress:i})),zQ(n.header)&&e.push("",n.header.trim()),e.push("",zQ(n.question)??w("\u8BF7\u8F93\u5165\u4F60\u7684\u56DE\u7B54\u3002")),zQ(n.detail)&&e.push("",n.detail.trim());let A=Array.isArray(n.options)?n.options:[];return A.length>0?(e.push(""),A.forEach((r,s)=>{let g=typeof r?.label=="string"?r.label:"",c=zQ(r?.description);e.push(`${s+1}. ${g}${c?` \u2014 ${c}`:""}`)}),e.push("",n.multiSelect===!0?w("\u8BF7\u56DE\u590D\u9009\u9879\u5E8F\u53F7\u6216\u6587\u5B57\uFF1B\u591A\u9009\u7528\u9017\u53F7\u5206\u9694\uFF0C\u4E5F\u53EF\u8865\u5145\u5176\u4ED6\u5185\u5BB9\u3002"):w("\u8BF7\u56DE\u590D\u4E00\u4E2A\u9009\u9879\u5E8F\u53F7\u6216\u6587\u5B57\uFF0C\u4E5F\u53EF\u76F4\u63A5\u8F93\u5165\u5176\u4ED6\u7B54\u6848\u3002"))):e.push("",w("\u8BF7\u76F4\u63A5\u56DE\u590D\u4F60\u7684\u7B54\u6848\u3002")),a&&e.push("",w("\u7FA4\u804A\u4E2D\u8BF7 @\u673A\u5668\u4EBA \u540E\u53D1\u9001\u7B54\u6848\u3002")),e.join(` -`)}function YY(n,t){let o=n.trim();if(!o)return null;if(/^\d+$/.test(o)){let e=t[Number(o)-1];return typeof e?.label=="string"?e.label:null}let a=t.find(e=>e?.label===o);return typeof a?.label=="string"?a.label:null}function Na(n,t){let o=Array.isArray(n.options)?n.options:[];if(o.length===0)return{id:n.id,selected:[],custom:t};let a=YY(t,o);if(n.multiSelect!==!0)return a?{id:n.id,selected:[a]}:{id:n.id,selected:[],custom:t};if(a)return{id:n.id,selected:[a]};let e=[],i=[];for(let A of t.split(/[,,、;;\n]+/)){let r=A.trim();if(!r)continue;let s=YY(r,o);s?e.includes(s)||e.push(s):i.push(r)}return{id:n.id,selected:e,...i.length>0?{custom:i.join("\u3001")}:{}}}var Dhe=new Map([["\u6279\u51C6","allowed-once"],["\u540C\u610F","allowed-once"],["yes","allowed-once"],["\u62D2\u7EDD","rejected"],["\u4E0D\u540C\u610F","rejected"],["no","rejected"]]),K_="\u8BF7\u7CBE\u51C6\u56DE\u590D\u300C\u6279\u51C6\u300D\u6216\u300C\u62D2\u7EDD\u300D\uFF08\u4E5F\u652F\u6301\uFF1A\u540C\u610F / \u4E0D\u540C\u610F / yes / no\uFF09\u3002",Ohe="\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u95EE\u9898\uFF0C\u518D\u7CBE\u51C6\u56DE\u590D\u300C\u6279\u51C6\u300D\u6216\u300C\u62D2\u7EDD\u300D\u3002",jd="\u8BE5\u5BA1\u6279\u5DF2\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u590D\u3002",bhe=5*6e4,Mhe=2048;function bi(n){return typeof n=="string"?n.trim():""}function x_(n){return bi(n).replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/g,"")}function _he(n){return Dhe.get(bi(n).toLowerCase())??null}function JY(n){return n?.type==="approval/requested"&&!!bi(n.sessionId)&&!!bi(n.approvalId)&&!!bi(n.toolName)&&(n.callId===void 0||!!bi(n.callId))&&(n.reason===void 0||typeof n.reason=="string")}function The(n){let t=n?.arguments;if(t!==null&&typeof t=="object")try{return JSON.stringify(t,null,2)}catch{return null}if(typeof t!="string")return null;let o=x_(t);if(!o)return t===""?"{}":null;try{return JSON.stringify(JSON.parse(o),null,2)}catch{return o}}function Y_(n,{toolCall:t,requiresMention:o=!1,maxArgumentsLength:a=6e3}={}){if(!JY(n))return null;let e=bi(n.callId);if(!e||bi(t?.callId)!==e||bi(t?.name)!==bi(n.toolName))return null;let i=The(t);if(!i||i.length>a)return null;let A=[w("DeepSeek Harness \u9700\u8981\u4F60\u7684\u5BA1\u6279\uFF1A"),"",w("\u5DE5\u5177\uFF1A{tool}",{tool:x_(n.toolName)}),w("\u64CD\u4F5C\u53C2\u6570\uFF1A"),i],r=x_(n.reason);return r&&A.push(w("\u539F\u56E0\uFF1A{reason}",{reason:r})),A.push("",w(K_)),o&&A.push("",w("\u7FA4\u804A\u4E2D\u8BF7 @\u673A\u5668\u4EBA \u540E\u53D1\u9001\u5BA1\u6279\u51B3\u5B9A\u3002")),A.join(` -`)}function jY(n,t){return{ok:!0,value:{sessionId:n.sessionId,approvalId:n.approvalId,outcome:t}}}function VQ(n){return n==="allowed-once"?w("\u5DF2\u6279\u51C6\uFF0C\u4EC5\u5BF9\u672C\u6B21\u64CD\u4F5C\u6709\u6548\u3002"):n==="rejected"?w("\u5DF2\u62D2\u7EDD\u6B64\u6B21\u64CD\u4F5C\u3002"):w(jd)}var Ra=class{#e;#A;#t=new Map;#r=new Map;#I=new Map;constructor({label:t="IM",logger:o=console}={}){this.#e=t,this.#A=o}hasPending(t){return this.#r.get(t)?.items.some(o=>!o.inactive)===!0}claimReply({key:t,actor:o,text:a,addressed:e=!0,hasPendingQuestion:i=!1,questionCompletion:A,isQuestionPending:r,send:s}){let c=this.#r.get(t)?.items[0],I=_he(a),d=(f,Q=!1)=>({...Q?{resolved:!0}:{},process:async y=>{typeof y=="function"&&await y()===!1||await s(f)}}),B=i&&c&&A&&typeof A.then=="function";return i&&!B?null:!c||c.inactive?(this.#I.get(t)??0)<=Date.now()?(this.#I.delete(t),null):I?d(w(jd),!0):null:c.actor!==o||c.requiresMention&&e!==!0?I?d(w("\u53EA\u6709\u53D1\u8D77\u5F53\u524D\u4EFB\u52A1\u7684\u7528\u6237\u53EF\u4EE5\u5904\u7406\u8FD9\u6761\u5BA1\u6279\u3002")):null:{process:async f=>{let Q=c.presented,m=(c.replyTail??Promise.resolve()).catch(()=>{}).then(async()=>{if(!(typeof f=="function"&&await f()===!1)){if(B){if(await A.catch(()=>{}),c.inactive||c.resolving)return;if(typeof r=="function"&&r()){await s(w(Ohe));return}}if(await c.activationTask?.catch(()=>{}),await c.presentationTask?.catch(()=>{}),c.inactive||c.resolving){await s(w(jd));return}if(c.send=s,!Q||!c.presented){if(c.presented||await this.#o(c),c.inactive||c.resolving)return;await s(w(K_));return}if(c.submitting){await s(w("\u5BA1\u6279\u51B3\u5B9A\u6B63\u5728\u63D0\u4EA4\uFF0C\u8BF7\u7A0D\u5019\u3002"));return}if(!I){await s(w(K_));return}await this.#g(c,I)}});c.replyTail=m;try{await m}finally{c.replyTail===m&&(c.replyTail=null)}}}}async handleRequested(t,o){if(t?.kind!=="approval")return!1;let a=t.payload,e=bi(a?.approvalId);if(!bi(t.rpcId)||!bi(t.sessionId)||!e||!JY(a)||a.sessionId!==t.sessionId||typeof t.respond!="function")return this.#A.warn?.(`[dsh-im:${this.#e}] ignored an invalid Harness approval`),!0;if(t.recovered===!0)return await this.#c(t,a),!0;let i=this.#t.get(e);if(i)return i.interaction=t,i.toolCall=t.toolCall,i.presented||await this.#o(i),!0;let A=o?.send,r=bi(o?.key),s=bi(o?.actor);if(!r||!s||typeof A!="function")return this.#A.warn?.(`[dsh-im:${this.#e}] ignored an approval without a reply route`),await this.#c(t,a),!0;let g=typeof o?.render=="function"?o.render:null,c=Y_(a,{toolCall:t.toolCall,requiresMention:o.requiresMention===!0});if(!c){let B=await this.#c(t,a);return await A(B?w("\u65E0\u6CD5\u5B8C\u6574\u5C55\u793A\u8FD9\u6B21\u64CD\u4F5C\uFF0C\u5DF2\u5B89\u5168\u62D2\u7EDD\u6B64\u6B21\u5BA1\u6279\u3002"):w(jd)),!0}let I={approvalId:e,sessionId:t.sessionId,interaction:t,toolCall:t.toolCall,key:r,actor:s,requiresMention:o.requiresMention===!0,send:A,render:g,text:c,presented:!1,presentationTask:null,deliveryCompleted:!1,replyTail:null,submitting:!1,inactive:!1,resolving:!1,closedOutcome:null,resolutionNotified:!1,activationTask:null};this.#t.set(e,I);let d=this.#r.get(r)??{items:[]};return d.items.push(I),this.#r.set(r,d),d.items[0]===I&&await this.#o(I),!0}async submitByApprovalId(t,o,{actor:a}={}){let e=this.#t.get(bi(t));return!e||e.inactive||e.resolving||e.submitting||a!==void 0&&e.actor!==a?!1:(await this.#g(e,o),!0)}async handleResolved(t){if(t?.kind!=="approval")return!1;let o=this.#t.get(bi(t.interactionId));if(!o||(o.resolving=!0,o.activationTask&&await o.activationTask.catch(()=>{}),o.inactive||this.#t.get(o.approvalId)!==o))return!0;let a=o.presentationTask,e=o.presented||a,i=o.send,A=this.#s(o);return await this.#i(A,async()=>{let r=o.presented;a&&(r=await a.then(()=>!0,()=>!1)),e&&r&&(o.resolutionNotified=!0,await i(VQ(t.outcome)).catch(()=>{}))}),!0}async closeRoute(t){let o=this.#r.get(t);if(!o)return;let a=[...o.items];for(let e of a)this.#s(e);await Promise.all(a.map(async e=>{try{await e.interaction.respond(jY(e,"rejected"),{signal:AbortSignal.timeout(5e3)}),e.closedOutcome="rejected",(e.presented||e.deliveryCompleted)&&!e.resolutionNotified&&(e.resolutionNotified=!0,await e.send(VQ("rejected")).catch(()=>{}))}catch(i){i?.code==="interaction-not-pending"?(e.closedOutcome="resolved",(e.presented||e.deliveryCompleted)&&!e.resolutionNotified&&(e.resolutionNotified=!0,await e.send(w(jd)).catch(()=>{}))):this.#A.warn?.(`[dsh-im:${this.#e}] failed to reject a closing approval:`,i)}}))}async#o(t){if(this.#r.get(t.key)?.items[0]!==t||t.inactive||t.resolving||t.presented||(await t.activationTask?.catch(()=>{}),this.#r.get(t.key)?.items[0]!==t||t.inactive||t.resolving||t.presented))return;if(t.presentationTask)return t.presentationTask;let o=t.render?Promise.resolve().then(()=>t.render(t,t.send)):Promise.resolve().then(()=>t.send(t.text));t.presentationTask=o;try{await o,t.deliveryCompleted=!0,t.inactive?t.closedOutcome&&!t.resolutionNotified&&(t.resolutionNotified=!0,await t.send(VQ(t.closedOutcome)).catch(()=>{})):t.presented=!0}finally{t.presentationTask===o&&(t.presentationTask=null)}}async#g(t,o){t.submitting=!0;try{await t.interaction.respond(jY(t,o))}catch(i){if(i?.code==="interaction-not-pending"){let A=t.send,r=this.#s(t);await this.#i(r,async()=>{t.resolutionNotified||await A(w(jd)).catch(()=>{})});return}if(t.inactive)return;t.submitting=!1,this.#A.error?.(`[dsh-im:${this.#e}] failed to submit an approval:`,i),await t.send(w("\u5BA1\u6279\u63D0\u4EA4\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u56DE\u590D\u300C\u6279\u51C6\u300D\u6216\u300C\u62D2\u7EDD\u300D\u3002")).catch(()=>{});return}let a=t.send,e=this.#s(t);await this.#i(e,async()=>{t.resolutionNotified||await a(VQ(o)).catch(()=>{})})}async#i(t,o){let a,e=new Promise(i=>{a=i});t&&(t.activationTask=e);try{await o()}finally{a(),t?.activationTask===e&&(t.activationTask=null)}await this.#a(t)}async#a(t){if(t)try{await this.#o(t)}catch(o){this.#A.error?.(`[dsh-im:${this.#e}] failed to present the next approval:`,o);try{t.interaction.reconnect?.()}catch{}}}#s(t){if(t.inactive)return null;t.inactive=!0,this.#l(t.key),this.#t.delete(t.approvalId);let o=this.#r.get(t.key);if(!o)return null;let a=o.items[0]===t,e=o.items.indexOf(t);return e!==-1&&o.items.splice(e,1),o.items.length===0?(this.#r.delete(t.key),null):a?o.items[0]:null}#l(t){let o=Date.now();for(let[a,e]of this.#I)e<=o&&this.#I.delete(a);for(this.#I.delete(t),this.#I.set(t,o+bhe);this.#I.size>Mhe;)this.#I.delete(this.#I.keys().next().value)}async#c(t,o){try{return await t.respond({ok:!0,value:{sessionId:t.sessionId,approvalId:o.approvalId,outcome:"rejected"}},{signal:AbortSignal.timeout(5e3)}),!0}catch(a){if(a?.code==="interaction-not-pending")return!1;throw a}}};var j_=new WeakMap;function Nhe(n){let t=j_.get(n);return t||(t=new Map,j_.set(n,t)),t}async function ug(n,t,o){let a=typeof n;if(a!=="object"&&a!=="function"||n===null)throw new TypeError("state is required");if(typeof t!="string"||!t)throw new TypeError("conversation key is required");if(typeof o!="function")throw new TypeError("operation is required");let e=Nhe(n),i=e.get(t)??Promise.resolve(),A,r=new Promise(s=>{A=s});e.set(t,r),await i;try{return await o()}finally{A(),e.get(t)===r&&(e.delete(t),e.size===0&&j_.delete(n))}}var Rhe=/(?:\u001b\]|\u009d)(?:(?!\u0007|\u001b\\)[\s\S])*(?:\u0007|\u001b\\|$)/gu,khe=/(?:\u001b\[|\u009b)[0-?]*[ -/]*[@-~]/gu,vhe=/\u001b[@-_]/gu,Phe=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f]/gu,Ghe=/[\u200b\u200e\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff]/gu,Fhe=/^(?:[\s\S]*?<\/dsh_im_source>\s*)?(?:[\s\S]*?<\/dsh_im_source_guidance>\s*)?(?:[\s\S]*?<\/dsh_im_reply_to>\s*)?/u,Lhe=new Intl.Segmenter(void 0,{granularity:"grapheme"});function J_(n){return n.replace(Rhe,"").replace(khe,"").replace(vhe,"").replace(Phe,"").replace(Ghe,"").replace(/\s+/gu," ").trim()}function q_(n,t=60){if(Buffer.byteLength(n,"utf8")<=t)return n;let o="\u2026",a=t-Buffer.byteLength(o,"utf8"),e="";for(let{segment:i}of Lhe.segment(n)){if(Buffer.byteLength(e+i,"utf8")>a)break;e+=i}return`${e.trimEnd()}${o}`}function Uhe(n){return typeof n=="string"?n:Array.isArray(n)?n.filter(t=>t?.type==="text"&&typeof t.text=="string").map(t=>t.text).join(` -`):""}function Hhe(n){let t=n?.name??n?.filename??n?.fileName;return typeof t!="string"?"":t.replaceAll("\\","/").split("/").at(-1)?.replace(/[\u0000-\u001f\u007f]/gu,"").trim()??""}function qY({text:n,content:t,files:o}={}){let a=typeof n=="string"?J_(n):"";if(a)return q_(a);let e=J_(Uhe(t).replace(Fhe,""));if(e)return q_(e);let i=Array.isArray(o)?o.map(Hhe).find(Boolean):"",A=i?J_(i):"";return A?q_(A):null}var Mi="workspace-session-stale";function zY(n,t){if(typeof n.workspaceSession=="function")return n.workspaceSession(t);let o={sessionId:t,sessionExists:(...a)=>n.sessionExists(t,...a),models:(...a)=>n.getSessionModels(t,...a),selectModel:(...a)=>n.selectSessionModel(t,...a),isRunning:(...a)=>n.isSessionRunning(t,...a),hasActiveTurn:(...a)=>n.hasActiveTurn(t,...a),stopActiveTurn:(...a)=>n.stopActiveTurn(t,...a),steerActiveTurn:(...a)=>n.steerActiveTurn(t,...a),ask:(...a)=>n.ask(t,...a)};return typeof n.renameSession=="function"&&(o.renameTitle=(...a)=>n.renameSession(t,...a)),Object.freeze(o)}async function Khe(n,t){return t===void 0?n.sessionExists():n.sessionExists(t)}async function xhe(n,t){return t===void 0?n.createSession():n.createSession(t)}async function ka({harness:n,state:t,key:o,text:a,content:e,contextEnhanced:i=!1,createOptions:A,existsOptions:r,askOptions:s}){let g=i?qY({text:a,content:e,files:typeof s=="object"?s?.files:void 0}):null,c=A?.signal??(typeof s=="object"?s?.signal:void 0),I=c?{signal:c}:void 0;for(;;)try{let d=await ug(t,o,async()=>{let m=t.sessionFor(o),_=m?zY(n,m):null;if(!_||!await Khe(_,r)){if(m=await xhe(n,A),await t.setSession(o,m)===!1)return null;if(_=zY(n,m),g&&typeof _.renameTitle=="function")try{await _.renameTitle(g,I)}catch(T){if(T?.code===Mi||I?.signal?.aborted)throw T;console.warn("[dsh-im] unable to set the initial Session title:",T?.message??T)}}return{sessionId:m,session:_}});if(!d)continue;let B=[],f=typeof s=="object"&&typeof s?.onArtifact=="function"?s.onArtifact:null,Q=typeof s=="number"?{timeoutMs:s}:{...s};Q.onArtifact=async m=>{B.push(m),await f?.(m)};let y=await d.session.ask(e??a,Q);return{sessionId:d.sessionId,answer:y,...B.length>0?{artifacts:B}:{}}}catch(d){if(d?.code!==Mi)throw d}}var WY=/^\/compact(?=$|\s)([\s\S]*)$/i,Yhe="\u7528\u6CD5\uFF1A/compact\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",VY=new Map([["No compactable history yet.","\u6682\u65E0\u53EF\u538B\u7F29\u7684\u5386\u53F2\u8BB0\u5F55\u3002"],["Compaction is unavailable because this process has an active compaction, or the agent is not idle.","\u5F53\u524D\u4F1A\u8BDD\u6B63\u5728\u751F\u6210\u56DE\u590D\u6216\u6267\u884C\u538B\u7F29\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"],["Compaction cancelled.","\u4E0A\u4E0B\u6587\u538B\u7F29\u5DF2\u53D6\u6D88\u3002"],["The history selected for compaction changed before it could be replaced. The conversation is unchanged; the attempt is recorded in the session log.","\u538B\u7F29\u671F\u95F4\u4F1A\u8BDD\u5386\u53F2\u53D1\u751F\u53D8\u5316\uFF0C\u672C\u6B21\u672A\u4FEE\u6539\u4F1A\u8BDD\uFF0C\u8BF7\u91CD\u8BD5\u3002"],["Compaction could not produce a useful summary. The conversation is unchanged; the attempt is recorded in the session log.","\u672A\u80FD\u751F\u6210\u6709\u6548\u7684\u538B\u7F29\u6458\u8981\uFF0C\u672C\u6B21\u672A\u4FEE\u6539\u4F1A\u8BDD\u3002"],["Compaction did not finish cleanly; some session history may have changed. Inspect the current session state before retrying.","\u4E0A\u4E0B\u6587\u538B\u7F29\u672A\u6B63\u5E38\u5B8C\u6210\uFF0C\u90E8\u5206\u4F1A\u8BDD\u5386\u53F2\u53EF\u80FD\u5DF2\u53D8\u5316\uFF0C\u8BF7\u68C0\u67E5\u4F1A\u8BDD\u540E\u518D\u91CD\u8BD5\u3002"],["Compaction finished, but the session could not be saved.","\u4E0A\u4E0B\u6587\u5DF2\u538B\u7F29\uFF0C\u4F46\u4F1A\u8BDD\u4FDD\u5B58\u5931\u8D25\u3002"]]);function WI(n){return{handled:!0,message:n,messages:[n]}}function jhe(n){if(!n||typeof n!="object"||!["success","error"].includes(n.kind)||n.text!==void 0&&typeof n.text!="string")throw new TypeError("Harness returned an invalid /compact result");let t=n.text?.trim()??"",o=/^Compacted (\d+) history items \(~(\d+) tokens\)\.$/u.exec(t);return o?w("\u5DF2\u538B\u7F29 {count} \u6761\u5386\u53F2\u8BB0\u5F55\uFF08\u7EA6 {tokens} \u4E2A token\uFF09\u3002",{count:o[1],tokens:o[2]}):VY.has(t)?w(VY.get(t)):t||(n.kind==="success"?w("\u4E0A\u4E0B\u6587\u538B\u7F29\u5B8C\u6210\u3002"):w("\u4E0A\u4E0B\u6587\u538B\u7F29\u5931\u8D25\u3002"))}function Jhe(n){let t=n?.code??n?.failure?.code;return t==="session-not-found"?w("\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u53D1\u9001\u65B0\u6D88\u606F\u5F00\u542F\u4F1A\u8BDD\u3002"):t==="agent-busy"?w("\u5F53\u524D\u4F1A\u8BDD\u6B63\u5728\u751F\u6210\u56DE\u590D\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="cancelled"||n?.name==="AbortError"?w("\u4E0A\u4E0B\u6587\u538B\u7F29\u5DF2\u53D6\u6D88\u3002"):t===Mi||t==="workspace-bot-not-found"?w("\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002"):t==="commands-unavailable"?w("\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u4ECE\u673A\u5668\u4EBA\u6267\u884C\u4E0A\u4E0B\u6587\u538B\u7F29\u3002"):w("\u4E0A\u4E0B\u6587\u538B\u7F29\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function va(n,t,o,a,e={}){if(!z_(n))return null;if(WY.exec(n.trim())[1].trim())return WI(w(Yhe));if(typeof o?.sessionFor!="function")return WI(w("\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u53EF\u7528\u7684\u4F1A\u8BDD\u72B6\u6001\u3002"));let A=o.sessionFor(a);if(typeof A!="string"||!A)return WI(w("\u5F53\u524D\u804A\u5929\u8FD8\u6CA1\u6709\u53EF\u538B\u7F29\u7684\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u53D1\u9001\u4E00\u6761\u6D88\u606F\u3002"));if(typeof t?.executeCommand!="function")return WI(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u4E0A\u4E0B\u6587\u538B\u7F29\u3002"));try{let r=await t.executeCommand(A,"/compact",e);return WI(r===void 0?w("\u5F53\u524D Harness \u672A\u6CE8\u518C /compact \u547D\u4EE4\uFF0C\u8BF7\u786E\u8BA4\u4E0A\u4E0B\u6587\u538B\u7F29\u7EC4\u4EF6\u5DF2\u542F\u7528\u3002"):jhe(r?.result))}catch(r){return WI(Jhe(r))}}function z_(n){return typeof n=="string"&&WY.test(n.trim())}import{isDeepStrictEqual as aEe}from"node:util";import{realpath as $Y,stat as e1}from"node:fs/promises";import{isAbsolute as A1,resolve as qhe}from"node:path";var t1=/^\/(?:workspace|ws)(?:\s+([\s\S]+))?$/i,r1=/^\/(?:workspacelist|workspaces|wsl)(?:\s+([\s\S]+))?$/i,i1=/^\/(?:sessionlist|sessions)(?:\s+([\s\S]+))?$/i,a1=/^\/session(?=$|\s)/i,zhe=/^\/session[ \t]+([^\s]+)$/i,Vhe=4096,Whe=1800,Zhe=256,o1=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u,Xhe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+/gu,n1="\u7528\u6CD5\uFF1A/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7\uFF08/session N\uFF09",ZI=["\u7528\u6CD5\uFF1A","/sessionlist \u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u4F1A\u8BDD","/sessionlist --limit N \u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u524D N \u4E2A\u4F1A\u8BDD\uFF08N \u4E3A\u6B63\u6574\u6570\uFF09","/sessionlist \u5DE5\u4F5C\u533A\u5E8F\u53F7 \u6309 /workspacelist \u5E8F\u53F7\u5217\u51FA\u4F1A\u8BDD","/sessionlist \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84 \u5217\u51FA\u6307\u5B9A\u5DE5\u4F5C\u533A\u4F1A\u8BDD"].join(` -`);function Tt(n,t=[n]){return{handled:!0,message:n,messages:t}}function Jd(n){return typeof n!="string"||n.length>Vhe||!A1(n)||o1.test(n)?null:qhe(n)}function WQ(n){return typeof n!="string"?"":n.replace(Xhe," ").replace(/\s+/gu," ").trim()}function ZY(n){return typeof n=="string"&&n.length>0&&n.length<=Zhe&&!new RegExp("\\p{White_Space}","u").test(n)&&!o1.test(n)}function Z_(n){let t=typeof n=="string"?n.trim():"";if(!t)return{selector:"",limit:null};if(!t.toLowerCase().startsWith("--limit"))return{selector:t,limit:null};let o=/^--limit[ \t]+(\d+)$/iu.exec(t),a=o?Number(o[1]):null;return!Number.isSafeInteger(a)||a<1?{error:w(ZI)}:{selector:"",limit:a}}async function V_(n){let t=await Promise.all(n.map(async o=>{let a=Jd(o);if(!a)return null;try{return(await e1(a)).isDirectory()?Jd(await $Y(a)):null}catch{return null}}));return[...new Set(t.filter(Boolean))]}async function W_(n){if(typeof n!="string"||!A1(n.trim()))return{error:w(`\u5DE5\u4F5C\u533A\u5FC5\u987B\u662F\u7EDD\u5BF9\u8DEF\u5F84\u3002 -{usage}`,{usage:w(ZI)})};let t=Jd(n.trim());if(!t)return{error:w(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5305\u542B\u4E0D\u652F\u6301\u7684\u5B57\u7B26\u6216\u957F\u5EA6\u8D85\u8FC7\u9650\u5236\u3002 -{usage}`,{usage:w(ZI)})};let o;try{o=await e1(t)}catch{return{error:w(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002 -{usage}`,{usage:w(ZI)})}}if(!o.isDirectory())return{error:w(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5FC5\u987B\u6307\u5411\u4E00\u4E2A\u76EE\u5F55\u3002 -{usage}`,{usage:w(ZI)})};try{let a=Jd(await $Y(t));return a?{workspace:a}:{error:w(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5305\u542B\u4E0D\u652F\u6301\u7684\u5B57\u7B26\u6216\u957F\u5EA6\u8D85\u8FC7\u9650\u5236\u3002 -{usage}`,{usage:w(ZI)})}}catch{return{error:w(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002 -{usage}`,{usage:w(ZI)})}}}async function qd(n,t={}){let o=await n.listWorkspaces(t),a=typeof n?.currentWorkspace=="function"?n.currentWorkspace():null,[e]=a?await V_([a]):[],i=await V_(Array.isArray(o)?o:[]),A=[...new Set([...e?[e]:[],...i])];return n.assertWorkspaceScope?.(),{current:e??null,paths:A}}function Cg(n){let t=[],o=0;for(;o=o)a=e+1;else{let i=n.charCodeAt(a-1),A=n.charCodeAt(a);i>=55296&&i<=56319&&A>=56320&&A<=57343&&(a-=1)}}t.push(n.slice(o,a)),o=a}return t}async function $he(n,t){if(n[1]?.trim())return Tt(w("\u7528\u6CD5\uFF1A/workspacelist"));if(typeof t?.listWorkspaces!="function")return Tt(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u5217\u51FA\u5DE5\u4F5C\u533A\u3002"));try{let{current:o,paths:a}=await qd(t);if(a.length===0)return Tt(w("\u5F53\u524D Harness Host \u4E0A\u6CA1\u6709\u4ECD\u7136\u5B58\u5728\u7684\u5DF2\u767B\u8BB0\u5DE5\u4F5C\u533A\u3002"));let i=[w("\u5F53\u524D Harness Host \u4E0A\u5B58\u5728\u7684\u5DE5\u4F5C\u533A\uFF08{count}\uFF09\uFF1A",{count:a.length}),...a.map((A,r)=>`${r+1}. ${A}${A===o?w("\uFF08\u5F53\u524D\uFF09"):""}`),"",w("\u5207\u6362\u7528\u6CD5\uFF1A/workspace \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84"),w("\u67E5\u770B\u4F1A\u8BDD\uFF1A/sessionlist \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84")].join(` -`);return Tt(i,Cg(i))}catch(o){return o?.code==="workspace-bot-not-found"?Tt(w("\u673A\u5668\u4EBA\u6B63\u5728\u79FB\u9664\u6216\u5DF2\u91CD\u65B0\u63A5\u5165\uFF0C\u65E0\u6CD5\u5217\u51FA\u539F\u4F1A\u8BDD\u7684\u5DE5\u4F5C\u533A\u3002")):Tt(w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u5DE5\u4F5C\u533A\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))}}async function X_(n,t,o={}){if(!n){if(typeof t?.currentWorkspace!="function")return{error:w("\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u53EF\u7528\u7684\u5DE5\u4F5C\u533A\u3002")};let e=await W_(t.currentWorkspace());return t.assertWorkspaceScope?.(),e}if(/^\d+$/u.test(n)){if(typeof t?.listWorkspaces!="function")return{error:w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u6309\u5E8F\u53F7\u9009\u62E9\u5DE5\u4F5C\u533A\u3002")};let{paths:e}=await qd(t,o),i=Number(n);return!Number.isSafeInteger(i)||i<1||i>e.length?{error:w("\u5DE5\u4F5C\u533A\u5E8F\u53F7\u4E0D\u5B58\u5728\uFF0C\u8BF7\u5148\u6267\u884C /workspacelist\u3002")}:{workspace:e[i-1]}}let a=await W_(n);return t.assertWorkspaceScope?.(),a}function eEe(n){let t=typeof n=="number"&&Number.isFinite(n)?n:null;if(t===null)return"";let o=new Date(t);if(Number.isNaN(o.getTime()))return"";let a=s=>String(s).padStart(2,"0"),e=`${a(o.getHours())}:${a(o.getMinutes())}`,i=s=>new Date(s.getFullYear(),s.getMonth(),s.getDate()).getTime(),A=new Date,r=Math.round((i(A)-i(o))/864e5);return r===0?w("\u4ECA\u5929 {time}",{time:e}):r===1?w("\u6628\u5929 {time}",{time:e}):r===2?w("\u524D\u5929 {time}",{time:e}):o.getFullYear()===A.getFullYear()?w("{month}\u6708{day}\u65E5 {time}",{month:o.getMonth()+1,day:o.getDate(),time:e}):w("{year}\u5E74{month}\u6708{day}\u65E5",{year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()})}function AEe(n,t,{currentWorkspace:o=!1}={}){let a=t.map(e=>{let i=WQ(e?.sessionId);if(!i)throw new TypeError("Harness returned an invalid session id");let A=e?.summaryAvailable===!1?w("\u6807\u9898\u6682\u4E0D\u53EF\u7528"):WQ(e?.title)||w("\u6682\u65E0\u6807\u9898"),r=eEe(e?.time),s=`${r?` \xB7 ${r}`:""}${e?.archived===!0?w("\uFF08\u5DF2\u5F52\u6863\uFF09"):""}`;return`${A}${s} +`:`${e}
`}).join("")}function F_(n,t){if(!n||typeof n!="object"||n.errcode!==0)throw new It("registration-rejected",`\u9489\u9489\u626B\u7801${t}\u5931\u8D25\u3002`);return n}function L_(n,t){let o=Number(n);return Number.isFinite(o)&&o>0?o:t}function HY({fetchImpl:n=fetch,registrationBaseUrl:t=process.env.DINGTALK_REGISTRATION_BASE_URL||kY,registrationSource:o=process.env.DINGTALK_REGISTRATION_SOURCE||Ihe,now:a=()=>Date.now(),cardMinIntervalMs:e=50,cardBackoffMs:i=1e3,delay:A=Qhe}={}){if(typeof n!="function")throw new TypeError("fetchImpl must be a function");if(typeof a!="function")throw new TypeError("now must be a function");if(!Number.isFinite(e)||e<0)throw new TypeError("cardMinIntervalMs must be a non-negative number");if(!Number.isFinite(i)||i<0)throw new TypeError("cardBackoffMs must be a non-negative number");if(typeof A!="function")throw new TypeError("delay must be a function");let r=U_(t,{label:"\u9489\u9489\u6CE8\u518C\u670D\u52A1",requireSubdomain:!1}),s=new URL(che),g=WA(o);if(!g)throw new TypeError("registrationSource is required");let c=new Map,I=new Map,d=new Map,B=Promise.resolve(),f=0,Q=(F,J)=>new URL(J.replace(/^\//,""),F);async function y({clientId:F,clientSecret:J,signal:V,requestKind:H="normal"}){let G=WA(F),q=WA(J);if(!G||!q)throw new TypeError("clientId and clientSecret are required");let K=c.get(G);if(K&&K.expiresAt>a())return K.token;let N=H==="reaction"?d:I;if(N.has(G))return N.get(G);let z=(async()=>{let X=await Dn(n,Q(s,"v1.0/oauth2/accessToken"),{body:{appKey:G,appSecret:q},signal:V,action:"\u9274\u6743"}),ie=WA(X?.accessToken);if(!ie)throw new It("invalid-access-token","\u9489\u9489\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u8BBF\u95EE\u4EE4\u724C\u3002");let De=L_(X?.expireIn??X?.expiresIn,7200),oe=Math.max(1e3,(De-60)*1e3);return c.set(G,{token:ie,expiresAt:a()+oe}),ie})().finally(()=>N.delete(G));return N.set(G,z),z}async function m({clientId:F,clientSecret:J,robotCode:V,messageId:H,conversationId:G,reactionName:q=WI,signal:K},N){let k=WA(F),z=WA(J),X=WA(V)??k,ie=WA(H),De=WA(G),oe=WA(q);if(!k||!z)throw new TypeError("clientId and clientSecret are required");if(!X)throw new TypeError("robotCode is required");if(!ie||!De)throw new TypeError("messageId and conversationId are required");if(!oe)throw new TypeError("reactionName is required");let Se=await y({clientId:k,clientSecret:z,signal:K,requestKind:"reaction"}),Be=await Dn(n,Q(s,`v1.0/robot/emotion/${N}`),{body:{robotCode:X,openMsgId:ie,openConversationId:De,emotionType:2,emotionName:oe,textEmotion:{emotionId:hhe,emotionName:oe,text:oe,backgroundId:Ehe}},headers:{"x-acs-dingtalk-access-token":Se},signal:K,timeoutMs:phe,action:N==="reply"?"\u6D88\u606F\u72B6\u6001\u6DFB\u52A0":"\u6D88\u606F\u72B6\u6001\u64A4\u56DE"}),Re=Be?.success===!1?Iu(Be?.code??Be?.errcode)??"rejected":zQ(Be);if(Re)throw new It("reaction-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u6D88\u606F\u72B6\u6001\u8BF7\u6C42\u3002",{providerCode:Re});return!0}async function _({clientId:F,clientSecret:J,robotCode:V,downloadCode:H,signal:G,kind:q}){let K=WA(V),N=WA(H);if(!K||!N)throw new TypeError("robotCode and downloadCode are required");let k=await y({clientId:F,clientSecret:J,signal:G}),z;try{z=await Dn(n,Q(s,"v1.0/robot/messageFiles/download"),{body:{downloadCode:N,robotCode:K},headers:{"x-acs-dingtalk-access-token":k},signal:G,action:`${q==="image"?"\u56FE\u7247":"\u6587\u4EF6"}\u4E0B\u8F7D\u5730\u5740`})}catch(ie){throw G?.aborted?ie:new It(`${q}-download-address-failed`,`\u9489\u9489${q==="image"?"\u56FE\u7247":"\u6587\u4EF6"}\u4E0B\u8F7D\u5730\u5740\u83B7\u53D6\u5931\u8D25\u3002`,{cause:ie,status:ie?.status,providerCode:ie?.providerCode})}let X=WA(z?.downloadUrl??z?.download_url);if(!X)throw new It(`invalid-${q}-download`,`\u9489\u9489\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE${q==="image"?"\u56FE\u7247":"\u6587\u4EF6"}\u4E0B\u8F7D\u5730\u5740\u3002`);return fhe(X)}function T(F){let J=async()=>{let H=Math.max(0,f-a());H>0&&await A(H,F),f=Math.max(f,a())+e},V=B.then(J,J);return B=V.catch(()=>{}),V}async function R(F,J){await T(J.signal);try{return await Dn(n,Q(s,F),J)}catch(V){if(!(V instanceof It)||V.status!==403)throw V;return await A(i,J.signal),await T(J.signal),Dn(n,Q(s,F),J)}}async function L({clientId:F,clientSecret:J,cardInstanceId:V,text:H,target:G,signal:q}){let K=WA(V),N=WA(H);if(!K)throw new TypeError("cardInstanceId is required");if(!N)throw new TypeError("text is required");let z={"x-acs-dingtalk-access-token":await y({clientId:F,clientSecret:J,signal:q})},X=[R("v1.0/card/streaming",{method:"PUT",body:{outTrackId:K,guid:su(),key:"msgContent",content:cu(N,G),isFull:!0,isFinalize:!1,isError:!0},headers:z,signal:q,action:"AI Card \u5931\u8D25\u6536\u53E3"}),R("v1.0/card/instances",{method:"PUT",body:{outTrackId:K,cardData:G_(N,"5",G),cardUpdateOptions:{updateCardDataByKey:!0}},headers:z,signal:q,action:"AI Card \u5931\u8D25\u72B6\u6001"})],ie=await Promise.allSettled(X);if(ie.every(({status:De})=>De==="rejected"))throw ie[0].reason;return!0}async function U({clientId:F,clientSecret:J,target:V,file:H,signal:G},{uploadType:q,messageKey:K,createMessageParams:N}){if(!H||typeof H!="object"||typeof H.fileName!="string"||!H.fileName||!Buffer.isBuffer(H.bytes))throw new TypeError("A DingTalk file is required");let k=PY(V),z;try{z=await y({clientId:F,clientSecret:J,signal:G})}catch(ve){if(G?.aborted)throw ls(G);let tA=Number(ve?.status),fe=ve?.code==="http-error"&&tA>=400&&tA<500?"artifact-provider-rejected":"artifact-provider-failed";throw gu(ve,{fallback:fe})}let X=new URL("media/upload",kY);X.searchParams.set("access_token",z),X.searchParams.set("type",q);let ie=new FormData;ie.append("media",new Blob([H.bytes],{type:H.mediaType??"application/octet-stream"}),H.fileName);let De;try{De=await yhe(n,X,{body:ie,signal:G})}catch(ve){if(G?.aborted)throw ls(G);let tA=Number(ve?.status),fe=ve?.code==="http-error"&&tA>=400&&tA<500?"artifact-provider-rejected":"artifact-provider-failed";throw gu(ve,{fallback:fe})}let oe=zQ(De),Se=WA(De?.media_id);if(oe||!Se)throw gu(new It("upload-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u4E0A\u4F20\u3002",{providerCode:oe??"missing-media-id"}));G?.throwIfAborted();let Be={robotCode:k.robotCode,msgKey:K,msgParam:JSON.stringify(N(Se,H)),...k.type==="group"?{openConversationId:k.openConversationId}:{userIds:[k.userId]}},Re=k.type==="group"?"v1.0/robot/groupMessages/send":"v1.0/robot/oToMessages/batchSend",Ne;try{Ne=await Dn(n,Q(s,Re),{body:Be,headers:{"x-acs-dingtalk-access-token":z},signal:G,action:"\u6587\u4EF6\u6D88\u606F\u53D1\u9001"})}catch(ve){throw Bhe(ve,G)}let Je=zQ(Ne);if(Je)throw gu(new It("send-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u6D88\u606F\u3002",{providerCode:Je}));return Ne}return Object.freeze({async beginRegistration({signal:F}={}){let J=F_(await Dn(n,Q(r,"app/registration/init"),{body:{source:g},signal:F,action:"\u521D\u59CB\u5316"}),"\u521D\u59CB\u5316"),V=WA(J.nonce);if(!V)throw new It("invalid-registration","\u9489\u9489\u626B\u7801\u521D\u59CB\u5316\u7F3A\u5C11 nonce\u3002");let H=F_(await Dn(n,Q(r,"app/registration/begin"),{body:{nonce:V},signal:F,action:"\u521B\u5EFA"}),"\u521B\u5EFA"),G=WA(H.device_code),q=WA(H.verification_uri_complete);if(!G||!q)throw new It("invalid-registration","\u9489\u9489\u626B\u7801\u670D\u52A1\u8FD4\u56DE\u7684\u4FE1\u606F\u4E0D\u5B8C\u6574\u3002");let K=U_(q,{label:"\u9489\u9489\u626B\u7801",requireSubdomain:!1}).toString();return{deviceCode:G,userCode:WA(H.user_code)??void 0,verificationUri:WA(H.verification_uri)??void 0,verificationUriComplete:K,expiresInSeconds:L_(H.expires_in,7200),intervalSeconds:L_(H.interval,5)}},async pollRegistration({deviceCode:F,signal:J}={}){let V=WA(F);if(!V)throw new TypeError("deviceCode is required");let H=F_(await Dn(n,Q(r,"app/registration/poll"),{body:{device_code:V},signal:J,action:"\u72B6\u6001\u67E5\u8BE2"}),"\u72B6\u6001\u67E5\u8BE2"),G=WA(H.status)?.toUpperCase();if(!G||!uhe.has(G))throw new It("invalid-registration-status","\u9489\u9489\u626B\u7801\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u72B6\u6001\u3002");let q={status:G,failReason:WA(H.fail_reason)??void 0};if(G==="SUCCESS"&&(q.clientId=WA(H.client_id)??void 0,q.clientSecret=WA(H.client_secret)??void 0,!q.clientId||!q.clientSecret))throw new It("missing-credentials","\u9489\u9489\u626B\u7801\u5DF2\u786E\u8BA4\uFF0C\u4F46\u6CA1\u6709\u8FD4\u56DE\u673A\u5668\u4EBA\u51ED\u636E\u3002");return q},accessToken:y,async addReaction(F){return m(F,"reply")},async recallReaction(F){return m(F,"recall")},async addThinkingReaction(F){return m({...F,reactionName:WI},"reply")},async recallThinkingReaction(F){return m({...F,reactionName:WI},"recall")},async downloadImage({clientId:F,clientSecret:J,robotCode:V,downloadCode:H,signal:G,maxBytes:q}){let K=await _({clientId:F,clientSecret:J,robotCode:V,downloadCode:H,signal:G,kind:"image"});try{return await ko(K,{fetchImpl:n,signal:G,maxBytes:q})}catch(N){throw G?.aborted||N instanceof Qt?N:new It("image-content-download-failed","\u9489\u9489\u56FE\u7247\u5185\u5BB9\u4E0B\u8F7D\u5931\u8D25\u3002",{cause:N})}},async downloadFile({clientId:F,clientSecret:J,robotCode:V,downloadCode:H,signal:G}){let q=await _({clientId:F,clientSecret:J,robotCode:V,downloadCode:H,signal:G,kind:"file"});if(q.protocol!=="https:")throw new It("invalid-file-download","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6587\u4EF6\u4E0B\u8F7D\u5730\u5740\u3002");try{let K=await n(q,{method:"GET",redirect:"follow",signal:G});if(!K?.ok)throw await K?.body?.cancel?.().catch?.(()=>{}),new It("file-content-download-failed",`\u9489\u9489\u6587\u4EF6\u5185\u5BB9\u4E0B\u8F7D\u5931\u8D25\uFF08HTTP ${K?.status??"unknown"}\uFF09\u3002`,{status:K?.status});return Buffer.from(await K.arrayBuffer())}catch(K){throw G?.aborted?ls(G):K instanceof It?K:new It("file-content-download-failed","\u9489\u9489\u6587\u4EF6\u5185\u5BB9\u4E0B\u8F7D\u5931\u8D25\u3002",{cause:K})}},async createAiCard({clientId:F,clientSecret:J,target:V,initialText:H,signal:G}){let q=WA(F),K=WA(J),N=WA(H);if(!q||!K)throw new TypeError("clientId and clientSecret are required");if(!N)throw new TypeError("initialText is required");let k=She(V),z=await y({clientId:q,clientSecret:K,signal:G}),X=`dsh_${su()}`,ie={"x-acs-dingtalk-access-token":z},De=!1;try{await R("v1.0/card/instances",{body:{cardTemplateId:lhe,outTrackId:X,cardData:{cardParamMap:{config:JSON.stringify({autoLayout:!0})}},callbackType:"STREAM",cardAtUserIds:k.atUserIds?Object.keys(k.atUserIds):void 0,imGroupOpenSpaceModel:{supportForward:!0},imRobotOpenSpaceModel:{supportForward:!0}},headers:ie,signal:G,action:"AI Card \u521B\u5EFA"}),await R("v1.0/card/instances/deliver",{body:whe(X,k,q),headers:ie,signal:G,action:"AI Card \u6295\u653E"}),De=!0,await R("v1.0/card/instances",{method:"PUT",body:{outTrackId:X,cardData:G_(N,"2",k)},headers:ie,signal:G,action:"AI Card \u542F\u52A8"}),await R("v1.0/card/streaming",{method:"PUT",body:{outTrackId:X,guid:su(),key:"msgContent",content:cu(N,k).replace(/\n+$/,""),isFull:!0,isFinalize:!1,isError:!1},headers:ie,signal:G,action:"AI Card \u542F\u52A8"})}catch(oe){if(De){let Se=AbortSignal.timeout(5e3);await L({clientId:q,clientSecret:K,cardInstanceId:X,text:w("\u5361\u7247\u5DF2\u7ED3\u675F\uFF0C\u8BF7\u67E5\u770B\u540E\u7EED\u6D88\u606F\u3002"),target:k,signal:Se}).catch(()=>{})}throw oe}return{cardInstanceId:X}},async updateAiCard({clientId:F,clientSecret:J,cardInstanceId:V,text:H,target:G,signal:q}){let K=WA(V),N=WA(H);if(!K)throw new TypeError("cardInstanceId is required");if(!N)throw new TypeError("text is required");let k=await y({clientId:F,clientSecret:J,signal:q});return await R("v1.0/card/streaming",{method:"PUT",body:{outTrackId:K,guid:su(),key:"msgContent",content:cu(N,G).replace(/\n+$/,""),isFull:!0,isFinalize:!1,isError:!1},headers:{"x-acs-dingtalk-access-token":k},signal:q,action:"AI Card \u66F4\u65B0"}),!0},async finishAiCard({clientId:F,clientSecret:J,cardInstanceId:V,text:H,target:G,signal:q}){let K=WA(V),N=WA(H);if(!K)throw new TypeError("cardInstanceId is required");if(!N)throw new TypeError("text is required");let z={"x-acs-dingtalk-access-token":await y({clientId:F,clientSecret:J,signal:q})},X=cu(N,G);await R("v1.0/card/streaming",{method:"PUT",body:{outTrackId:K,guid:su(),key:"msgContent",content:X,isFull:!0,isFinalize:!0,isError:!1},headers:z,signal:q,action:"AI Card \u5B8C\u6210"});let ie=!0,De={method:"PUT",body:{outTrackId:K,cardData:G_(N,"3",G),cardUpdateOptions:{updateCardDataByKey:!0}},headers:z,signal:q,action:"AI Card \u6536\u53E3"};try{await R("v1.0/card/instances",De)}catch{try{await R("v1.0/card/instances",De)}catch{ie=!1}}return{delivered:!0,completed:ie}},failAiCard:L,async sendText({clientId:F,clientSecret:J,sessionWebhook:V,text:H,at:G,signal:q}){let K=WA(H);if(!K)throw new TypeError("text is required");let N=wc(V),k=await y({clientId:F,clientSecret:J,signal:q}),z=G&&typeof G=="object"&&(Array.isArray(G.atUserIds)&&G.atUserIds.length>0||Array.isArray(G.atMobiles)&&G.atMobiles.length>0||G.isAtAll===!0)?{at:G}:{},X=await Dn(n,N,{body:{msgtype:"text",text:{content:K},...z},headers:{"x-acs-dingtalk-access-token":k},signal:q,action:"\u6D88\u606F\u56DE\u590D"});if(X?.errcode!==void 0&&X.errcode!==0||X?.code!==void 0&&X.code!==0)throw new It("send-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u56DE\u590D\u6D88\u606F\u3002");return!0},async sendRobotText({clientId:F,clientSecret:J,target:V,text:H,signal:G}){if(typeof H!="string"||!H.trim())throw new TypeError("text is required");let q=H,K=PY(V),N=await y({clientId:F,clientSecret:J,signal:G}),k={robotCode:K.robotCode,msgKey:"sampleText",msgParam:JSON.stringify({content:q}),...K.type==="group"?{openConversationId:K.openConversationId}:{userIds:[K.userId]}},z=K.type==="group"?"v1.0/robot/groupMessages/send":"v1.0/robot/oToMessages/batchSend",X=await Dn(n,Q(s,z),{body:k,headers:{"x-acs-dingtalk-access-token":N},signal:G,action:"\u4E3B\u52A8\u6587\u5B57\u6D88\u606F\u53D1\u9001"}),ie=zQ(X);if(ie)throw new It("send-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u4E3B\u52A8\u6587\u5B57\u6D88\u606F\u3002",{providerCode:ie});return X},async sendFile(F){return U(F,{uploadType:"file",messageKey:"sampleFile",createMessageParams:(J,V)=>({mediaId:J,fileName:V.fileName,fileType:mhe(V.fileName)})})},async sendImage(F){return U(F,{uploadType:"image",messageKey:"sampleImageMsg",createMessageParams:J=>({photoURL:J})})},clearAccessToken(F){let J=WA(F);J&&c.delete(J)}})}var Ohe=500,bhe="\u5361\u7247\u5DF2\u7ED3\u675F\uFF0C\u8BF7\u67E5\u770B\u540E\u7EED\u6D88\u606F\u3002";function H_(n,t){if(typeof n!="string")throw new TypeError(`${t} must be a string`);return n}function KY(n,t){if(typeof n!="string"||!n.trim())throw new TypeError(`${t} is required`);return n.trim()}function xY({api:n,clientId:t,clientSecret:o,target:a,signal:e,logger:i=console,updateIntervalMs:A=Ohe,clock:r=()=>Date.now(),timer:s={setTimeout:(g,c)=>globalThis.setTimeout(g,c),clearTimeout:g=>globalThis.clearTimeout(g)}}={}){if(!n||typeof n.createAiCard!="function"||typeof n.updateAiCard!="function"||typeof n.finishAiCard!="function")throw new TypeError("DingTalk AI Card API is required");let g=KY(t,"clientId"),c=KY(o,"clientSecret");if(a==null)throw new TypeError("target is required");if(!Number.isFinite(A)||A<0)throw new TypeError("updateIntervalMs must be a non-negative number");if(typeof r!="function")throw new TypeError("clock must be a function");if(typeof s?.setTimeout!="function"||typeof s?.clearTimeout!="function")throw new TypeError("timer must provide setTimeout and clearTimeout");let I=()=>{let N=r();if(!Number.isFinite(N))throw new TypeError("clock must return a finite timestamp");return N};I();let d=e?.aborted?"aborted":"idle",B=null,f=null,Q=null,y=null,m=null,_=null,T=0,R=()=>{Q!==null&&(s.clearTimeout(Q),Q=null)},L=()=>e?.removeEventListener("abort",V),U=N=>{d=N,f=null,R(),L()},F=()=>!B||typeof n.failAiCard!="function"?Promise.resolve(!1):(_||(_=n.failAiCard({...B,text:w(bhe),signal:AbortSignal.timeout(5e3)}).then(()=>!0,()=>!1)),_),J=N=>{d==="failed"||d==="finished"||d==="aborted"||(F(),U("failed"),i?.error?.(`[dsh-dingtalk] AI Card ${N} failed`))};function V(){d==="finished"||d==="failed"||d==="aborted"||(F(),U("aborted"))}d!=="aborted"&&e?.addEventListener("abort",V,{once:!0});let H=()=>{if(d!=="active"||y||f===null)return;let N=Math.max(0,T+A-I());if(N>0){Q=s.setTimeout(()=>{Q=null,H()},N);return}let k=f;f=null,y=(async()=>{try{await n.updateAiCard({...B,text:k,finished:!1}),T=I()}catch{if(e?.aborted||d==="aborted")return;J("update")}})().finally(()=>{y=null,d==="active"&&f!==null&&H()})};return Object.freeze({start:async N=>{if(H_(N,"initialText"),d!=="idle")return!1;d="starting";try{let k=await n.createAiCard({clientId:g,clientSecret:c,target:a,initialText:N,signal:e}),z=typeof k?.cardInstanceId=="string"?k.cardInstanceId.trim():"";if(!z)throw new TypeError("DingTalk did not return a card instance id");return B=Object.freeze({clientId:g,clientSecret:c,target:a,cardInstanceId:z,signal:e}),d!=="starting"?(F(),!1):(T=I(),d="active",!0)}catch{return e?.aborted||d==="aborted"?(U("aborted"),!1):(J("creation"),!1)}},push:N=>{H_(N,"progressText"),d==="active"&&(f=N,!Q&&!y&&H())},finish:N=>{if(H_(N,"finalText"),d==="finished")return Promise.resolve(!0);if(d==="finishing")return m;if(d!=="active")return Promise.resolve(!1);d="finishing",f=null,R();let k=y;return m=(async()=>{if(k&&await k,d!=="finishing")return!1;try{return await n.finishAiCard({...B,text:N}),d!=="finishing"?!1:(U("finished"),!0)}catch{return e?.aborted||d==="aborted"?(U("aborted"),!1):(J("finish"),!1)}})(),m},get providerMessageIds(){return B?.cardInstanceId?[B.cardInstanceId]:[]}})}function VQ(n){return typeof n=="string"&&n.trim()?n.trim():null}function Ta(n){return n&&typeof n.id=="string"&&typeof n.question=="string"&&(n.header===void 0||typeof n.header=="string")&&(n.detail===void 0||typeof n.detail=="string")&&(n.multiSelect===void 0||typeof n.multiSelect=="boolean")&&(n.options===void 0||Array.isArray(n.options)&&n.options.every(t=>t&&typeof t.label=="string"&&(t.description===void 0||typeof t.description=="string")))}function pa(n,t,o,{requiresMention:a=!1}={}){let e=[],i=o>1?`\uFF08${t+1}/${o}\uFF09`:"";e.push(w("DeepSeek Harness \u9700\u8981\u4F60\u8865\u5145\u4FE1\u606F{progress}\uFF1A",{progress:i})),VQ(n.header)&&e.push("",n.header.trim()),e.push("",VQ(n.question)??w("\u8BF7\u8F93\u5165\u4F60\u7684\u56DE\u7B54\u3002")),VQ(n.detail)&&e.push("",n.detail.trim());let A=Array.isArray(n.options)?n.options:[];return A.length>0?(e.push(""),A.forEach((r,s)=>{let g=typeof r?.label=="string"?r.label:"",c=VQ(r?.description);e.push(`${s+1}. ${g}${c?` \u2014 ${c}`:""}`)}),e.push("",n.multiSelect===!0?w("\u8BF7\u56DE\u590D\u9009\u9879\u5E8F\u53F7\u6216\u6587\u5B57\uFF1B\u591A\u9009\u7528\u9017\u53F7\u5206\u9694\uFF0C\u4E5F\u53EF\u8865\u5145\u5176\u4ED6\u5185\u5BB9\u3002"):w("\u8BF7\u56DE\u590D\u4E00\u4E2A\u9009\u9879\u5E8F\u53F7\u6216\u6587\u5B57\uFF0C\u4E5F\u53EF\u76F4\u63A5\u8F93\u5165\u5176\u4ED6\u7B54\u6848\u3002"))):e.push("",w("\u8BF7\u76F4\u63A5\u56DE\u590D\u4F60\u7684\u7B54\u6848\u3002")),a&&e.push("",w("\u7FA4\u804A\u4E2D\u8BF7 @\u673A\u5668\u4EBA \u540E\u53D1\u9001\u7B54\u6848\u3002")),e.join(` +`)}function YY(n,t){let o=n.trim();if(!o)return null;if(/^\d+$/.test(o)){let e=t[Number(o)-1];return typeof e?.label=="string"?e.label:null}let a=t.find(e=>e?.label===o);return typeof a?.label=="string"?a.label:null}function Na(n,t){let o=Array.isArray(n.options)?n.options:[];if(o.length===0)return{id:n.id,selected:[],custom:t};let a=YY(t,o);if(n.multiSelect!==!0)return a?{id:n.id,selected:[a]}:{id:n.id,selected:[],custom:t};if(a)return{id:n.id,selected:[a]};let e=[],i=[];for(let A of t.split(/[,,、;;\n]+/)){let r=A.trim();if(!r)continue;let s=YY(r,o);s?e.includes(s)||e.push(s):i.push(r)}return{id:n.id,selected:e,...i.length>0?{custom:i.join("\u3001")}:{}}}var Mhe=new Map([["\u6279\u51C6","allowed-once"],["\u540C\u610F","allowed-once"],["yes","allowed-once"],["\u62D2\u7EDD","rejected"],["\u4E0D\u540C\u610F","rejected"],["no","rejected"]]),K_="\u8BF7\u7CBE\u51C6\u56DE\u590D\u300C\u6279\u51C6\u300D\u6216\u300C\u62D2\u7EDD\u300D\uFF08\u4E5F\u652F\u6301\uFF1A\u540C\u610F / \u4E0D\u540C\u610F / yes / no\uFF09\u3002",_he="\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u95EE\u9898\uFF0C\u518D\u7CBE\u51C6\u56DE\u590D\u300C\u6279\u51C6\u300D\u6216\u300C\u62D2\u7EDD\u300D\u3002",jd="\u8BE5\u5BA1\u6279\u5DF2\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u590D\u3002",The=5*6e4,Nhe=2048;function bi(n){return typeof n=="string"?n.trim():""}function x_(n){return bi(n).replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/g,"")}function Rhe(n){return Mhe.get(bi(n).toLowerCase())??null}function JY(n){return n?.type==="approval/requested"&&!!bi(n.sessionId)&&!!bi(n.approvalId)&&!!bi(n.toolName)&&(n.callId===void 0||!!bi(n.callId))&&(n.reason===void 0||typeof n.reason=="string")}function khe(n){let t=n?.arguments;if(t!==null&&typeof t=="object")try{return JSON.stringify(t,null,2)}catch{return null}if(typeof t!="string")return null;let o=x_(t);if(!o)return t===""?"{}":null;try{return JSON.stringify(JSON.parse(o),null,2)}catch{return o}}function Y_(n,{toolCall:t,requiresMention:o=!1,maxArgumentsLength:a=6e3}={}){if(!JY(n))return null;let e=bi(n.callId);if(!e||bi(t?.callId)!==e||bi(t?.name)!==bi(n.toolName))return null;let i=khe(t);if(!i||i.length>a)return null;let A=[w("DeepSeek Harness \u9700\u8981\u4F60\u7684\u5BA1\u6279\uFF1A"),"",w("\u5DE5\u5177\uFF1A{tool}",{tool:x_(n.toolName)}),w("\u64CD\u4F5C\u53C2\u6570\uFF1A"),i],r=x_(n.reason);return r&&A.push(w("\u539F\u56E0\uFF1A{reason}",{reason:r})),A.push("",w(K_)),o&&A.push("",w("\u7FA4\u804A\u4E2D\u8BF7 @\u673A\u5668\u4EBA \u540E\u53D1\u9001\u5BA1\u6279\u51B3\u5B9A\u3002")),A.join(` +`)}function jY(n,t){return{ok:!0,value:{sessionId:n.sessionId,approvalId:n.approvalId,outcome:t}}}function WQ(n){return n==="allowed-once"?w("\u5DF2\u6279\u51C6\uFF0C\u4EC5\u5BF9\u672C\u6B21\u64CD\u4F5C\u6709\u6548\u3002"):n==="rejected"?w("\u5DF2\u62D2\u7EDD\u6B64\u6B21\u64CD\u4F5C\u3002"):w(jd)}var Ra=class{#e;#A;#t=new Map;#r=new Map;#I=new Map;constructor({label:t="IM",logger:o=console}={}){this.#e=t,this.#A=o}hasPending(t){return this.#r.get(t)?.items.some(o=>!o.inactive)===!0}claimReply({key:t,actor:o,text:a,addressed:e=!0,hasPendingQuestion:i=!1,questionCompletion:A,isQuestionPending:r,send:s}){let c=this.#r.get(t)?.items[0],I=Rhe(a),d=(f,Q=!1)=>({...Q?{resolved:!0}:{},process:async y=>{typeof y=="function"&&await y()===!1||await s(f)}}),B=i&&c&&A&&typeof A.then=="function";return i&&!B?null:!c||c.inactive?(this.#I.get(t)??0)<=Date.now()?(this.#I.delete(t),null):I?d(w(jd),!0):null:c.actor!==o||c.requiresMention&&e!==!0?I?d(w("\u53EA\u6709\u53D1\u8D77\u5F53\u524D\u4EFB\u52A1\u7684\u7528\u6237\u53EF\u4EE5\u5904\u7406\u8FD9\u6761\u5BA1\u6279\u3002")):null:{process:async f=>{let Q=c.presented,m=(c.replyTail??Promise.resolve()).catch(()=>{}).then(async()=>{if(!(typeof f=="function"&&await f()===!1)){if(B){if(await A.catch(()=>{}),c.inactive||c.resolving)return;if(typeof r=="function"&&r()){await s(w(_he));return}}if(await c.activationTask?.catch(()=>{}),await c.presentationTask?.catch(()=>{}),c.inactive||c.resolving){await s(w(jd));return}if(c.send=s,!Q||!c.presented){if(c.presented||await this.#o(c),c.inactive||c.resolving)return;await s(w(K_));return}if(c.submitting){await s(w("\u5BA1\u6279\u51B3\u5B9A\u6B63\u5728\u63D0\u4EA4\uFF0C\u8BF7\u7A0D\u5019\u3002"));return}if(!I){await s(w(K_));return}await this.#g(c,I)}});c.replyTail=m;try{await m}finally{c.replyTail===m&&(c.replyTail=null)}}}}async handleRequested(t,o){if(t?.kind!=="approval")return!1;let a=t.payload,e=bi(a?.approvalId);if(!bi(t.rpcId)||!bi(t.sessionId)||!e||!JY(a)||a.sessionId!==t.sessionId||typeof t.respond!="function")return this.#A.warn?.(`[dsh-im:${this.#e}] ignored an invalid Harness approval`),!0;if(t.recovered===!0)return await this.#c(t,a),!0;let i=this.#t.get(e);if(i)return i.interaction=t,i.toolCall=t.toolCall,i.presented||await this.#o(i),!0;let A=o?.send,r=bi(o?.key),s=bi(o?.actor);if(!r||!s||typeof A!="function")return this.#A.warn?.(`[dsh-im:${this.#e}] ignored an approval without a reply route`),await this.#c(t,a),!0;let g=typeof o?.render=="function"?o.render:null,c=Y_(a,{toolCall:t.toolCall,requiresMention:o.requiresMention===!0});if(!c){let B=await this.#c(t,a);return await A(B?w("\u65E0\u6CD5\u5B8C\u6574\u5C55\u793A\u8FD9\u6B21\u64CD\u4F5C\uFF0C\u5DF2\u5B89\u5168\u62D2\u7EDD\u6B64\u6B21\u5BA1\u6279\u3002"):w(jd)),!0}let I={approvalId:e,sessionId:t.sessionId,interaction:t,toolCall:t.toolCall,key:r,actor:s,requiresMention:o.requiresMention===!0,send:A,render:g,text:c,presented:!1,presentationTask:null,deliveryCompleted:!1,replyTail:null,submitting:!1,inactive:!1,resolving:!1,closedOutcome:null,resolutionNotified:!1,activationTask:null};this.#t.set(e,I);let d=this.#r.get(r)??{items:[]};return d.items.push(I),this.#r.set(r,d),d.items[0]===I&&await this.#o(I),!0}async submitByApprovalId(t,o,{actor:a}={}){let e=this.#t.get(bi(t));return!e||e.inactive||e.resolving||e.submitting||a!==void 0&&e.actor!==a?!1:(await this.#g(e,o),!0)}async handleResolved(t){if(t?.kind!=="approval")return!1;let o=this.#t.get(bi(t.interactionId));if(!o||(o.resolving=!0,o.activationTask&&await o.activationTask.catch(()=>{}),o.inactive||this.#t.get(o.approvalId)!==o))return!0;let a=o.presentationTask,e=o.presented||a,i=o.send,A=this.#s(o);return await this.#i(A,async()=>{let r=o.presented;a&&(r=await a.then(()=>!0,()=>!1)),e&&r&&(o.resolutionNotified=!0,await i(WQ(t.outcome)).catch(()=>{}))}),!0}async closeRoute(t){let o=this.#r.get(t);if(!o)return;let a=[...o.items];for(let e of a)this.#s(e);await Promise.all(a.map(async e=>{try{await e.interaction.respond(jY(e,"rejected"),{signal:AbortSignal.timeout(5e3)}),e.closedOutcome="rejected",(e.presented||e.deliveryCompleted)&&!e.resolutionNotified&&(e.resolutionNotified=!0,await e.send(WQ("rejected")).catch(()=>{}))}catch(i){i?.code==="interaction-not-pending"?(e.closedOutcome="resolved",(e.presented||e.deliveryCompleted)&&!e.resolutionNotified&&(e.resolutionNotified=!0,await e.send(w(jd)).catch(()=>{}))):this.#A.warn?.(`[dsh-im:${this.#e}] failed to reject a closing approval:`,i)}}))}async#o(t){if(this.#r.get(t.key)?.items[0]!==t||t.inactive||t.resolving||t.presented||(await t.activationTask?.catch(()=>{}),this.#r.get(t.key)?.items[0]!==t||t.inactive||t.resolving||t.presented))return;if(t.presentationTask)return t.presentationTask;let o=t.render?Promise.resolve().then(()=>t.render(t,t.send)):Promise.resolve().then(()=>t.send(t.text));t.presentationTask=o;try{await o,t.deliveryCompleted=!0,t.inactive?t.closedOutcome&&!t.resolutionNotified&&(t.resolutionNotified=!0,await t.send(WQ(t.closedOutcome)).catch(()=>{})):t.presented=!0}finally{t.presentationTask===o&&(t.presentationTask=null)}}async#g(t,o){t.submitting=!0;try{await t.interaction.respond(jY(t,o))}catch(i){if(i?.code==="interaction-not-pending"){let A=t.send,r=this.#s(t);await this.#i(r,async()=>{t.resolutionNotified||await A(w(jd)).catch(()=>{})});return}if(t.inactive)return;t.submitting=!1,this.#A.error?.(`[dsh-im:${this.#e}] failed to submit an approval:`,i),await t.send(w("\u5BA1\u6279\u63D0\u4EA4\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u56DE\u590D\u300C\u6279\u51C6\u300D\u6216\u300C\u62D2\u7EDD\u300D\u3002")).catch(()=>{});return}let a=t.send,e=this.#s(t);await this.#i(e,async()=>{t.resolutionNotified||await a(WQ(o)).catch(()=>{})})}async#i(t,o){let a,e=new Promise(i=>{a=i});t&&(t.activationTask=e);try{await o()}finally{a(),t?.activationTask===e&&(t.activationTask=null)}await this.#a(t)}async#a(t){if(t)try{await this.#o(t)}catch(o){this.#A.error?.(`[dsh-im:${this.#e}] failed to present the next approval:`,o);try{t.interaction.reconnect?.()}catch{}}}#s(t){if(t.inactive)return null;t.inactive=!0,this.#l(t.key),this.#t.delete(t.approvalId);let o=this.#r.get(t.key);if(!o)return null;let a=o.items[0]===t,e=o.items.indexOf(t);return e!==-1&&o.items.splice(e,1),o.items.length===0?(this.#r.delete(t.key),null):a?o.items[0]:null}#l(t){let o=Date.now();for(let[a,e]of this.#I)e<=o&&this.#I.delete(a);for(this.#I.delete(t),this.#I.set(t,o+The);this.#I.size>Nhe;)this.#I.delete(this.#I.keys().next().value)}async#c(t,o){try{return await t.respond({ok:!0,value:{sessionId:t.sessionId,approvalId:o.approvalId,outcome:"rejected"}},{signal:AbortSignal.timeout(5e3)}),!0}catch(a){if(a?.code==="interaction-not-pending")return!1;throw a}}};var j_=new WeakMap;function vhe(n){let t=j_.get(n);return t||(t=new Map,j_.set(n,t)),t}async function ug(n,t,o){let a=typeof n;if(a!=="object"&&a!=="function"||n===null)throw new TypeError("state is required");if(typeof t!="string"||!t)throw new TypeError("conversation key is required");if(typeof o!="function")throw new TypeError("operation is required");let e=vhe(n),i=e.get(t)??Promise.resolve(),A,r=new Promise(s=>{A=s});e.set(t,r),await i;try{return await o()}finally{A(),e.get(t)===r&&(e.delete(t),e.size===0&&j_.delete(n))}}var Phe=/(?:\u001b\]|\u009d)(?:(?!\u0007|\u001b\\)[\s\S])*(?:\u0007|\u001b\\|$)/gu,Ghe=/(?:\u001b\[|\u009b)[0-?]*[ -/]*[@-~]/gu,Fhe=/\u001b[@-_]/gu,Lhe=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f]/gu,Uhe=/[\u200b\u200e\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff]/gu,Hhe=/^(?:[\s\S]*?<\/dsh_im_source>\s*)?(?:[\s\S]*?<\/dsh_im_source_guidance>\s*)?(?:[\s\S]*?<\/dsh_im_reply_to>\s*)?/u,Khe=new Intl.Segmenter(void 0,{granularity:"grapheme"});function J_(n){return n.replace(Phe,"").replace(Ghe,"").replace(Fhe,"").replace(Lhe,"").replace(Uhe,"").replace(/\s+/gu," ").trim()}function q_(n,t=60){if(Buffer.byteLength(n,"utf8")<=t)return n;let o="\u2026",a=t-Buffer.byteLength(o,"utf8"),e="";for(let{segment:i}of Khe.segment(n)){if(Buffer.byteLength(e+i,"utf8")>a)break;e+=i}return`${e.trimEnd()}${o}`}function xhe(n){return typeof n=="string"?n:Array.isArray(n)?n.filter(t=>t?.type==="text"&&typeof t.text=="string").map(t=>t.text).join(` +`):""}function Yhe(n){let t=n?.name??n?.filename??n?.fileName;return typeof t!="string"?"":t.replaceAll("\\","/").split("/").at(-1)?.replace(/[\u0000-\u001f\u007f]/gu,"").trim()??""}function qY({text:n,content:t,files:o}={}){let a=typeof n=="string"?J_(n):"";if(a)return q_(a);let e=J_(xhe(t).replace(Hhe,""));if(e)return q_(e);let i=Array.isArray(o)?o.map(Yhe).find(Boolean):"",A=i?J_(i):"";return A?q_(A):null}var Mi="workspace-session-stale";function zY(n,t){if(typeof n.workspaceSession=="function")return n.workspaceSession(t);let o={sessionId:t,sessionExists:(...a)=>n.sessionExists(t,...a),models:(...a)=>n.getSessionModels(t,...a),selectModel:(...a)=>n.selectSessionModel(t,...a),isRunning:(...a)=>n.isSessionRunning(t,...a),hasActiveTurn:(...a)=>n.hasActiveTurn(t,...a),stopActiveTurn:(...a)=>n.stopActiveTurn(t,...a),steerActiveTurn:(...a)=>n.steerActiveTurn(t,...a),ask:(...a)=>n.ask(t,...a)};return typeof n.renameSession=="function"&&(o.renameTitle=(...a)=>n.renameSession(t,...a)),Object.freeze(o)}async function jhe(n,t){return t===void 0?n.sessionExists():n.sessionExists(t)}async function Jhe(n,t){return t===void 0?n.createSession():n.createSession(t)}async function ka({harness:n,state:t,key:o,text:a,content:e,contextEnhanced:i=!1,createOptions:A,existsOptions:r,askOptions:s}){let g=i?qY({text:a,content:e,files:typeof s=="object"?s?.files:void 0}):null,c=A?.signal??(typeof s=="object"?s?.signal:void 0),I=c?{signal:c}:void 0;for(;;)try{let d=await ug(t,o,async()=>{let m=t.sessionFor(o),_=m?zY(n,m):null;if(!_||!await jhe(_,r)){if(m=await Jhe(n,A),await t.setSession(o,m)===!1)return null;if(_=zY(n,m),g&&typeof _.renameTitle=="function")try{await _.renameTitle(g,I)}catch(T){if(T?.code===Mi||I?.signal?.aborted)throw T;console.warn("[dsh-im] unable to set the initial Session title:",T?.message??T)}}return{sessionId:m,session:_}});if(!d)continue;let B=[],f=typeof s=="object"&&typeof s?.onArtifact=="function"?s.onArtifact:null,Q=typeof s=="number"?{timeoutMs:s}:{...s};Q.onArtifact=async m=>{B.push(m),await f?.(m)};let y=await d.session.ask(e??a,Q);return{sessionId:d.sessionId,answer:y,...B.length>0?{artifacts:B}:{}}}catch(d){if(d?.code!==Mi)throw d}}var WY=/^\/compact(?=$|\s)([\s\S]*)$/i,qhe="\u7528\u6CD5\uFF1A/compact\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",VY=new Map([["No compactable history yet.","\u6682\u65E0\u53EF\u538B\u7F29\u7684\u5386\u53F2\u8BB0\u5F55\u3002"],["Compaction is unavailable because this process has an active compaction, or the agent is not idle.","\u5F53\u524D\u4F1A\u8BDD\u6B63\u5728\u751F\u6210\u56DE\u590D\u6216\u6267\u884C\u538B\u7F29\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"],["Compaction cancelled.","\u4E0A\u4E0B\u6587\u538B\u7F29\u5DF2\u53D6\u6D88\u3002"],["The history selected for compaction changed before it could be replaced. The conversation is unchanged; the attempt is recorded in the session log.","\u538B\u7F29\u671F\u95F4\u4F1A\u8BDD\u5386\u53F2\u53D1\u751F\u53D8\u5316\uFF0C\u672C\u6B21\u672A\u4FEE\u6539\u4F1A\u8BDD\uFF0C\u8BF7\u91CD\u8BD5\u3002"],["Compaction could not produce a useful summary. The conversation is unchanged; the attempt is recorded in the session log.","\u672A\u80FD\u751F\u6210\u6709\u6548\u7684\u538B\u7F29\u6458\u8981\uFF0C\u672C\u6B21\u672A\u4FEE\u6539\u4F1A\u8BDD\u3002"],["Compaction did not finish cleanly; some session history may have changed. Inspect the current session state before retrying.","\u4E0A\u4E0B\u6587\u538B\u7F29\u672A\u6B63\u5E38\u5B8C\u6210\uFF0C\u90E8\u5206\u4F1A\u8BDD\u5386\u53F2\u53EF\u80FD\u5DF2\u53D8\u5316\uFF0C\u8BF7\u68C0\u67E5\u4F1A\u8BDD\u540E\u518D\u91CD\u8BD5\u3002"],["Compaction finished, but the session could not be saved.","\u4E0A\u4E0B\u6587\u5DF2\u538B\u7F29\uFF0C\u4F46\u4F1A\u8BDD\u4FDD\u5B58\u5931\u8D25\u3002"]]);function ZI(n){return{handled:!0,message:n,messages:[n]}}function zhe(n){if(!n||typeof n!="object"||!["success","error"].includes(n.kind)||n.text!==void 0&&typeof n.text!="string")throw new TypeError("Harness returned an invalid /compact result");let t=n.text?.trim()??"",o=/^Compacted (\d+) history items \(~(\d+) tokens\)\.$/u.exec(t);return o?w("\u5DF2\u538B\u7F29 {count} \u6761\u5386\u53F2\u8BB0\u5F55\uFF08\u7EA6 {tokens} \u4E2A token\uFF09\u3002",{count:o[1],tokens:o[2]}):VY.has(t)?w(VY.get(t)):t||(n.kind==="success"?w("\u4E0A\u4E0B\u6587\u538B\u7F29\u5B8C\u6210\u3002"):w("\u4E0A\u4E0B\u6587\u538B\u7F29\u5931\u8D25\u3002"))}function Vhe(n){let t=n?.code??n?.failure?.code;return t==="session-not-found"?w("\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u53D1\u9001\u65B0\u6D88\u606F\u5F00\u542F\u4F1A\u8BDD\u3002"):t==="agent-busy"?w("\u5F53\u524D\u4F1A\u8BDD\u6B63\u5728\u751F\u6210\u56DE\u590D\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="cancelled"||n?.name==="AbortError"?w("\u4E0A\u4E0B\u6587\u538B\u7F29\u5DF2\u53D6\u6D88\u3002"):t===Mi||t==="workspace-bot-not-found"?w("\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002"):t==="commands-unavailable"?w("\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u4ECE\u673A\u5668\u4EBA\u6267\u884C\u4E0A\u4E0B\u6587\u538B\u7F29\u3002"):w("\u4E0A\u4E0B\u6587\u538B\u7F29\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function va(n,t,o,a,e={}){if(!z_(n))return null;if(WY.exec(n.trim())[1].trim())return ZI(w(qhe));if(typeof o?.sessionFor!="function")return ZI(w("\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u53EF\u7528\u7684\u4F1A\u8BDD\u72B6\u6001\u3002"));let A=o.sessionFor(a);if(typeof A!="string"||!A)return ZI(w("\u5F53\u524D\u804A\u5929\u8FD8\u6CA1\u6709\u53EF\u538B\u7F29\u7684\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u53D1\u9001\u4E00\u6761\u6D88\u606F\u3002"));if(typeof t?.executeCommand!="function")return ZI(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u4E0A\u4E0B\u6587\u538B\u7F29\u3002"));try{let r=await t.executeCommand(A,"/compact",e);return ZI(r===void 0?w("\u5F53\u524D Harness \u672A\u6CE8\u518C /compact \u547D\u4EE4\uFF0C\u8BF7\u786E\u8BA4\u4E0A\u4E0B\u6587\u538B\u7F29\u7EC4\u4EF6\u5DF2\u542F\u7528\u3002"):zhe(r?.result))}catch(r){return ZI(Vhe(r))}}function z_(n){return typeof n=="string"&&WY.test(n.trim())}import{isDeepStrictEqual as sEe}from"node:util";import{realpath as $Y,stat as e1}from"node:fs/promises";import{isAbsolute as A1,resolve as Whe}from"node:path";var t1=/^\/(?:workspace|ws)(?:\s+([\s\S]+))?$/i,r1=/^\/(?:workspacelist|workspaces|wsl)(?:\s+([\s\S]+))?$/i,i1=/^\/(?:sessionlist|sessions)(?:\s+([\s\S]+))?$/i,a1=/^\/session(?=$|\s)/i,Zhe=/^\/session[ \t]+([^\s]+)$/i,Xhe=4096,$he=1800,eEe=256,o1=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u,AEe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+/gu,n1="\u7528\u6CD5\uFF1A/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7\uFF08/session N\uFF09",XI=["\u7528\u6CD5\uFF1A","/sessionlist \u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u4F1A\u8BDD","/sessionlist --limit N \u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u524D N \u4E2A\u4F1A\u8BDD\uFF08N \u4E3A\u6B63\u6574\u6570\uFF09","/sessionlist \u5DE5\u4F5C\u533A\u5E8F\u53F7 \u6309 /workspacelist \u5E8F\u53F7\u5217\u51FA\u4F1A\u8BDD","/sessionlist \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84 \u5217\u51FA\u6307\u5B9A\u5DE5\u4F5C\u533A\u4F1A\u8BDD"].join(` +`);function Nt(n,t=[n]){return{handled:!0,message:n,messages:t}}function Jd(n){return typeof n!="string"||n.length>Xhe||!A1(n)||o1.test(n)?null:Whe(n)}function ZQ(n){return typeof n!="string"?"":n.replace(AEe," ").replace(/\s+/gu," ").trim()}function ZY(n){return typeof n=="string"&&n.length>0&&n.length<=eEe&&!new RegExp("\\p{White_Space}","u").test(n)&&!o1.test(n)}function Z_(n){let t=typeof n=="string"?n.trim():"";if(!t)return{selector:"",limit:null};if(!t.toLowerCase().startsWith("--limit"))return{selector:t,limit:null};let o=/^--limit[ \t]+(\d+)$/iu.exec(t),a=o?Number(o[1]):null;return!Number.isSafeInteger(a)||a<1?{error:w(XI)}:{selector:"",limit:a}}async function V_(n){let t=await Promise.all(n.map(async o=>{let a=Jd(o);if(!a)return null;try{return(await e1(a)).isDirectory()?Jd(await $Y(a)):null}catch{return null}}));return[...new Set(t.filter(Boolean))]}async function W_(n){if(typeof n!="string"||!A1(n.trim()))return{error:w(`\u5DE5\u4F5C\u533A\u5FC5\u987B\u662F\u7EDD\u5BF9\u8DEF\u5F84\u3002 +{usage}`,{usage:w(XI)})};let t=Jd(n.trim());if(!t)return{error:w(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5305\u542B\u4E0D\u652F\u6301\u7684\u5B57\u7B26\u6216\u957F\u5EA6\u8D85\u8FC7\u9650\u5236\u3002 +{usage}`,{usage:w(XI)})};let o;try{o=await e1(t)}catch{return{error:w(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002 +{usage}`,{usage:w(XI)})}}if(!o.isDirectory())return{error:w(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5FC5\u987B\u6307\u5411\u4E00\u4E2A\u76EE\u5F55\u3002 +{usage}`,{usage:w(XI)})};try{let a=Jd(await $Y(t));return a?{workspace:a}:{error:w(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5305\u542B\u4E0D\u652F\u6301\u7684\u5B57\u7B26\u6216\u957F\u5EA6\u8D85\u8FC7\u9650\u5236\u3002 +{usage}`,{usage:w(XI)})}}catch{return{error:w(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002 +{usage}`,{usage:w(XI)})}}}async function qd(n,t={}){let o=await n.listWorkspaces(t),a=typeof n?.currentWorkspace=="function"?n.currentWorkspace():null,[e]=a?await V_([a]):[],i=await V_(Array.isArray(o)?o:[]),A=[...new Set([...e?[e]:[],...i])];return n.assertWorkspaceScope?.(),{current:e??null,paths:A}}function Cg(n){let t=[],o=0;for(;o=o)a=e+1;else{let i=n.charCodeAt(a-1),A=n.charCodeAt(a);i>=55296&&i<=56319&&A>=56320&&A<=57343&&(a-=1)}}t.push(n.slice(o,a)),o=a}return t}async function tEe(n,t){if(n[1]?.trim())return Nt(w("\u7528\u6CD5\uFF1A/workspacelist"));if(typeof t?.listWorkspaces!="function")return Nt(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u5217\u51FA\u5DE5\u4F5C\u533A\u3002"));try{let{current:o,paths:a}=await qd(t);if(a.length===0)return Nt(w("\u5F53\u524D Harness Host \u4E0A\u6CA1\u6709\u4ECD\u7136\u5B58\u5728\u7684\u5DF2\u767B\u8BB0\u5DE5\u4F5C\u533A\u3002"));let i=[w("\u5F53\u524D Harness Host \u4E0A\u5B58\u5728\u7684\u5DE5\u4F5C\u533A\uFF08{count}\uFF09\uFF1A",{count:a.length}),...a.map((A,r)=>`${r+1}. ${A}${A===o?w("\uFF08\u5F53\u524D\uFF09"):""}`),"",w("\u5207\u6362\u7528\u6CD5\uFF1A/workspace \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84"),w("\u67E5\u770B\u4F1A\u8BDD\uFF1A/sessionlist \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84")].join(` +`);return Nt(i,Cg(i))}catch(o){return o?.code==="workspace-bot-not-found"?Nt(w("\u673A\u5668\u4EBA\u6B63\u5728\u79FB\u9664\u6216\u5DF2\u91CD\u65B0\u63A5\u5165\uFF0C\u65E0\u6CD5\u5217\u51FA\u539F\u4F1A\u8BDD\u7684\u5DE5\u4F5C\u533A\u3002")):Nt(w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u5DE5\u4F5C\u533A\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))}}async function X_(n,t,o={}){if(!n){if(typeof t?.currentWorkspace!="function")return{error:w("\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u53EF\u7528\u7684\u5DE5\u4F5C\u533A\u3002")};let e=await W_(t.currentWorkspace());return t.assertWorkspaceScope?.(),e}if(/^\d+$/u.test(n)){if(typeof t?.listWorkspaces!="function")return{error:w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u6309\u5E8F\u53F7\u9009\u62E9\u5DE5\u4F5C\u533A\u3002")};let{paths:e}=await qd(t,o),i=Number(n);return!Number.isSafeInteger(i)||i<1||i>e.length?{error:w("\u5DE5\u4F5C\u533A\u5E8F\u53F7\u4E0D\u5B58\u5728\uFF0C\u8BF7\u5148\u6267\u884C /workspacelist\u3002")}:{workspace:e[i-1]}}let a=await W_(n);return t.assertWorkspaceScope?.(),a}function rEe(n){let t=typeof n=="number"&&Number.isFinite(n)?n:null;if(t===null)return"";let o=new Date(t);if(Number.isNaN(o.getTime()))return"";let a=s=>String(s).padStart(2,"0"),e=`${a(o.getHours())}:${a(o.getMinutes())}`,i=s=>new Date(s.getFullYear(),s.getMonth(),s.getDate()).getTime(),A=new Date,r=Math.round((i(A)-i(o))/864e5);return r===0?w("\u4ECA\u5929 {time}",{time:e}):r===1?w("\u6628\u5929 {time}",{time:e}):r===2?w("\u524D\u5929 {time}",{time:e}):o.getFullYear()===A.getFullYear()?w("{month}\u6708{day}\u65E5 {time}",{month:o.getMonth()+1,day:o.getDate(),time:e}):w("{year}\u5E74{month}\u6708{day}\u65E5",{year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()})}function iEe(n,t,{currentWorkspace:o=!1}={}){let a=t.map(e=>{let i=ZQ(e?.sessionId);if(!i)throw new TypeError("Harness returned an invalid session id");let A=e?.summaryAvailable===!1?w("\u6807\u9898\u6682\u4E0D\u53EF\u7528"):ZQ(e?.title)||w("\u6682\u65E0\u6807\u9898"),r=rEe(e?.time),s=`${r?` \xB7 ${r}`:""}${e?.archived===!0?w("\uFF08\u5DF2\u5F52\u6863\uFF09"):""}`;return`${A}${s} ID: ${i}`});return a.length===0?w(`\u5DE5\u4F5C\u533A\uFF1A{workspace} \u8BE5\u5DE5\u4F5C\u533A\u6682\u65E0\u4F1A\u8BDD\u3002`,{workspace:n}):[w("\u5DE5\u4F5C\u533A\uFF1A{workspace}",{workspace:n}),w("\u4F1A\u8BDD\uFF08{count}\uFF09\uFF1A",{count:a.length}),"",...a.map((e,i)=>`${i+1}. ${e}`),"",o?w("\u7ED1\u5B9A\u7528\u6CD5\uFF1A/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7\uFF08/session N\uFF09"):w(`\u7ED1\u5B9A\u7528\u6CD5\uFF1A/session Session ID \u63D0\u793A\uFF1A/session N \u53EA\u6309\u673A\u5668\u4EBA\u5F53\u524D\u5DE5\u4F5C\u533A\u7684\u5E8F\u53F7\u7ED1\u5B9A\u3002`)].join(` -`)}async function tEe(n){if(typeof n?.currentWorkspace!="function")return null;let[t]=await V_([n.currentWorkspace()]);return n.assertWorkspaceScope?.(),t??null}async function rEe(n,t){let o=Z_(n[1]);if(o.error)return Tt(o.error);if(typeof t?.listWorkspaceSessions!="function")return Tt(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u5217\u51FA\u5DE5\u4F5C\u533A\u4F1A\u8BDD\u3002"));try{let a=await X_(o.selector,t);if(a.error)return Tt(a.error);let e=await t.listWorkspaceSessions(a.workspace);if(!e||!Array.isArray(e.sessions))throw new TypeError("Harness returned an invalid workspace session list");t.assertWorkspaceScope?.();let i=Jd(e.workspace)??a.workspace,A=await tEe(t),r=o.limit===null?e.sessions:e.sessions.slice(0,o.limit),s=AEe(i,r,{currentWorkspace:i===A});return Tt(s,Cg(s))}catch(a){return a?.code==="workspace-bot-not-found"?Tt(w("\u673A\u5668\u4EBA\u6B63\u5728\u79FB\u9664\u6216\u5DF2\u91CD\u65B0\u63A5\u5165\uFF0C\u65E0\u6CD5\u5217\u51FA\u539F\u4F1A\u8BDD\u7684\u5DE5\u4F5C\u533A\u4F1A\u8BDD\u3002")):Tt(w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u5DE5\u4F5C\u533A\u4F1A\u8BDD\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))}}function XY(n){return n?.code==="session-id-invalid"?w(`Session ID \u683C\u5F0F\u65E0\u6548\u3002 -{usage}`,{usage:w(n1)}):["session-not-registered","session-not-found"].includes(n?.code)?w("\u672A\u627E\u5230\u8BE5\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u6267\u884C /sessionlist \u786E\u8BA4 Session ID\u3002"):n?.code==="session-subagent-unsupported"?w("\u5B50\u4EE3\u7406\u4F1A\u8BDD\u4E0D\u80FD\u7ED1\u5B9A\u5230\u673A\u5668\u4EBA\u5BF9\u8BDD\uFF0C\u8BF7\u9009\u62E9\u666E\u901A\u4F1A\u8BDD\u3002"):n?.code==="session-workspace-ambiguous"?w("\u8BE5\u4F1A\u8BDD\u7684\u5DE5\u4F5C\u533A\u5F52\u5C5E\u4E0D\u660E\u786E\uFF0C\u6682\u65F6\u65E0\u6CD5\u7ED1\u5B9A\u3002"):n?.code==="session-summary-unavailable"?w("\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u8BE5\u4F1A\u8BDD\u7684\u4FE1\u606F\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):n?.code==="workspace-bot-not-found"?w("\u673A\u5668\u4EBA\u6B63\u5728\u79FB\u9664\u6216\u5DF2\u91CD\u65B0\u63A5\u5165\uFF0C\u65E0\u6CD5\u7ED1\u5B9A\u539F\u5BF9\u8BDD\u7684\u4F1A\u8BDD\u3002"):[Mi,"agent-busy","session-conflict","workspace-conflict"].includes(n?.code)?w("\u5DE5\u4F5C\u533A\u6216\u4F1A\u8BDD\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002"):w("\u6682\u65F6\u65E0\u6CD5\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function iEe(n,t,o){let e=zhe.exec(n)?.[1];if(typeof e=="string"&&/^\d+$/u.test(e)){if(typeof t?.listWorkspaceSessions!="function"||typeof t?.currentWorkspace!="function")return Tt(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u6309\u5E8F\u53F7\u7ED1\u5B9A\uFF0C\u8BF7\u4F7F\u7528 /session Session ID\u3002"));try{let i=await W_(t.currentWorkspace());if(i.error)return Tt(i.error);let A=await t.listWorkspaceSessions(i.workspace);if(!A||!Array.isArray(A.sessions))throw new TypeError("Harness returned an invalid workspace session list");t.assertWorkspaceScope?.();let r=Number(e);if(!Number.isSafeInteger(r)||r<1||r>A.sessions.length)return Tt(w("\u4F1A\u8BDD\u5E8F\u53F7\u4E0D\u5B58\u5728\uFF0C\u8BF7\u5148\u6267\u884C /sessionlist \u67E5\u770B\u5E8F\u53F7\u3002"));let s=A.sessions[r-1]?.sessionId;if(!ZY(s))throw new TypeError("Harness returned an invalid session id");e=s}catch(i){return i?.code==="workspace-bot-not-found"?Tt(XY(i)):Tt(w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u4F1A\u8BDD\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))}}if(!ZY(e))return Tt(w(n1));if(typeof t?.bindWorkspaceSession!="function")return Tt(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u7ED1\u5B9A\u5DF2\u6709\u4F1A\u8BDD\u3002"));if(typeof o!="string"||!o)return Tt(w("\u5F53\u524D\u6D88\u606F\u7F3A\u5C11\u53EF\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u4E0A\u4E0B\u6587\u3002"));try{let i=await t.bindWorkspaceSession(o,e);t.assertWorkspaceScope?.();let A=Jd(i?.workspace),r=WQ(i?.sessionId);if(!A||!r)throw new TypeError("Harness returned an invalid bound session");let s=WQ(i?.title)||w("\u6682\u65E0\u6807\u9898"),g=[w("\u5F53\u524D\u804A\u5929\u5DF2\u7ED1\u5B9A\u4F1A\u8BDD\uFF1A"),w("\u5DE5\u4F5C\u533A\uFF1A{workspace}",{workspace:A}),w("\u6807\u9898\uFF1A{title}",{title:s}),`ID\uFF1A${r}`,w("\u5F52\u6863\uFF1A{archived}",{archived:i?.archived===!0?w("\u662F"):w("\u5426")}),w("\u53D1\u9001 /history \u67E5\u770B\u6700\u8FD1\u5BF9\u8BDD\u3002")].join(` -`);return Tt(g,Cg(g))}catch(i){return Tt(XY(i))}}async function Po(n,t,o){if(!$_(n))return null;let a=n.trim();if(a1.test(a))return iEe(a,t,o);let e=i1.exec(a);if(e)return rEe(e,t);let i=r1.exec(a);if(i)return $he(i,t);let A=t1.exec(a);if(!A)return null;let r=A[1]?.trim();if(!r)return Tt(w("\u7528\u6CD5\uFF1A/workspace \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84"));if(typeof t?.switchWorkspace!="function")return Tt(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u5207\u6362\u5DE5\u4F5C\u533A\u3002"));try{let s=r;if(/^\d+$/u.test(r)){if(typeof t?.listWorkspaces!="function")return Tt(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u6309\u5E8F\u53F7\u9009\u62E9\u5DE5\u4F5C\u533A\u3002"));let{paths:c}=await qd(t),I=Number(r);if(!Number.isSafeInteger(I)||I<1||I>c.length)return Tt(w("\u5DE5\u4F5C\u533A\u5E8F\u53F7\u4E0D\u5B58\u5728\uFF0C\u8BF7\u5148\u6267\u884C /workspacelist\u3002"));s=c[I-1]}let g=await t.switchWorkspace(s);return Tt(w("\u5DE5\u4F5C\u533A\u5DF2\u5207\u6362\u4E3A\uFF1A{workspace}",{workspace:g}))}catch(s){if(["workspace-not-absolute","workspace-not-found","workspace-not-directory"].includes(s?.code))return Tt(w(`{message} -\u7528\u6CD5\uFF1A/workspace \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84`,{message:s.message}));if(s?.code==="workspace-bot-not-found")return Tt(w("\u673A\u5668\u4EBA\u6B63\u5728\u79FB\u9664\u6216\u5DF2\u91CD\u65B0\u63A5\u5165\uFF0C\u65E0\u6CD5\u5207\u6362\u539F\u4F1A\u8BDD\u7684\u5DE5\u4F5C\u533A\u3002"));throw s}}function $_(n){if(typeof n!="string")return!1;let t=n.trim();return a1.test(t)||i1.test(t)||r1.test(t)||t1.test(t)}var g1=/^\/history(?=$|\s)([\s\S]*)$/iu,oEe="\u7528\u6CD5\uFF1A/history [\u6570\u91CF]\uFF08\u9ED8\u8BA4 3 \u6761\uFF0C\u6700\u591A 5 \u6761\uFF09",nEe=5,sEe=50,gEe=3,s1=1e4;function wc(n){return{handled:!0,message:n,messages:Cg(n)}}function c1(n){if(!Array.isArray(n))throw new TypeError("Invalid history message content");return n.flatMap(t=>t?.type==="text"&&typeof t.text=="string"?[t.text]:t?.type==="image"?[w("[\u56FE\u7247]")]:t?.type==="file"?[w("[\u6587\u4EF6]")]:[]).join(` -`).replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/gu,"").trim()||w("\u672C\u6761\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u6587\u5B57\u3002")}function cEe(n){let t=[],o=new Map;for(let a of n){let e=a.data;if(a.type==="user/message"&&a.surfaceOp==="append"&&e?.source?.kind==="user"){if(Yi(c1(e.content)))continue;t.push({seq:a.seq,role:"user",content:e.content})}else if(a.type==="assistant/message"&&a.surfaceOp==="append"&&Number.isSafeInteger(e?.turn)&&e.turn>=0)o.set(e.turn,a);else if(a.type==="turn/end"){let i=o.get(e?.turn);if(o.delete(e?.turn),(e?.reason?.kind??e?.reason)!=="completed"||!i||i.data.interrupted===!0)continue;t.push({seq:i.seq,role:"assistant",content:i.data.message?.content})}}return t.sort((a,e)=>a.seq-e.seq)}function IEe(n,t){if(n.length<=t)return n;let o=w("\uFF08\u5DF2\u622A\u65AD\uFF09"),a=Math.max(0,t-o.length),e=n.charCodeAt(a-1);return e>=55296&&e<=56319&&(a-=1),`${n.slice(0,Math.max(0,a))}${o}`}function lEe(n,t,o,a){let e=n.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu,"").slice(0,12),i=w("\u4F1A\u8BDD\u5386\u53F2\uFF5C{session}\uFF5C\u6700\u8FD1 {count} \u6761",{session:e,count:t.length}),A=[w("\u4EE5\u4E0A\u4E3A\u5386\u53F2\u8BB0\u5F55\uFF0C\u4E0D\u662F\u672C\u6B21\u65B0\u56DE\u590D\u3002")];t.length({...c,text:c1(c.content)})),s=500,g;do{let c=r.map((I,d)=>`${d+1}. ${I.role==="user"?w("\u7528\u6237"):w("\u52A9\u624B")} -${IEe(I.text,s)}`);g=wc([i,...c,A.join(` +`)}async function aEe(n){if(typeof n?.currentWorkspace!="function")return null;let[t]=await V_([n.currentWorkspace()]);return n.assertWorkspaceScope?.(),t??null}async function oEe(n,t){let o=Z_(n[1]);if(o.error)return Nt(o.error);if(typeof t?.listWorkspaceSessions!="function")return Nt(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u5217\u51FA\u5DE5\u4F5C\u533A\u4F1A\u8BDD\u3002"));try{let a=await X_(o.selector,t);if(a.error)return Nt(a.error);let e=await t.listWorkspaceSessions(a.workspace);if(!e||!Array.isArray(e.sessions))throw new TypeError("Harness returned an invalid workspace session list");t.assertWorkspaceScope?.();let i=Jd(e.workspace)??a.workspace,A=await aEe(t),r=o.limit===null?e.sessions:e.sessions.slice(0,o.limit),s=iEe(i,r,{currentWorkspace:i===A});return Nt(s,Cg(s))}catch(a){return a?.code==="workspace-bot-not-found"?Nt(w("\u673A\u5668\u4EBA\u6B63\u5728\u79FB\u9664\u6216\u5DF2\u91CD\u65B0\u63A5\u5165\uFF0C\u65E0\u6CD5\u5217\u51FA\u539F\u4F1A\u8BDD\u7684\u5DE5\u4F5C\u533A\u4F1A\u8BDD\u3002")):Nt(w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u5DE5\u4F5C\u533A\u4F1A\u8BDD\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))}}function XY(n){return n?.code==="session-id-invalid"?w(`Session ID \u683C\u5F0F\u65E0\u6548\u3002 +{usage}`,{usage:w(n1)}):["session-not-registered","session-not-found"].includes(n?.code)?w("\u672A\u627E\u5230\u8BE5\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u6267\u884C /sessionlist \u786E\u8BA4 Session ID\u3002"):n?.code==="session-subagent-unsupported"?w("\u5B50\u4EE3\u7406\u4F1A\u8BDD\u4E0D\u80FD\u7ED1\u5B9A\u5230\u673A\u5668\u4EBA\u5BF9\u8BDD\uFF0C\u8BF7\u9009\u62E9\u666E\u901A\u4F1A\u8BDD\u3002"):n?.code==="session-workspace-ambiguous"?w("\u8BE5\u4F1A\u8BDD\u7684\u5DE5\u4F5C\u533A\u5F52\u5C5E\u4E0D\u660E\u786E\uFF0C\u6682\u65F6\u65E0\u6CD5\u7ED1\u5B9A\u3002"):n?.code==="session-summary-unavailable"?w("\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u8BE5\u4F1A\u8BDD\u7684\u4FE1\u606F\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):n?.code==="workspace-bot-not-found"?w("\u673A\u5668\u4EBA\u6B63\u5728\u79FB\u9664\u6216\u5DF2\u91CD\u65B0\u63A5\u5165\uFF0C\u65E0\u6CD5\u7ED1\u5B9A\u539F\u5BF9\u8BDD\u7684\u4F1A\u8BDD\u3002"):[Mi,"agent-busy","session-conflict","workspace-conflict"].includes(n?.code)?w("\u5DE5\u4F5C\u533A\u6216\u4F1A\u8BDD\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002"):w("\u6682\u65F6\u65E0\u6CD5\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function nEe(n,t,o){let e=Zhe.exec(n)?.[1];if(typeof e=="string"&&/^\d+$/u.test(e)){if(typeof t?.listWorkspaceSessions!="function"||typeof t?.currentWorkspace!="function")return Nt(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u6309\u5E8F\u53F7\u7ED1\u5B9A\uFF0C\u8BF7\u4F7F\u7528 /session Session ID\u3002"));try{let i=await W_(t.currentWorkspace());if(i.error)return Nt(i.error);let A=await t.listWorkspaceSessions(i.workspace);if(!A||!Array.isArray(A.sessions))throw new TypeError("Harness returned an invalid workspace session list");t.assertWorkspaceScope?.();let r=Number(e);if(!Number.isSafeInteger(r)||r<1||r>A.sessions.length)return Nt(w("\u4F1A\u8BDD\u5E8F\u53F7\u4E0D\u5B58\u5728\uFF0C\u8BF7\u5148\u6267\u884C /sessionlist \u67E5\u770B\u5E8F\u53F7\u3002"));let s=A.sessions[r-1]?.sessionId;if(!ZY(s))throw new TypeError("Harness returned an invalid session id");e=s}catch(i){return i?.code==="workspace-bot-not-found"?Nt(XY(i)):Nt(w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u4F1A\u8BDD\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))}}if(!ZY(e))return Nt(w(n1));if(typeof t?.bindWorkspaceSession!="function")return Nt(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u7ED1\u5B9A\u5DF2\u6709\u4F1A\u8BDD\u3002"));if(typeof o!="string"||!o)return Nt(w("\u5F53\u524D\u6D88\u606F\u7F3A\u5C11\u53EF\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u4E0A\u4E0B\u6587\u3002"));try{let i=await t.bindWorkspaceSession(o,e);t.assertWorkspaceScope?.();let A=Jd(i?.workspace),r=ZQ(i?.sessionId);if(!A||!r)throw new TypeError("Harness returned an invalid bound session");let s=ZQ(i?.title)||w("\u6682\u65E0\u6807\u9898"),g=[w("\u5F53\u524D\u804A\u5929\u5DF2\u7ED1\u5B9A\u4F1A\u8BDD\uFF1A"),w("\u5DE5\u4F5C\u533A\uFF1A{workspace}",{workspace:A}),w("\u6807\u9898\uFF1A{title}",{title:s}),`ID\uFF1A${r}`,w("\u5F52\u6863\uFF1A{archived}",{archived:i?.archived===!0?w("\u662F"):w("\u5426")}),w("\u53D1\u9001 /history \u67E5\u770B\u6700\u8FD1\u5BF9\u8BDD\u3002")].join(` +`);return Nt(g,Cg(g))}catch(i){return Nt(XY(i))}}async function Po(n,t,o){if(!$_(n))return null;let a=n.trim();if(a1.test(a))return nEe(a,t,o);let e=i1.exec(a);if(e)return oEe(e,t);let i=r1.exec(a);if(i)return tEe(i,t);let A=t1.exec(a);if(!A)return null;let r=A[1]?.trim();if(!r)return Nt(w("\u7528\u6CD5\uFF1A/workspace \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84"));if(typeof t?.switchWorkspace!="function")return Nt(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u5207\u6362\u5DE5\u4F5C\u533A\u3002"));try{let s=r;if(/^\d+$/u.test(r)){if(typeof t?.listWorkspaces!="function")return Nt(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u6309\u5E8F\u53F7\u9009\u62E9\u5DE5\u4F5C\u533A\u3002"));let{paths:c}=await qd(t),I=Number(r);if(!Number.isSafeInteger(I)||I<1||I>c.length)return Nt(w("\u5DE5\u4F5C\u533A\u5E8F\u53F7\u4E0D\u5B58\u5728\uFF0C\u8BF7\u5148\u6267\u884C /workspacelist\u3002"));s=c[I-1]}let g=await t.switchWorkspace(s);return Nt(w("\u5DE5\u4F5C\u533A\u5DF2\u5207\u6362\u4E3A\uFF1A{workspace}",{workspace:g}))}catch(s){if(["workspace-not-absolute","workspace-not-found","workspace-not-directory"].includes(s?.code))return Nt(w(`{message} +\u7528\u6CD5\uFF1A/workspace \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84`,{message:s.message}));if(s?.code==="workspace-bot-not-found")return Nt(w("\u673A\u5668\u4EBA\u6B63\u5728\u79FB\u9664\u6216\u5DF2\u91CD\u65B0\u63A5\u5165\uFF0C\u65E0\u6CD5\u5207\u6362\u539F\u4F1A\u8BDD\u7684\u5DE5\u4F5C\u533A\u3002"));throw s}}function $_(n){if(typeof n!="string")return!1;let t=n.trim();return a1.test(t)||i1.test(t)||r1.test(t)||t1.test(t)}var g1=/^\/history(?=$|\s)([\s\S]*)$/iu,gEe="\u7528\u6CD5\uFF1A/history [\u6570\u91CF]\uFF08\u9ED8\u8BA4 3 \u6761\uFF0C\u6700\u591A 5 \u6761\uFF09",cEe=5,IEe=50,lEe=3,s1=1e4;function Dc(n){return{handled:!0,message:n,messages:Cg(n)}}function c1(n){if(!Array.isArray(n))throw new TypeError("Invalid history message content");return n.flatMap(t=>t?.type==="text"&&typeof t.text=="string"?[t.text]:t?.type==="image"?[w("[\u56FE\u7247]")]:t?.type==="file"?[w("[\u6587\u4EF6]")]:[]).join(` +`).replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/gu,"").trim()||w("\u672C\u6761\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u6587\u5B57\u3002")}function dEe(n){let t=[],o=new Map;for(let a of n){let e=a.data;if(a.type==="user/message"&&a.surfaceOp==="append"&&e?.source?.kind==="user"){if(ji(c1(e.content)))continue;t.push({seq:a.seq,role:"user",content:e.content})}else if(a.type==="assistant/message"&&a.surfaceOp==="append"&&Number.isSafeInteger(e?.turn)&&e.turn>=0)o.set(e.turn,a);else if(a.type==="turn/end"){let i=o.get(e?.turn);if(o.delete(e?.turn),(e?.reason?.kind??e?.reason)!=="completed"||!i||i.data.interrupted===!0)continue;t.push({seq:i.seq,role:"assistant",content:i.data.message?.content})}}return t.sort((a,e)=>a.seq-e.seq)}function pEe(n,t){if(n.length<=t)return n;let o=w("\uFF08\u5DF2\u622A\u65AD\uFF09"),a=Math.max(0,t-o.length),e=n.charCodeAt(a-1);return e>=55296&&e<=56319&&(a-=1),`${n.slice(0,Math.max(0,a))}${o}`}function hEe(n,t,o,a){let e=n.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu,"").slice(0,12),i=w("\u4F1A\u8BDD\u5386\u53F2\uFF5C{session}\uFF5C\u6700\u8FD1 {count} \u6761",{session:e,count:t.length}),A=[w("\u4EE5\u4E0A\u4E3A\u5386\u53F2\u8BB0\u5F55\uFF0C\u4E0D\u662F\u672C\u6B21\u65B0\u56DE\u590D\u3002")];t.length({...c,text:c1(c.content)})),s=500,g;do{let c=r.map((I,d)=>`${d+1}. ${I.role==="user"?w("\u7528\u6237"):w("\u52A9\u624B")} +${pEe(I.text,s)}`);g=Dc([i,...c,A.join(` `)].join(` -`)),s=Math.floor(s/2)}while(s>0&&(g.message.length>3e3||g.messages.length>3));return g}function dEe(n){let t=n?.code??n?.failure?.code;return t==="session-not-found"?w("\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u7ED1\u5B9A\u4F1A\u8BDD\u3002"):t===Mi||t==="workspace-bot-not-found"||t==="session-binding-changed"?w("\u4F1A\u8BDD\u3001\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C /history\u3002"):t==="harness-api-not-found"?w("\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\u3002"):n?.name==="AbortError"?w("\u5386\u53F2\u8BFB\u53D6\u5DF2\u53D6\u6D88\u3002"):n?.name==="TimeoutError"||t==="harness-timeout"?w("\u8BFB\u53D6\u5386\u53F2\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):w("\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}function Yi(n){return typeof n=="string"&&g1.test(n.trim())}async function go(n,t,o,a,{signal:e,isDirect:i=!1,hasImages:A=!1,hasFiles:r=!1}={}){if(!Yi(n))return null;let s=g1.exec(n.trim())[1].trim();if(s&&(!/^\d+$/u.test(s)||/^0+$/u.test(s)))return wc(w(oEe));let g=s?Math.min(Number(s),nEe):3;if(!i)return wc(w("\u8BF7\u5728\u4E0E\u673A\u5668\u4EBA\u7684\u79C1\u804A\u4E2D\u4F7F\u7528 /history\u3002"));if(A||r)return wc(w("/history \u4EC5\u652F\u6301\u6587\u5B57\u547D\u4EE4\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u6216\u6587\u4EF6\u540E\u91CD\u8BD5\u3002"));let c=o?.sessionFor?.(a);if(typeof c!="string"||!c)return wc(w("\u5F53\u524D\u804A\u5929\u5C1A\u672A\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u53D1\u9001\u6D88\u606F\u6216\u4F7F\u7528 /session \u7ED1\u5B9A\u4F1A\u8BDD\u3002"));try{let I=t?.workspaceSession?.(c);if(typeof I?.readHistory!="function")return wc(w("\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\u3002"));let d=AbortSignal.timeout(s1),B=e?AbortSignal.any([e,d]):d,f=Date.now()+s1,Q=new Map,y,m,_=[],T=!1;for(let R=0;R=f)throw new DOMException("History read timed out","TimeoutError");let L=await I.readHistory({maxMessages:sEe,...y===void 0?{}:{beforeSeq:y},timeoutMs:Math.max(1,f-Date.now()),signal:B});if(B.throwIfAborted(),Date.now()>=f)throw new DOMException("History read timed out","TimeoutError");if(o.sessionFor(a)!==c){let z=new Error("Session binding changed during history read");throw z.code="session-binding-changed",z}if(!L||!Array.isArray(L.events)||typeof L.hasMore!="boolean")throw new TypeError("Invalid history page");let U=y??1/0;for(let z of L.events){let J=z?.event;if(!J||!Number.isSafeInteger(J.seq)||J.seq<0||typeof J.type!="string"||!J.type)throw new TypeError("Invalid history event");if(m!==void 0&&J.seq>m)continue;let K=Q.get(J.seq);if(K){if(!aEe(K,J))throw new TypeError("Conflicting history events")}else{if(y!==void 0&&J.seq>=y)throw new TypeError("Invalid history cursor");Q.set(J.seq,J)}U=Math.min(U,J.seq)}let F=[...Q.values()].sort((z,J)=>z.seq-J.seq);if(m??=F.at(-1)?.seq,T=L.hasMore,T&&(!Number.isFinite(U)||U===y))throw new TypeError("History cursor did not advance");if(_=cEe(F).slice(-g),_.length>=g||!T)break;y=U}return _.length===0?wc(T?w("\u672C\u6B21\u6709\u9650\u8BFB\u53D6\u4E2D\u672A\u627E\u5230\u53EF\u9884\u89C8\u7684\u5386\u53F2\u6D88\u606F\u3002"):w("\u5F53\u524D\u4F1A\u8BDD\u6682\u65E0\u53EF\u9884\u89C8\u7684\u5386\u53F2\u6D88\u606F\u3002")):lEe(c,_,g,T)}catch(I){return wc(dEe(I))}}var ZQ={name:"dsh-im-ops",version:"4.9.1-ops.19",description:"Ops fork of dsh-im (all channels kept). Based on @xmanrui/dsh-im@4.9.1 \u2014 access/session policies owned here.",keywords:["deepseek-harness","dsh","dsh-plugin","ai-agent","im","instant-messaging","chatbot","feishu","lark","wechat","wecom","dingtalk","qq","slack","telegram","discord","whatsapp","ai-office","ops","fork"],author:"xmanrui (https://github.com/xmanrui)",contributors:[{name:"C3H3-AI",url:"https://github.com/C3H3-AI"},{name:"divingleee",url:"https://github.com/divingleee"},{name:"Chan-0312",url:"https://github.com/Chan-0312"}],license:"MIT",type:"module",repository:{type:"git",url:"git+https://github.com/hansjone/dsh-im-ops.git"},homepage:"https://github.com/hansjone/dsh-im-ops#readme",bugs:{url:"https://github.com/hansjone/dsh-im-ops/issues"},bin:{"dsh-im":"bin/dsh-im.mjs"},main:"./lib/index.js",exports:{".":"./lib/index.js","./client":"./lib/client.js","./package.json":"./package.json"},files:["assets","bin","cordis.patch.yml","lib","plugin-src","scripts","src","PROACTIVE_DELIVERY.md","PROACTIVE_DELIVERY.en.md","LICENSE","README.md","README.en.md","THIRD_PARTY_NOTICES.md"],dsh:{bundle:{patch:"./cordis.patch.yml"},client:{inject:["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-ui-slots","@deepseek-ai/dsh-client-locale"],platform:"web"}},scripts:{build:"node plugin-src/client/build.mjs && node plugin-src/host/build.mjs",test:"node --test test/*.test.mjs test/channels/*/*.test.mjs",check:"npm run build && npm test && node scripts/verify-package.mjs"},engines:{node:">=22.19"},dependencies:{"@tencent-connect/qqbot-connector":"1.2.0","@tencent-connect/qqbot-nodejs":"1.0.4","@wecom/aibot-node-sdk":"1.0.7","dingtalk-stream":"2.1.4",qrcode:"1.5.4",undici:"7.29.0"},devDependencies:{"@deepseek-ai/cordis":"4.0.1","@larksuiteoapi/node-sdk":"1.73.0","@whiskeysockets/baileys":"7.0.0-rc14",esbuild:"0.25.9","https-proxy-agent":"5.0.1",react:"18.3.1","react-dom":"18.3.1","react-test-renderer":"18.3.1",semver:"7.8.5"},directories:{doc:"docs",lib:"lib",test:"test"}};var hEe=/^\/(?:stop|steer|version)(?=$|\s)/iu,EEe=/^\/stop(?=$|\s)/iu,uEe=/^\/version(?=$|\s)/iu,CEe="\u7528\u6CD5\uFF1A/stop\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",BEe="\u7528\u6CD5\uFF1A/version\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",fEe="\u7528\u6CD5\uFF1A/steer <\u8865\u5145\u6307\u4EE4>",QEe="\u63A7\u5236\u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u540E\u91CD\u8BD5\u3002";function Go(n,t={}){return{message:n,...t}}function I1(n){return n?{signal:n}:{}}function l1(n,t,o){if(typeof t?.sessionFor!="function")return null;let a=t.sessionFor(o);if(typeof a!="string"||!a)return null;if(typeof n?.workspaceSession!="function")throw new TypeError("Harness does not support workspace sessions");let e=n.workspaceSession(a);if(!e||typeof e!="object")throw new TypeError("Harness returned an invalid workspace session");return e}function pa(n){return typeof n=="string"&&hEe.test(n.trim())}async function Pa(n,t,o,a,{signal:e,hasImages:i=!1,pendingInteraction:A=!1,control:r}={}){if(!pa(n))return null;let s=n.trim(),g=EEe.test(s),c=uEe.test(s);if(i)return Go(w(QEe));if(c)return/^\/version$/iu.test(s)?Go(`dsh-im v${ZQ.version}`):Go(w(BEe));if(g){if(!/^\/stop$/iu.test(s))return Go(w(CEe));let Q=l1(t,o,a);if(!Q)return Go(w("\u5F53\u524D\u804A\u5929\u6CA1\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u3002"));if(typeof Q.stopActiveTurn!="function")throw new TypeError("Harness session does not support stopping active turns");return await Q.stopActiveTurn(r,I1(e))?Go(w("\u5DF2\u8BF7\u6C42\u505C\u6B62\u5F53\u524D\u4EFB\u52A1\u3002"),{stopped:!0}):Go(w("\u5F53\u524D\u804A\u5929\u6CA1\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u3002"))}let d=/^\/steer(?:\s+([\s\S]*))?$/iu.exec(s)?.[1]?.trim()??"";if(!d)return Go(w(fEe));if(A)return Go([w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u4F60\u7684\u56DE\u7B54\u6216\u5BA1\u6279\u3002"),"",w("\u8BF7\u5148\u5904\u7406\u5F53\u524D\u8BF7\u6C42\uFF0C\u6216\u8005\u53D1\u9001 /stop \u505C\u6B62\u4EFB\u52A1\u3002")].join(` -`));let B=l1(t,o,a);if(!B)return Go(w("\u5F53\u524D\u804A\u5929\u6CA1\u6709\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u65E0\u6CD5\u8865\u5145\u6307\u4EE4\u3002\u8BF7\u5148\u7ED1\u5B9A\u4F1A\u8BDD\u3002"));if(typeof B.steerActiveTurn!="function")throw new TypeError("Harness session does not support steering active turns");let f=await B.steerActiveTurn(d,r,I1(e));return Go(f?w("\u5DF2\u63D0\u4EA4\u8865\u5145\u6307\u4EE4\uFF0CAgent \u4F1A\u5728\u4E0B\u4E00\u6B65\u8BFB\u53D6\u3002"):w("\u4EFB\u52A1\u5DF2\u7ED3\u675F\uFF0C\u6CA1\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\uFF0C\u65E0\u6CD5\u8865\u5145\u6307\u4EE4\u3002\u8BF7\u76F4\u63A5\u53D1\u9001\u6D88\u606F\u5F00\u59CB\u65B0\u4EFB\u52A1\u3002"))}var yEe=/^\/model(?=$|\s)/i,Q1=/^\/models(?=$|\s)/i,y1=/^\/reasoning(?=$|\s)/i,m1=/^\/reasonings(?=$|\s)/i,S1=/^\/reasoninglist(?=$|\s)/i,d1="\u7528\u6CD5\uFF1A/model <\u5E8F\u53F7\u6216 provider/model> [\u63A8\u7406\u7B49\u7EA7ID]",mEe="\u7528\u6CD5\uFF1A/models\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",SEe="\u7528\u6CD5\uFF1A/reasoning [\u5E8F\u53F7\u3001\u7B49\u7EA7ID\u6216 --default]",wEe="\u7528\u6CD5\uFF1A/reasoninglist \u6216 /reasonings\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",w1="session-binding-changed",D1="model-selection-mismatch",DEe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+/gu;function Ct(n){return{handled:!0,message:n,messages:Cg(n)}}function oi(n){return typeof n!="string"?"":n.replace(DEe," ").replace(/\s+/gu," ").trim()}function OEe(n){return n?{signal:n}:{}}function bEe(n){if(n===void 0)return;if(!n||typeof n!="object"||!Array.isArray(n.efforts)||n.efforts.length===0)throw new TypeError("Harness returned invalid model reasoning metadata");let t=n.efforts.map(o=>{if(!o||typeof o!="object"||typeof o.id!="string"||!o.id||typeof o.name!="string"||!o.name||o.description!==void 0&&typeof o.description!="string")throw new TypeError("Harness returned an invalid reasoning effort");return{id:o.id,name:o.name,...o.description===void 0?{}:{description:o.description}}});if(n.defaultEffort!==void 0&&(typeof n.defaultEffort!="string"||!n.defaultEffort))throw new TypeError("Harness returned an invalid default reasoning effort");return{efforts:t,...n.defaultEffort===void 0?{}:{defaultEffort:n.defaultEffort}}}function O1(n,{requireCurrent:t=!1}={}){if(!n||typeof n!="object"||!Array.isArray(n.groups)||!Array.isArray(n.failures))throw new TypeError("Harness returned an invalid model catalog");let o=n.groups.map(i=>{if(!i||typeof i!="object"||typeof i.id!="string"||!i.id||typeof i.name!="string"||!i.name||!Array.isArray(i.models))throw new TypeError("Harness returned an invalid model provider group");return{id:i.id,name:i.name,models:i.models.map(A=>{if(!A||typeof A!="object"||typeof A.id!="string"||!A.id||typeof A.name!="string"||!A.name||A.description!==void 0&&typeof A.description!="string")throw new TypeError("Harness returned an invalid model");return{id:A.id,name:A.name,...A.description===void 0?{}:{description:A.description},...A.reasoning===void 0?{}:{reasoning:bEe(A.reasoning)}}})}}),a=n.failures.map(i=>{if(!i||typeof i!="object"||typeof i.id!="string"||!i.id||typeof i.name!="string"||!i.name)throw new TypeError("Harness returned an invalid model provider failure");return{id:i.id,name:i.name}}),e=null;if(n.current!==void 0){if(!n.current||typeof n.current!="object"||typeof n.current.provider!="string"||!n.current.provider||typeof n.current.model!="string"||!n.current.model||n.current.reasoningEffort!==void 0&&(typeof n.current.reasoningEffort!="string"||!n.current.reasoningEffort))throw new TypeError("Harness returned an invalid current model");e={provider:n.current.provider,model:n.current.model,...n.current.reasoningEffort===void 0?{}:{reasoningEffort:n.current.reasoningEffort}}}else if(t)throw new TypeError("Harness returned no current model");return{groups:o,failures:a,current:e}}function Bg(n,t){return`${n}/${t}`}function b1(n,t){return n?.provider===t?.provider&&n?.model===t?.model}function MEe(n,t){return b1(n,t)&&n?.reasoningEffort===t?.reasoningEffort}function _Ee(n,t){return b1(n,t)&&(t.reasoningEffort===void 0||n?.reasoningEffort===t.reasoningEffort)}function rT(n){if(!n?.provider||!n?.model)return"";let t=Bg(n.provider,n.model);return n.reasoningEffort===void 0?t:`${t} \xB7 reasoningEffort=${oi(n.reasoningEffort)}`}function p1(n,t,o){let a=new Error(`Harness ${o} did not confirm the selected model`);return a.code=D1,a.expected=n,a.actual=t,a.source=o,a}function M1(){let n=new Error("Conversation binding changed during model selection");return n.code=w1,n}function h1(n,t,o){if((typeof n?.sessionFor=="function"?n.sessionFor(t):null)!==o)throw M1()}function TEe(n,t){for(let o of n.groups)for(let a of o.models)if(Bg(o.id,a.id)===t)return{provider:o.id,model:a.id};return null}function NEe(n,t){let o=0;for(let a of n.groups)for(let e of a.models)if(o+=1,o===t)return{provider:a.id,model:e.id};return null}function E1(n){if(!/^\d+$/u.test(n))return null;let t=Number(n);return{index:Number.isSafeInteger(t)&&t>0?t:null}}function XQ(n,t){return t?n.groups.find(({id:a})=>a===t.provider)?.models.find(({id:a})=>a===t.model)??null:null}function REe(n,t){return n?.reasoning?.efforts?.[t-1]??null}function iT(n,t){return n?.reasoning?.efforts?.find(({id:o})=>o===t)??null}function $Q(n,t){return n?.reasoningEffort??t?.reasoning?.defaultEffort}function lu(n,t){if(t===void 0)return w("Default\uFF08\u7531\u6A21\u578B\u6216 Provider \u51B3\u5B9A\uFF09");let o=iT(n,t);if(!o)return oi(t);let a=oi(o.name),e=oi(o.id);return a===e?e:`${a} (${e})`}function _1(n){let t=XQ(n,n.current);return lu(t,$Q(n.current,t))}function kEe(n,t,o){return n===t&&n===o?w("\uFF08\u5F53\u524D\u3001\u9ED8\u8BA4\uFF09"):n===t?w("\uFF08\u5F53\u524D\uFF09"):n===o?w("\uFF08\u9ED8\u8BA4\uFF09"):""}function u1(n){return[w("\u6A21\u578B\u5E8F\u53F7\u65E0\u6548\uFF1A{input}",{input:oi(n)}),"",w("\u8BF7\u53D1\u9001 /models \u67E5\u770B\u5E76\u8F93\u5165\u6709\u6548\u7684\u6B63\u6574\u6570\u5E8F\u53F7\u3002")].join(` +`)),s=Math.floor(s/2)}while(s>0&&(g.message.length>3e3||g.messages.length>3));return g}function EEe(n){let t=n?.code??n?.failure?.code;return t==="session-not-found"?w("\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u7ED1\u5B9A\u4F1A\u8BDD\u3002"):t===Mi||t==="workspace-bot-not-found"||t==="session-binding-changed"?w("\u4F1A\u8BDD\u3001\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C /history\u3002"):t==="harness-api-not-found"?w("\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\u3002"):n?.name==="AbortError"?w("\u5386\u53F2\u8BFB\u53D6\u5DF2\u53D6\u6D88\u3002"):n?.name==="TimeoutError"||t==="harness-timeout"?w("\u8BFB\u53D6\u5386\u53F2\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):w("\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}function ji(n){return typeof n=="string"&&g1.test(n.trim())}async function go(n,t,o,a,{signal:e,isDirect:i=!1,hasImages:A=!1,hasFiles:r=!1}={}){if(!ji(n))return null;let s=g1.exec(n.trim())[1].trim();if(s&&(!/^\d+$/u.test(s)||/^0+$/u.test(s)))return Dc(w(gEe));let g=s?Math.min(Number(s),cEe):3;if(!i)return Dc(w("\u8BF7\u5728\u4E0E\u673A\u5668\u4EBA\u7684\u79C1\u804A\u4E2D\u4F7F\u7528 /history\u3002"));if(A||r)return Dc(w("/history \u4EC5\u652F\u6301\u6587\u5B57\u547D\u4EE4\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u6216\u6587\u4EF6\u540E\u91CD\u8BD5\u3002"));let c=o?.sessionFor?.(a);if(typeof c!="string"||!c)return Dc(w("\u5F53\u524D\u804A\u5929\u5C1A\u672A\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u53D1\u9001\u6D88\u606F\u6216\u4F7F\u7528 /session \u7ED1\u5B9A\u4F1A\u8BDD\u3002"));try{let I=t?.workspaceSession?.(c);if(typeof I?.readHistory!="function")return Dc(w("\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\u3002"));let d=AbortSignal.timeout(s1),B=e?AbortSignal.any([e,d]):d,f=Date.now()+s1,Q=new Map,y,m,_=[],T=!1;for(let R=0;R=f)throw new DOMException("History read timed out","TimeoutError");let L=await I.readHistory({maxMessages:IEe,...y===void 0?{}:{beforeSeq:y},timeoutMs:Math.max(1,f-Date.now()),signal:B});if(B.throwIfAborted(),Date.now()>=f)throw new DOMException("History read timed out","TimeoutError");if(o.sessionFor(a)!==c){let J=new Error("Session binding changed during history read");throw J.code="session-binding-changed",J}if(!L||!Array.isArray(L.events)||typeof L.hasMore!="boolean")throw new TypeError("Invalid history page");let U=y??1/0;for(let J of L.events){let V=J?.event;if(!V||!Number.isSafeInteger(V.seq)||V.seq<0||typeof V.type!="string"||!V.type)throw new TypeError("Invalid history event");if(m!==void 0&&V.seq>m)continue;let H=Q.get(V.seq);if(H){if(!sEe(H,V))throw new TypeError("Conflicting history events")}else{if(y!==void 0&&V.seq>=y)throw new TypeError("Invalid history cursor");Q.set(V.seq,V)}U=Math.min(U,V.seq)}let F=[...Q.values()].sort((J,V)=>J.seq-V.seq);if(m??=F.at(-1)?.seq,T=L.hasMore,T&&(!Number.isFinite(U)||U===y))throw new TypeError("History cursor did not advance");if(_=dEe(F).slice(-g),_.length>=g||!T)break;y=U}return _.length===0?Dc(T?w("\u672C\u6B21\u6709\u9650\u8BFB\u53D6\u4E2D\u672A\u627E\u5230\u53EF\u9884\u89C8\u7684\u5386\u53F2\u6D88\u606F\u3002"):w("\u5F53\u524D\u4F1A\u8BDD\u6682\u65E0\u53EF\u9884\u89C8\u7684\u5386\u53F2\u6D88\u606F\u3002")):hEe(c,_,g,T)}catch(I){return Dc(EEe(I))}}var XQ={name:"dsh-im-ops",version:"4.9.1-ops.20",description:"Ops fork of dsh-im (all channels kept). Based on @xmanrui/dsh-im@4.9.1 \u2014 access/session policies owned here.",keywords:["deepseek-harness","dsh","dsh-plugin","ai-agent","im","instant-messaging","chatbot","feishu","lark","wechat","wecom","dingtalk","qq","slack","telegram","discord","whatsapp","ai-office","ops","fork"],author:"xmanrui (https://github.com/xmanrui)",contributors:[{name:"C3H3-AI",url:"https://github.com/C3H3-AI"},{name:"divingleee",url:"https://github.com/divingleee"},{name:"Chan-0312",url:"https://github.com/Chan-0312"}],license:"MIT",type:"module",repository:{type:"git",url:"git+https://github.com/hansjone/dsh-im-ops.git"},homepage:"https://github.com/hansjone/dsh-im-ops#readme",bugs:{url:"https://github.com/hansjone/dsh-im-ops/issues"},bin:{"dsh-im":"bin/dsh-im.mjs"},main:"./lib/index.js",exports:{".":"./lib/index.js","./client":"./lib/client.js","./package.json":"./package.json"},files:["assets","bin","cordis.patch.yml","lib","plugin-src","scripts","src","PROACTIVE_DELIVERY.md","PROACTIVE_DELIVERY.en.md","LICENSE","README.md","README.en.md","THIRD_PARTY_NOTICES.md"],dsh:{bundle:{patch:"./cordis.patch.yml"},client:{inject:["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-ui-slots","@deepseek-ai/dsh-client-locale"],platform:"web"}},scripts:{build:"node plugin-src/client/build.mjs && node plugin-src/host/build.mjs",test:"node --test test/*.test.mjs test/channels/*/*.test.mjs",check:"npm run build && npm test && node scripts/verify-package.mjs"},engines:{node:">=22.19"},dependencies:{"@tencent-connect/qqbot-connector":"1.2.0","@tencent-connect/qqbot-nodejs":"1.0.4","@wecom/aibot-node-sdk":"1.0.7","dingtalk-stream":"2.1.4",qrcode:"1.5.4",undici:"7.29.0"},devDependencies:{"@deepseek-ai/cordis":"4.0.1","@larksuiteoapi/node-sdk":"1.73.0","@whiskeysockets/baileys":"7.0.0-rc14",esbuild:"0.25.9","https-proxy-agent":"5.0.1",react:"18.3.1","react-dom":"18.3.1","react-test-renderer":"18.3.1",semver:"7.8.5"},directories:{doc:"docs",lib:"lib",test:"test"}};var CEe=/^\/(?:stop|steer|version)(?=$|\s)/iu,BEe=/^\/stop(?=$|\s)/iu,fEe=/^\/version(?=$|\s)/iu,QEe="\u7528\u6CD5\uFF1A/stop\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",yEe="\u7528\u6CD5\uFF1A/version\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",mEe="\u7528\u6CD5\uFF1A/steer <\u8865\u5145\u6307\u4EE4>",SEe="\u63A7\u5236\u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u540E\u91CD\u8BD5\u3002";function Go(n,t={}){return{message:n,...t}}function I1(n){return n?{signal:n}:{}}function l1(n,t,o){if(typeof t?.sessionFor!="function")return null;let a=t.sessionFor(o);if(typeof a!="string"||!a)return null;if(typeof n?.workspaceSession!="function")throw new TypeError("Harness does not support workspace sessions");let e=n.workspaceSession(a);if(!e||typeof e!="object")throw new TypeError("Harness returned an invalid workspace session");return e}function ha(n){return typeof n=="string"&&CEe.test(n.trim())}async function Pa(n,t,o,a,{signal:e,hasImages:i=!1,pendingInteraction:A=!1,control:r}={}){if(!ha(n))return null;let s=n.trim(),g=BEe.test(s),c=fEe.test(s);if(i)return Go(w(SEe));if(c)return/^\/version$/iu.test(s)?Go(`dsh-im v${XQ.version}`):Go(w(yEe));if(g){if(!/^\/stop$/iu.test(s))return Go(w(QEe));let Q=l1(t,o,a);if(!Q)return Go(w("\u5F53\u524D\u804A\u5929\u6CA1\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u3002"));if(typeof Q.stopActiveTurn!="function")throw new TypeError("Harness session does not support stopping active turns");return await Q.stopActiveTurn(r,I1(e))?Go(w("\u5DF2\u8BF7\u6C42\u505C\u6B62\u5F53\u524D\u4EFB\u52A1\u3002"),{stopped:!0}):Go(w("\u5F53\u524D\u804A\u5929\u6CA1\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u3002"))}let d=/^\/steer(?:\s+([\s\S]*))?$/iu.exec(s)?.[1]?.trim()??"";if(!d)return Go(w(mEe));if(A)return Go([w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u4F60\u7684\u56DE\u7B54\u6216\u5BA1\u6279\u3002"),"",w("\u8BF7\u5148\u5904\u7406\u5F53\u524D\u8BF7\u6C42\uFF0C\u6216\u8005\u53D1\u9001 /stop \u505C\u6B62\u4EFB\u52A1\u3002")].join(` +`));let B=l1(t,o,a);if(!B)return Go(w("\u5F53\u524D\u804A\u5929\u6CA1\u6709\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u65E0\u6CD5\u8865\u5145\u6307\u4EE4\u3002\u8BF7\u5148\u7ED1\u5B9A\u4F1A\u8BDD\u3002"));if(typeof B.steerActiveTurn!="function")throw new TypeError("Harness session does not support steering active turns");let f=await B.steerActiveTurn(d,r,I1(e));return Go(f?w("\u5DF2\u63D0\u4EA4\u8865\u5145\u6307\u4EE4\uFF0CAgent \u4F1A\u5728\u4E0B\u4E00\u6B65\u8BFB\u53D6\u3002"):w("\u4EFB\u52A1\u5DF2\u7ED3\u675F\uFF0C\u6CA1\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\uFF0C\u65E0\u6CD5\u8865\u5145\u6307\u4EE4\u3002\u8BF7\u76F4\u63A5\u53D1\u9001\u6D88\u606F\u5F00\u59CB\u65B0\u4EFB\u52A1\u3002"))}var wEe=/^\/model(?=$|\s)/i,Q1=/^\/models(?=$|\s)/i,y1=/^\/reasoning(?=$|\s)/i,m1=/^\/reasonings(?=$|\s)/i,S1=/^\/reasoninglist(?=$|\s)/i,d1="\u7528\u6CD5\uFF1A/model <\u5E8F\u53F7\u6216 provider/model> [\u63A8\u7406\u7B49\u7EA7ID]",DEe="\u7528\u6CD5\uFF1A/models\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",OEe="\u7528\u6CD5\uFF1A/reasoning [\u5E8F\u53F7\u3001\u7B49\u7EA7ID\u6216 --default]",bEe="\u7528\u6CD5\uFF1A/reasoninglist \u6216 /reasonings\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",w1="session-binding-changed",D1="model-selection-mismatch",MEe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+/gu;function Ct(n){return{handled:!0,message:n,messages:Cg(n)}}function oi(n){return typeof n!="string"?"":n.replace(MEe," ").replace(/\s+/gu," ").trim()}function _Ee(n){return n?{signal:n}:{}}function TEe(n){if(n===void 0)return;if(!n||typeof n!="object"||!Array.isArray(n.efforts)||n.efforts.length===0)throw new TypeError("Harness returned invalid model reasoning metadata");let t=n.efforts.map(o=>{if(!o||typeof o!="object"||typeof o.id!="string"||!o.id||typeof o.name!="string"||!o.name||o.description!==void 0&&typeof o.description!="string")throw new TypeError("Harness returned an invalid reasoning effort");return{id:o.id,name:o.name,...o.description===void 0?{}:{description:o.description}}});if(n.defaultEffort!==void 0&&(typeof n.defaultEffort!="string"||!n.defaultEffort))throw new TypeError("Harness returned an invalid default reasoning effort");return{efforts:t,...n.defaultEffort===void 0?{}:{defaultEffort:n.defaultEffort}}}function O1(n,{requireCurrent:t=!1}={}){if(!n||typeof n!="object"||!Array.isArray(n.groups)||!Array.isArray(n.failures))throw new TypeError("Harness returned an invalid model catalog");let o=n.groups.map(i=>{if(!i||typeof i!="object"||typeof i.id!="string"||!i.id||typeof i.name!="string"||!i.name||!Array.isArray(i.models))throw new TypeError("Harness returned an invalid model provider group");return{id:i.id,name:i.name,models:i.models.map(A=>{if(!A||typeof A!="object"||typeof A.id!="string"||!A.id||typeof A.name!="string"||!A.name||A.description!==void 0&&typeof A.description!="string")throw new TypeError("Harness returned an invalid model");return{id:A.id,name:A.name,...A.description===void 0?{}:{description:A.description},...A.reasoning===void 0?{}:{reasoning:TEe(A.reasoning)}}})}}),a=n.failures.map(i=>{if(!i||typeof i!="object"||typeof i.id!="string"||!i.id||typeof i.name!="string"||!i.name)throw new TypeError("Harness returned an invalid model provider failure");return{id:i.id,name:i.name}}),e=null;if(n.current!==void 0){if(!n.current||typeof n.current!="object"||typeof n.current.provider!="string"||!n.current.provider||typeof n.current.model!="string"||!n.current.model||n.current.reasoningEffort!==void 0&&(typeof n.current.reasoningEffort!="string"||!n.current.reasoningEffort))throw new TypeError("Harness returned an invalid current model");e={provider:n.current.provider,model:n.current.model,...n.current.reasoningEffort===void 0?{}:{reasoningEffort:n.current.reasoningEffort}}}else if(t)throw new TypeError("Harness returned no current model");return{groups:o,failures:a,current:e}}function Bg(n,t){return`${n}/${t}`}function b1(n,t){return n?.provider===t?.provider&&n?.model===t?.model}function NEe(n,t){return b1(n,t)&&n?.reasoningEffort===t?.reasoningEffort}function REe(n,t){return b1(n,t)&&(t.reasoningEffort===void 0||n?.reasoningEffort===t.reasoningEffort)}function rT(n){if(!n?.provider||!n?.model)return"";let t=Bg(n.provider,n.model);return n.reasoningEffort===void 0?t:`${t} \xB7 reasoningEffort=${oi(n.reasoningEffort)}`}function p1(n,t,o){let a=new Error(`Harness ${o} did not confirm the selected model`);return a.code=D1,a.expected=n,a.actual=t,a.source=o,a}function M1(){let n=new Error("Conversation binding changed during model selection");return n.code=w1,n}function h1(n,t,o){if((typeof n?.sessionFor=="function"?n.sessionFor(t):null)!==o)throw M1()}function kEe(n,t){for(let o of n.groups)for(let a of o.models)if(Bg(o.id,a.id)===t)return{provider:o.id,model:a.id};return null}function vEe(n,t){let o=0;for(let a of n.groups)for(let e of a.models)if(o+=1,o===t)return{provider:a.id,model:e.id};return null}function E1(n){if(!/^\d+$/u.test(n))return null;let t=Number(n);return{index:Number.isSafeInteger(t)&&t>0?t:null}}function $Q(n,t){return t?n.groups.find(({id:a})=>a===t.provider)?.models.find(({id:a})=>a===t.model)??null:null}function PEe(n,t){return n?.reasoning?.efforts?.[t-1]??null}function iT(n,t){return n?.reasoning?.efforts?.find(({id:o})=>o===t)??null}function ey(n,t){return n?.reasoningEffort??t?.reasoning?.defaultEffort}function lu(n,t){if(t===void 0)return w("Default\uFF08\u7531\u6A21\u578B\u6216 Provider \u51B3\u5B9A\uFF09");let o=iT(n,t);if(!o)return oi(t);let a=oi(o.name),e=oi(o.id);return a===e?e:`${a} (${e})`}function _1(n){let t=$Q(n,n.current);return lu(t,ey(n.current,t))}function GEe(n,t,o){return n===t&&n===o?w("\uFF08\u5F53\u524D\u3001\u9ED8\u8BA4\uFF09"):n===t?w("\uFF08\u5F53\u524D\uFF09"):n===o?w("\uFF08\u9ED8\u8BA4\uFF09"):""}function u1(n){return[w("\u6A21\u578B\u5E8F\u53F7\u65E0\u6548\uFF1A{input}",{input:oi(n)}),"",w("\u8BF7\u53D1\u9001 /models \u67E5\u770B\u5E76\u8F93\u5165\u6709\u6548\u7684\u6B63\u6574\u6570\u5E8F\u53F7\u3002")].join(` `)}function C1(n){return[w("\u63A8\u7406\u7B49\u7EA7\u5E8F\u53F7\u65E0\u6548\uFF1A{input}",{input:oi(n)}),"",w("\u8BF7\u53D1\u9001 /reasoninglist \u67E5\u770B\u5E76\u8F93\u5165\u6709\u6548\u7684\u6B63\u6574\u6570\u5E8F\u53F7\u3002")].join(` `)}function eT(n,t,o){let a=[w("\u6A21\u578B\u4E0D\u652F\u6301\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:oi(t)}),"",oi(rT(n))],e=o?.reasoning?.efforts?.map(({id:i})=>oi(i))??[];return e.length>0?a.push(w("\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A{efforts}",{efforts:e.join(", ")})):a.push(w("\u8BE5\u6A21\u578B\u4E0D\u63D0\u4F9B\u53EF\u5207\u6362\u7684\u63A8\u7406\u7B49\u7EA7\u3002")),a.join(` -`)}function vEe(n){let t=n.current?Bg(n.current.provider,n.current.model):null,o=[w("\u53EF\u7528\u6A21\u578B\uFF1A")],a=0;n.groups.length===0&&o.push("",w("\u5F53\u524D\u6CA1\u6709\u53EF\u7528\u6A21\u578B\u3002"));for(let e of n.groups){o.push("",oi(e.name)||oi(e.id));for(let i of e.models){a+=1;let A=Bg(e.id,i.id);o.push(`${a}. ${oi(A)}${A===t?w("\uFF08\u5F53\u524D\uFF09"):""}`)}}if(n.failures.length>0){o.push("",w("\u4EE5\u4E0B\u6A21\u578B\u63D0\u4F9B\u65B9\u6682\u65F6\u4E0D\u53EF\u7528\uFF1A"));for(let e of n.failures)o.push(`- ${oi(e.name)||oi(e.id)}`)}return a>0&&o.push("",w("\u5207\u6362\u6A21\u578B\uFF1A/model <\u5E8F\u53F7> [\u63A8\u7406\u7B49\u7EA7ID]")),o.join(` -`)}function PEe(n){return[w("\u5F53\u524D\u6A21\u578B\uFF1A"),Bg(n.current.provider,n.current.model),w("\u5F53\u524D\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:_1(n)}),"",w("\u67E5\u770B\u5168\u90E8\u6A21\u578B\uFF1A/models"),w("\u67E5\u770B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoninglist"),w("\u5207\u6362\u6A21\u578B\uFF1A/model <\u5E8F\u53F7> [\u63A8\u7406\u7B49\u7EA7ID]")].join(` -`)}function GEe(n){return[w("\u5F53\u524D\u6A21\u578B\uFF1A"),Bg(n.current.provider,n.current.model),w("\u5F53\u524D\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:_1(n)}),"",w("\u67E5\u770B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoninglist"),w("\u5207\u6362\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoning <\u5E8F\u53F7\u6216\u7B49\u7EA7ID>"),w("\u6062\u590D\u9ED8\u8BA4\u7B49\u7EA7\uFF1A/reasoning --default")].join(` -`)}function FEe(n){let t=n.current,o=XQ(n,t),a=$Q(t,o),e=[w("\u5F53\u524D\u6A21\u578B\uFF1A"),Bg(t.provider,t.model),w("\u5F53\u524D\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:lu(o,a)}),"",w("\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A")];if(!o?.reasoning)return e.push(w("\u8BE5\u6A21\u578B\u4E0D\u63D0\u4F9B\u53EF\u5207\u6362\u7684\u63A8\u7406\u7B49\u7EA7\u3002"),"",w("\u6062\u590D\u9ED8\u8BA4\u7B49\u7EA7\uFF1A/reasoning --default")),e.join(` -`);for(let[i,A]of o.reasoning.efforts.entries()){let r=lu(o,A.id),s=kEe(A.id,a,o.reasoning.defaultEffort);e.push(`${i+1}. ${r}${s}`);let g=oi(A.description);g&&e.push(` ${g}`)}return e.push("",w("\u5207\u6362\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoning <\u5E8F\u53F7\u6216\u7B49\u7EA7ID>"),w("\u6062\u590D\u9ED8\u8BA4\u7B49\u7EA7\uFF1A/reasoning --default")),e.join(` -`)}function LEe(){return[w("\u5F53\u524D\u804A\u5929\u8FD8\u6CA1\u6709\u4F1A\u8BDD\u3002"),"",w("\u67E5\u770B\u6A21\u578B\uFF1A/models"),w("\u9009\u62E9\u6A21\u578B\uFF1A/model <\u5E8F\u53F7>")].join(` +`)}function FEe(n){let t=n.current?Bg(n.current.provider,n.current.model):null,o=[w("\u53EF\u7528\u6A21\u578B\uFF1A")],a=0;n.groups.length===0&&o.push("",w("\u5F53\u524D\u6CA1\u6709\u53EF\u7528\u6A21\u578B\u3002"));for(let e of n.groups){o.push("",oi(e.name)||oi(e.id));for(let i of e.models){a+=1;let A=Bg(e.id,i.id);o.push(`${a}. ${oi(A)}${A===t?w("\uFF08\u5F53\u524D\uFF09"):""}`)}}if(n.failures.length>0){o.push("",w("\u4EE5\u4E0B\u6A21\u578B\u63D0\u4F9B\u65B9\u6682\u65F6\u4E0D\u53EF\u7528\uFF1A"));for(let e of n.failures)o.push(`- ${oi(e.name)||oi(e.id)}`)}return a>0&&o.push("",w("\u5207\u6362\u6A21\u578B\uFF1A/model <\u5E8F\u53F7> [\u63A8\u7406\u7B49\u7EA7ID]")),o.join(` +`)}function LEe(n){return[w("\u5F53\u524D\u6A21\u578B\uFF1A"),Bg(n.current.provider,n.current.model),w("\u5F53\u524D\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:_1(n)}),"",w("\u67E5\u770B\u5168\u90E8\u6A21\u578B\uFF1A/models"),w("\u67E5\u770B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoninglist"),w("\u5207\u6362\u6A21\u578B\uFF1A/model <\u5E8F\u53F7> [\u63A8\u7406\u7B49\u7EA7ID]")].join(` +`)}function UEe(n){return[w("\u5F53\u524D\u6A21\u578B\uFF1A"),Bg(n.current.provider,n.current.model),w("\u5F53\u524D\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:_1(n)}),"",w("\u67E5\u770B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoninglist"),w("\u5207\u6362\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoning <\u5E8F\u53F7\u6216\u7B49\u7EA7ID>"),w("\u6062\u590D\u9ED8\u8BA4\u7B49\u7EA7\uFF1A/reasoning --default")].join(` +`)}function HEe(n){let t=n.current,o=$Q(n,t),a=ey(t,o),e=[w("\u5F53\u524D\u6A21\u578B\uFF1A"),Bg(t.provider,t.model),w("\u5F53\u524D\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:lu(o,a)}),"",w("\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A")];if(!o?.reasoning)return e.push(w("\u8BE5\u6A21\u578B\u4E0D\u63D0\u4F9B\u53EF\u5207\u6362\u7684\u63A8\u7406\u7B49\u7EA7\u3002"),"",w("\u6062\u590D\u9ED8\u8BA4\u7B49\u7EA7\uFF1A/reasoning --default")),e.join(` +`);for(let[i,A]of o.reasoning.efforts.entries()){let r=lu(o,A.id),s=GEe(A.id,a,o.reasoning.defaultEffort);e.push(`${i+1}. ${r}${s}`);let g=oi(A.description);g&&e.push(` ${g}`)}return e.push("",w("\u5207\u6362\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoning <\u5E8F\u53F7\u6216\u7B49\u7EA7ID>"),w("\u6062\u590D\u9ED8\u8BA4\u7B49\u7EA7\uFF1A/reasoning --default")),e.join(` +`)}function KEe(){return[w("\u5F53\u524D\u804A\u5929\u8FD8\u6CA1\u6709\u4F1A\u8BDD\u3002"),"",w("\u67E5\u770B\u6A21\u578B\uFF1A/models"),w("\u9009\u62E9\u6A21\u578B\uFF1A/model <\u5E8F\u53F7>")].join(` `)}function AT(){return[w("\u5F53\u524D\u804A\u5929\u8FD8\u6CA1\u6709\u4F1A\u8BDD\u3002"),"",w("\u8BF7\u5148\u53D1\u9001\u4E00\u6761\u666E\u901A\u6D88\u606F\u521B\u5EFA\u4F1A\u8BDD\u3002")].join(` -`)}function UEe(n){return n?.code??n?.failure?.code}function zd(n,t){let o=UEe(n);if(o==="agent-busy")return w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u8BF7\u7B49\u5F85\u5B8C\u6210\u6216\u5148\u53D1\u9001 /stop\u3002");if(o==="session-not-found")return w("\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u8BD5\u3002");if(o==="model-unavailable")return t==="reasoning-select"?w("\u65E0\u6CD5\u5207\u6362\u63A8\u7406\u7B49\u7EA7\u3002\u5F53\u524D\u6A21\u578B\u6216\u63A8\u7406\u7B49\u7EA7\u4E0D\u53EF\u7528\u3002"):w("\u65E0\u6CD5\u5207\u6362\u5230\u8BE5\u6A21\u578B\u3002\u6A21\u578B\u5F53\u524D\u4E0D\u53EF\u7528\uFF0C\u6216\u4E0D\u652F\u6301\u5F53\u524D\u4F1A\u8BDD\u4E2D\u7684\u56FE\u7247\u3002");if(o===Mi||o==="workspace-bot-not-found")return w("\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002");if(o===w1)return w("\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002");if(o===D1){let a=n?.expected,e=n?.actual,i=[t==="reasoning-select"?w("\u63A8\u7406\u7B49\u7EA7\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):w("\u6A21\u578B\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")];if(a?.provider&&a?.model&&i.push("",`requested: ${oi(rT(a))}`),e?.provider&&e?.model){let A=n?.source==="models.current"?w("\u5F53\u524D\u6A21\u578B\uFF1A"):"selectModel.selected:";i.push(`${A} ${oi(rT(e))}`)}else i.push(`${n?.source??"Harness"}: unconfirmed`);return i.join(` -`)}return o==="cancelled"||n?.name==="AbortError"?t==="list"?w("\u83B7\u53D6\u6A21\u578B\u5217\u8868\u5DF2\u53D6\u6D88\u3002"):t==="reasoning-list"?w("\u83B7\u53D6\u63A8\u7406\u7B49\u7EA7\u5217\u8868\u5DF2\u53D6\u6D88\u3002"):t==="reasoning-select"?w("\u63A8\u7406\u7B49\u7EA7\u5207\u6362\u5DF2\u53D6\u6D88\u3002"):w("\u6A21\u578B\u5207\u6362\u5DF2\u53D6\u6D88\u3002"):t==="list"?w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u6A21\u578B\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="reasoning-list"?w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u63A8\u7406\u7B49\u7EA7\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="reasoning-select"?w("\u63A8\u7406\u7B49\u7EA7\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):w("\u6A21\u578B\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function Vd(n,t,o,a){if(typeof t?.sessionFor!="function")return null;let e=t.sessionFor(o);if(typeof e!="string"||!e)return null;if(typeof n?.workspaceSession!="function")throw new TypeError("Harness does not support workspace sessions");let i=n.workspaceSession(e);if(!i||typeof i.sessionExists!="function")throw new TypeError("Harness returned an invalid workspace session");return await i.sessionExists(a)?{sessionId:e,session:i}:(typeof t.clearSession=="function"&&t.sessionFor(o)===e&&await t.clearSession(o),null)}async function B1(n,t,o){if(typeof n?.isRunning!="function"||typeof n?.hasActiveTurn!="function")throw new TypeError("Harness session does not expose run state");return await n.isRunning(o)?!0:!!await n.hasActiveTurn(t,o)}async function f1(n,t){if(typeof n?.listModels!="function")throw new TypeError("Harness does not support listing models");return O1(await n.listModels(t))}async function XI(n,t){if(typeof n?.models!="function")throw new TypeError("Harness session does not support listing models");return O1(await n.models(t),{requireCurrent:!0})}async function tT(n,t,o){if(typeof n?.selectModel!="function")throw new TypeError("Harness session does not support model selection");let a=(await n.selectModel(t,o))?.selected;if(!_Ee(a,t))throw p1(t,a,"selectModel.selected");let e=(await XI(n,o)).current;if(!MEe(e,a))throw p1(a,e,"models.current");return e}function HEe(n){return Q1.test(n)}function KEe(n){return S1.test(n)||m1.test(n)}function xEe(n){return y1.test(n)}function ha(n){if(typeof n!="string")return!1;let t=n.trim();return Q1.test(t)||yEe.test(t)||S1.test(t)||m1.test(t)||y1.test(t)}async function co(n,t,o,a,e={}){if(!ha(n))return null;let i=n.trim();if(e.hasImages)return Ct(w("\u6A21\u578B\u548C\u63A8\u7406\u7B49\u7EA7\u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u540E\u91CD\u8BD5\u3002"));let A=OEe(e.signal);if(HEe(i)){if(!/^\/models[ \t]*$/iu.test(i))return Ct(w(mEe));try{let I=await Vd(t,o,a,A),d=I?await XI(I.session,A):await f1(t,A);return Ct(vEe(d))}catch(I){return Ct(zd(I,"list"))}}if(KEe(i)){if(!/^\/(?:reasoninglist|reasonings)[ \t]*$/iu.test(i))return Ct(w(wEe));try{let I=await Vd(t,o,a,A);return Ct(I?FEe(await XI(I.session,A)):AT())}catch(I){return Ct(zd(I,"reasoning-list"))}}if(xEe(i)){let I=/^\/reasoning(?:[ \t]+([^\s]+))?[ \t]*$/iu.exec(i);if(!I)return Ct(w(SEe));let d=I[1];if(!d)try{let B=await Vd(t,o,a,A);return Ct(B?GEe(await XI(B.session,A)):AT())}catch(B){return Ct(zd(B,"reasoning-list"))}if(e.pendingInteraction)return Ct([w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u4F60\u7684\u56DE\u7B54\u6216\u5BA1\u6279\u3002"),"",w("\u8BF7\u5148\u5904\u7406\u5F53\u524D\u8BF7\u6C42\uFF0C\u6216\u8005\u53D1\u9001 /stop \u505C\u6B62\u4EFB\u52A1\u3002")].join(` -`));try{return await ug(o,a,async()=>{let B=await Vd(t,o,a,A);if(!B)return Ct(AT());if(await B1(B.session,e.control,A))return Ct(w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u8BF7\u7B49\u5F85\u5B8C\u6210\u6216\u5148\u53D1\u9001 /stop\u3002"));let f=await XI(B.session,A),Q=f.current,y=XQ(f,Q),m;if(d.toLowerCase()==="--default")m=void 0;else{if(!y?.reasoning)return Ct(eT(Q,d,y));if(m=iT(y,d),!m){let R=E1(d);if(R?.index===null)return Ct(C1(d));if(!R)return Ct(eT(Q,d,y));if(m=REe(y,R.index),!m)return Ct(C1(d))}m=m.id}let _={provider:Q.provider,model:Q.model,...m===void 0?{}:{reasoningEffort:m}},T=await tT(B.session,_,A);return h1(o,a,B.sessionId),Ct(w(`\u63A8\u7406\u7B49\u7EA7\u5DF2\u5207\u6362\u4E3A\uFF1A +`)}function xEe(n){return n?.code??n?.failure?.code}function zd(n,t){let o=xEe(n);if(o==="agent-busy")return w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u8BF7\u7B49\u5F85\u5B8C\u6210\u6216\u5148\u53D1\u9001 /stop\u3002");if(o==="session-not-found")return w("\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u8BD5\u3002");if(o==="model-unavailable")return t==="reasoning-select"?w("\u65E0\u6CD5\u5207\u6362\u63A8\u7406\u7B49\u7EA7\u3002\u5F53\u524D\u6A21\u578B\u6216\u63A8\u7406\u7B49\u7EA7\u4E0D\u53EF\u7528\u3002"):w("\u65E0\u6CD5\u5207\u6362\u5230\u8BE5\u6A21\u578B\u3002\u6A21\u578B\u5F53\u524D\u4E0D\u53EF\u7528\uFF0C\u6216\u4E0D\u652F\u6301\u5F53\u524D\u4F1A\u8BDD\u4E2D\u7684\u56FE\u7247\u3002");if(o===Mi||o==="workspace-bot-not-found")return w("\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002");if(o===w1)return w("\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002");if(o===D1){let a=n?.expected,e=n?.actual,i=[t==="reasoning-select"?w("\u63A8\u7406\u7B49\u7EA7\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):w("\u6A21\u578B\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")];if(a?.provider&&a?.model&&i.push("",`requested: ${oi(rT(a))}`),e?.provider&&e?.model){let A=n?.source==="models.current"?w("\u5F53\u524D\u6A21\u578B\uFF1A"):"selectModel.selected:";i.push(`${A} ${oi(rT(e))}`)}else i.push(`${n?.source??"Harness"}: unconfirmed`);return i.join(` +`)}return o==="cancelled"||n?.name==="AbortError"?t==="list"?w("\u83B7\u53D6\u6A21\u578B\u5217\u8868\u5DF2\u53D6\u6D88\u3002"):t==="reasoning-list"?w("\u83B7\u53D6\u63A8\u7406\u7B49\u7EA7\u5217\u8868\u5DF2\u53D6\u6D88\u3002"):t==="reasoning-select"?w("\u63A8\u7406\u7B49\u7EA7\u5207\u6362\u5DF2\u53D6\u6D88\u3002"):w("\u6A21\u578B\u5207\u6362\u5DF2\u53D6\u6D88\u3002"):t==="list"?w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u6A21\u578B\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="reasoning-list"?w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u63A8\u7406\u7B49\u7EA7\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="reasoning-select"?w("\u63A8\u7406\u7B49\u7EA7\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):w("\u6A21\u578B\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function Vd(n,t,o,a){if(typeof t?.sessionFor!="function")return null;let e=t.sessionFor(o);if(typeof e!="string"||!e)return null;if(typeof n?.workspaceSession!="function")throw new TypeError("Harness does not support workspace sessions");let i=n.workspaceSession(e);if(!i||typeof i.sessionExists!="function")throw new TypeError("Harness returned an invalid workspace session");return await i.sessionExists(a)?{sessionId:e,session:i}:(typeof t.clearSession=="function"&&t.sessionFor(o)===e&&await t.clearSession(o),null)}async function B1(n,t,o){if(typeof n?.isRunning!="function"||typeof n?.hasActiveTurn!="function")throw new TypeError("Harness session does not expose run state");return await n.isRunning(o)?!0:!!await n.hasActiveTurn(t,o)}async function f1(n,t){if(typeof n?.listModels!="function")throw new TypeError("Harness does not support listing models");return O1(await n.listModels(t))}async function $I(n,t){if(typeof n?.models!="function")throw new TypeError("Harness session does not support listing models");return O1(await n.models(t),{requireCurrent:!0})}async function tT(n,t,o){if(typeof n?.selectModel!="function")throw new TypeError("Harness session does not support model selection");let a=(await n.selectModel(t,o))?.selected;if(!REe(a,t))throw p1(t,a,"selectModel.selected");let e=(await $I(n,o)).current;if(!NEe(e,a))throw p1(a,e,"models.current");return e}function YEe(n){return Q1.test(n)}function jEe(n){return S1.test(n)||m1.test(n)}function JEe(n){return y1.test(n)}function Ea(n){if(typeof n!="string")return!1;let t=n.trim();return Q1.test(t)||wEe.test(t)||S1.test(t)||m1.test(t)||y1.test(t)}async function co(n,t,o,a,e={}){if(!Ea(n))return null;let i=n.trim();if(e.hasImages)return Ct(w("\u6A21\u578B\u548C\u63A8\u7406\u7B49\u7EA7\u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u540E\u91CD\u8BD5\u3002"));let A=_Ee(e.signal);if(YEe(i)){if(!/^\/models[ \t]*$/iu.test(i))return Ct(w(DEe));try{let I=await Vd(t,o,a,A),d=I?await $I(I.session,A):await f1(t,A);return Ct(FEe(d))}catch(I){return Ct(zd(I,"list"))}}if(jEe(i)){if(!/^\/(?:reasoninglist|reasonings)[ \t]*$/iu.test(i))return Ct(w(bEe));try{let I=await Vd(t,o,a,A);return Ct(I?HEe(await $I(I.session,A)):AT())}catch(I){return Ct(zd(I,"reasoning-list"))}}if(JEe(i)){let I=/^\/reasoning(?:[ \t]+([^\s]+))?[ \t]*$/iu.exec(i);if(!I)return Ct(w(OEe));let d=I[1];if(!d)try{let B=await Vd(t,o,a,A);return Ct(B?UEe(await $I(B.session,A)):AT())}catch(B){return Ct(zd(B,"reasoning-list"))}if(e.pendingInteraction)return Ct([w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u4F60\u7684\u56DE\u7B54\u6216\u5BA1\u6279\u3002"),"",w("\u8BF7\u5148\u5904\u7406\u5F53\u524D\u8BF7\u6C42\uFF0C\u6216\u8005\u53D1\u9001 /stop \u505C\u6B62\u4EFB\u52A1\u3002")].join(` +`));try{return await ug(o,a,async()=>{let B=await Vd(t,o,a,A);if(!B)return Ct(AT());if(await B1(B.session,e.control,A))return Ct(w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u8BF7\u7B49\u5F85\u5B8C\u6210\u6216\u5148\u53D1\u9001 /stop\u3002"));let f=await $I(B.session,A),Q=f.current,y=$Q(f,Q),m;if(d.toLowerCase()==="--default")m=void 0;else{if(!y?.reasoning)return Ct(eT(Q,d,y));if(m=iT(y,d),!m){let R=E1(d);if(R?.index===null)return Ct(C1(d));if(!R)return Ct(eT(Q,d,y));if(m=PEe(y,R.index),!m)return Ct(C1(d))}m=m.id}let _={provider:Q.provider,model:Q.model,...m===void 0?{}:{reasoningEffort:m}},T=await tT(B.session,_,A);return h1(o,a,B.sessionId),Ct(w(`\u63A8\u7406\u7B49\u7EA7\u5DF2\u5207\u6362\u4E3A\uFF1A {effort} \u5F53\u524D\u6A21\u578B\uFF1A{model} -\u540E\u7EED\u6D88\u606F\u5C06\u4F7F\u7528\u8BE5\u63A8\u7406\u7B49\u7EA7\u3002`,{model:Bg(T.provider,T.model),effort:lu(y,$Q(T,y))}))})}catch(B){return Ct(zd(B,"reasoning-select"))}}let r=/^\/model(?:[ \t]+([^\s]+)(?:[ \t]+([^\s]+))?)?[ \t]*$/iu.exec(i);if(!r)return Ct(w(d1));let s=r[1],g=r[2];if(!s)try{let I=await Vd(t,o,a,A);if(!I)return Ct(LEe());let d=await XI(I.session,A);return Ct(PEe(d))}catch(I){return Ct(zd(I,"select"))}let c=E1(s);if(c?.index===null)return Ct(u1(s));if(!c&&(!s.includes("/")||s.startsWith("/")||s.endsWith("/")))return Ct(w(d1));if(e.pendingInteraction)return Ct([w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u4F60\u7684\u56DE\u7B54\u6216\u5BA1\u6279\u3002"),"",w("\u8BF7\u5148\u5904\u7406\u5F53\u524D\u8BF7\u6C42\uFF0C\u6216\u8005\u53D1\u9001 /stop \u505C\u6B62\u4EFB\u52A1\u3002")].join(` -`));try{return await ug(o,a,async()=>{let I=await Vd(t,o,a,A);if(I&&await B1(I.session,e.control,A))return Ct(w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u8BF7\u7B49\u5F85\u5B8C\u6210\u6216\u5148\u53D1\u9001 /stop\u3002"));let d=I?await XI(I.session,A):await f1(t,A),B=c?NEe(d,c.index):TEe(d,s);if(!B)return Ct(c?u1(s):[w("\u6CA1\u6709\u627E\u5230\u6A21\u578B\uFF1A{model}",{model:oi(s)}),"",w("\u8BF7\u53D1\u9001 /models \u67E5\u770B\u53EF\u7528\u6A21\u578B\u3002")].join(` -`));let f=XQ(d,B);if(g!==void 0){let y=iT(f,g);if(!y)return Ct(eT(B,g,f));B.reasoningEffort=y.id}let Q;if(I)Q=await tT(I.session,B,A),h1(o,a,I.sessionId);else{if(typeof t?.createSession!="function"||typeof t?.workspaceSession!="function"||typeof o?.sessionFor!="function"||typeof o?.setSession!="function")throw new TypeError("Harness cannot create a conversation session");let y=await t.createSession(A);if(typeof y!="string"||!y)throw new TypeError("Harness returned an invalid session id");let m=t.workspaceSession(y);Q=await tT(m,B,A);let _=o.sessionFor(a);if(typeof _=="string"&&_)throw M1();if(await o.setSession(a,y)===!1){let T=new Error("Workspace changed while binding the new session");throw T.code=Mi,T}}return Ct(w(`\u6A21\u578B\u5DF2\u5207\u6362\u4E3A\uFF1A +\u540E\u7EED\u6D88\u606F\u5C06\u4F7F\u7528\u8BE5\u63A8\u7406\u7B49\u7EA7\u3002`,{model:Bg(T.provider,T.model),effort:lu(y,ey(T,y))}))})}catch(B){return Ct(zd(B,"reasoning-select"))}}let r=/^\/model(?:[ \t]+([^\s]+)(?:[ \t]+([^\s]+))?)?[ \t]*$/iu.exec(i);if(!r)return Ct(w(d1));let s=r[1],g=r[2];if(!s)try{let I=await Vd(t,o,a,A);if(!I)return Ct(KEe());let d=await $I(I.session,A);return Ct(LEe(d))}catch(I){return Ct(zd(I,"select"))}let c=E1(s);if(c?.index===null)return Ct(u1(s));if(!c&&(!s.includes("/")||s.startsWith("/")||s.endsWith("/")))return Ct(w(d1));if(e.pendingInteraction)return Ct([w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u4F60\u7684\u56DE\u7B54\u6216\u5BA1\u6279\u3002"),"",w("\u8BF7\u5148\u5904\u7406\u5F53\u524D\u8BF7\u6C42\uFF0C\u6216\u8005\u53D1\u9001 /stop \u505C\u6B62\u4EFB\u52A1\u3002")].join(` +`));try{return await ug(o,a,async()=>{let I=await Vd(t,o,a,A);if(I&&await B1(I.session,e.control,A))return Ct(w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u8BF7\u7B49\u5F85\u5B8C\u6210\u6216\u5148\u53D1\u9001 /stop\u3002"));let d=I?await $I(I.session,A):await f1(t,A),B=c?vEe(d,c.index):kEe(d,s);if(!B)return Ct(c?u1(s):[w("\u6CA1\u6709\u627E\u5230\u6A21\u578B\uFF1A{model}",{model:oi(s)}),"",w("\u8BF7\u53D1\u9001 /models \u67E5\u770B\u53EF\u7528\u6A21\u578B\u3002")].join(` +`));let f=$Q(d,B);if(g!==void 0){let y=iT(f,g);if(!y)return Ct(eT(B,g,f));B.reasoningEffort=y.id}let Q;if(I)Q=await tT(I.session,B,A),h1(o,a,I.sessionId);else{if(typeof t?.createSession!="function"||typeof t?.workspaceSession!="function"||typeof o?.sessionFor!="function"||typeof o?.setSession!="function")throw new TypeError("Harness cannot create a conversation session");let y=await t.createSession(A);if(typeof y!="string"||!y)throw new TypeError("Harness returned an invalid session id");let m=t.workspaceSession(y);Q=await tT(m,B,A);let _=o.sessionFor(a);if(typeof _=="string"&&_)throw M1();if(await o.setSession(a,y)===!1){let T=new Error("Workspace changed while binding the new session");throw T.code=Mi,T}}return Ct(w(`\u6A21\u578B\u5DF2\u5207\u6362\u4E3A\uFF1A {model} \u63A8\u7406\u7B49\u7EA7\uFF1A{effort} -\u540E\u7EED\u6D88\u606F\u5C06\u4F7F\u7528\u8BE5\u6A21\u578B\u548C\u63A8\u7406\u7B49\u7EA7\u3002`,{model:Bg(Q.provider,Q.model),effort:lu(f,$Q(Q,f))}))})}catch(I){return Ct(zd(I,"select"))}}var aT=/^[a-z0-9][a-z0-9-]*$/,stA=Object.freeze({defaultId:"",items:Object.freeze([])});function fg(n){if(n==null||typeof n!="string")return null;let t=n.trim();return aT.test(t)?t:null}function Wd(n){if(n==null||n==="")return null;let t=fg(n);if(!t){let o=new Error(w("Agent Preset \u65E0\u6548\u3002"));throw o.code="agent-preset-invalid",o}return t}function YEe(n){if(typeof n=="string"){let a=fg(n);return a?{id:a,label:a}:null}if(!n||typeof n!="object"||n.broken!==void 0)return null;let t=fg(n.id);if(!t)return null;let o=typeof n.name=="string"&&n.name.trim()?n.name.trim().slice(0,128):typeof n.label=="string"&&n.label.trim()?n.label.trim().slice(0,128):t;return{id:t,label:o}}function ds(n){if(!n||typeof n!="object"||Array.isArray(n))return{defaultId:"",items:[]};let t=[],o=new Set;for(let a of Array.isArray(n.items)?n.items:[]){let e=YEe(a);!e||o.has(e.id)||(o.add(e.id),t.push(e))}return{defaultId:fg(n.defaultId)??"",items:t}}async function ji(n){try{let t=typeof n?.get=="function"?n.get("agentPresets"):n?.agentPresets;if(!t||typeof t.list!="function")return{defaultId:"",items:[]};let o=await t.list();return ds({defaultId:typeof t.defaultId=="string"?t.defaultId:"",items:Array.isArray(o)?o:[]})}catch{return{defaultId:"",items:[]}}}var jEe=/^\/preset(?=$|\s)/iu,R1=/^\/(?:presetlist|presets)(?=$|\s)/iu,JEe="\u7528\u6CD5\uFF1A/presetlist\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",nT=["\u7528\u6CD5\uFF1A","/preset \u67E5\u770B\u5F53\u524D\u8BBE\u7F6E","/preset <\u5E8F\u53F7> \u6309\u6700\u8FD1\u4E00\u6B21 /presetlist \u7684\u5E8F\u53F7\u9009\u62E9","/preset \u6309 Agent Preset ID \u9009\u62E9","/preset id:<\u7EAF\u6570\u5B57 ID> \u9009\u62E9\u7EAF\u6570\u5B57 ID","/preset --default \u8DDF\u968F Host \u9ED8\u8BA4"].join(` -`),qEe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+/gu,T1=new WeakMap,zEe=15*6e4,VEe=256;function On(n){return{handled:!0,message:n,messages:Cg(n)}}function WEe(n){return typeof n!="string"?"":n.replace(qEe," ").replace(/\s+/gu," ").trim()}function ZEe(n){return n?{signal:n}:{}}function k1(n){if(!n||typeof n!="object"||Array.isArray(n)||!n.agentPresetCatalog||typeof n.agentPresetCatalog!="object"||!Array.isArray(n.agentPresetCatalog.items))throw new TypeError("Harness returned invalid Agent Preset settings");let t=n.agentPreset===null?null:fg(n.agentPreset);if(n.agentPreset!==null&&t===null)throw new TypeError("Harness returned an invalid current Agent Preset");return{agentPreset:t,agentPresetCatalog:ds(n.agentPresetCatalog)}}function ey(n){let t=WEe(n.label)||n.id;return w("{label}\uFF08{id}\uFF09",{label:t,id:n.id})}function sT(n,t){return n.items.find(o=>o.id===t)??null}function XEe(n){if(!n.defaultId)return w("\u672A\u8BBE\u7F6E\u6216\u5F53\u524D\u4E0D\u53EF\u7528");let t=sT(n,n.defaultId);return t?ey(t):w("{id}\uFF08\u5F53\u524D\u4E0D\u53EF\u7528\uFF09",{id:n.defaultId})}function gT(n){let{agentPreset:t,agentPresetCatalog:o}=n;if(t===null){let e=sT(o,o.defaultId);return e?w("\u8DDF\u968F Host \u9ED8\u8BA4\uFF1A{preset}",{preset:ey(e)}):w("\u8DDF\u968F Host \u9ED8\u8BA4\uFF08Host \u9ED8\u8BA4\u5F53\u524D\u4E0D\u53EF\u7528\uFF09")}let a=sT(o,t);return a?ey(a):w("{id}\uFF08\u5DF2\u4E0D\u53EF\u7528\uFF09",{id:t})}function $Ee(n){return[w("\u5F53\u524D\u673A\u5668\u4EBA\u7528\u4E8E\u65B0\u4F1A\u8BDD\u7684 Agent Preset\uFF1A"),gT(n),"",w("\u5DF2\u6709\u4F1A\u8BDD\u4E0D\u4F1A\u53D7\u6B64\u8BBE\u7F6E\u5F71\u54CD\u3002"),w("\u67E5\u770B\u53EF\u7528\u9879\uFF1A/presetlist"),w("\u6062\u590D\u8DDF\u968F Host \u9ED8\u8BA4\uFF1A/preset --default")].join(` -`)}function eue(n){let{agentPreset:t,agentPresetCatalog:o}=n,a=[w("\u5F53\u524D\u673A\u5668\u4EBA\u7528\u4E8E\u65B0\u4F1A\u8BDD\u7684 Agent Preset\uFF1A"),gT(n),"",w("Host \u9ED8\u8BA4\uFF1A{preset}",{preset:XEe(o)}),"",w("\u53EF\u7528 Agent Preset\uFF08{count}\uFF09\uFF1A",{count:o.items.length})];return o.items.length===0?a.push(w("\u5F53\u524D\u6CA1\u6709\u53EF\u7528 Agent Preset\u3002")):o.items.forEach((e,i)=>{let A=[];e.id===o.defaultId&&A.push(w("Host \u9ED8\u8BA4")),e.id===t&&A.push(w("\u5F53\u524D\u9009\u62E9")),t===null&&e.id===o.defaultId&&A.push(w("\u5F53\u524D\u751F\u6548"));let r=A.length>0?`\uFF08${A.join("\uFF0C")}\uFF09`:"";a.push(`${i+1}. ${ey(e)}${r}`)}),a.push("",w("\u9009\u62E9\uFF1A/preset <\u5E8F\u53F7\u6216 ID>"),w("\u7EAF\u6570\u5B57 ID\uFF1A/preset id:"),w("\u6062\u590D\u8DDF\u968F Host \u9ED8\u8BA4\uFF1A/preset --default")),a.join(` -`)}function Aue(n){return[w("\u5F53\u524D\u673A\u5668\u4EBA\u7528\u4E8E\u65B0\u4F1A\u8BDD\u7684 Agent Preset \u5DF2\u8BBE\u7F6E\u4E3A\uFF1A"),gT(n),"",w("\u5DF2\u6709\u4F1A\u8BDD\u4E0D\u53D8\u3002\u82E5\u5F53\u524D\u804A\u5929\u5DF2\u6709\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u53D1\u9001 /new\uFF0C\u518D\u53D1\u9001\u666E\u901A\u6D88\u606F\uFF0C\u624D\u4F1A\u4F7F\u7528\u65B0\u8BBE\u7F6E\u521B\u5EFA\u4F1A\u8BDD\u3002")].join(` -`)}function v1(n,{create:t=!1}={}){if((typeof n!="object"||n===null)&&typeof n!="function")return null;let o=T1.get(n);return!o&&t&&(o=new Map,T1.set(n,o)),o??null}function tue(n,t){for(let[o,a]of n)a.expiresAt<=t&&n.delete(o)}function rue(n,t,o){let a=v1(n,{create:!0});if(!a)return;let e=Date.now();for(tue(a,e),a.delete(t),a.set(t,{expiresAt:e+zEe,ids:o.map(i=>i.id)});a.size>VEe;){let i=a.keys().next();if(i.done)break;a.delete(i.value)}}function iue(n,t){let o=v1(n),a=o?.get(t);return!o||!a?null:a.expiresAt<=Date.now()?(o.delete(t),null):(o.delete(t),o.set(t,a),a.ids)}function aue(n,t,o){if(!/^\d+$/u.test(o))return{numeric:!1,id:null};let a=Number(o);if(!Number.isSafeInteger(a)||a<1)return{numeric:!0,error:w("Agent Preset \u5E8F\u53F7\u65E0\u6548\uFF0C\u8BF7\u5148\u6267\u884C /presetlist\u3002")};let e=iue(n,t);if(!e)return{numeric:!0,error:w("\u8BF7\u5148\u6267\u884C /presetlist\uFF0C\u518D\u6309\u5217\u8868\u5E8F\u53F7\u9009\u62E9 Agent Preset\u3002")};let i=e[a-1];return i?{numeric:!0,id:i}:{numeric:!0,error:w("Agent Preset \u5E8F\u53F7\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C /presetlist\u3002")}}function oue(n){return n?.code??n?.failure?.code}function oT(n,t){let o=oue(n);return o==="agent-preset-invalid"?w(`Agent Preset ID \u683C\u5F0F\u65E0\u6548\u3002 -{usage}`,{usage:w(nT)}):o==="agent-preset-unavailable"?w("Agent Preset \u4E0D\u5B58\u5728\u6216\u5F53\u524D\u4E0D\u53EF\u7528\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C /presetlist\u3002"):o===Mi||o==="workspace-bot-not-found"?w("\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002"):o==="cancelled"||n?.name==="AbortError"?t==="list"?w("\u83B7\u53D6 Agent Preset \u5217\u8868\u5DF2\u53D6\u6D88\u3002"):t==="current"?w("\u83B7\u53D6 Agent Preset \u8BBE\u7F6E\u5DF2\u53D6\u6D88\u3002"):w("Agent Preset \u4FEE\u6539\u5DF2\u53D6\u6D88\u3002"):t==="list"?w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6 Agent Preset \u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="current"?w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6 Agent Preset \u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):w("Agent Preset \u4FEE\u6539\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function N1(n,t){if(typeof n?.agentPresetSettings!="function")throw new TypeError("Harness does not support Agent Preset settings");return k1(await n.agentPresetSettings(t))}async function nue(n,t,o){if(typeof n?.updateAgentPreset!="function")throw new TypeError("Harness does not support updating Agent Preset settings");return k1(await n.updateAgentPreset(t,o))}function Ea(n){if(typeof n!="string")return!1;let t=n.trim();return R1.test(t)||jEe.test(t)}async function Ga(n,t,o,a,e={}){if(!Ea(n))return null;let i=n.trim();if(e.hasImages)return On(w("Agent Preset \u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u540E\u91CD\u8BD5\u3002"));let A=ZEe(e.signal);if(R1.test(i)){if(!/^\/(?:presetlist|presets)[ \t]*$/iu.test(i))return On(w(JEe));try{let c=await N1(t,A);return rue(o,a,c.agentPresetCatalog.items),On(eue(c))}catch(c){return On(oT(c,"list"))}}let r=/^\/preset(?:[ \t]+([^\s]+))?[ \t]*$/iu.exec(i);if(!r)return On(w(nT));let s=r[1];if(!s)try{return On($Ee(await N1(t,A)))}catch(c){return On(oT(c,"current"))}let g;if(s.toLowerCase()==="--default")g=null;else{let c=/^id:(\d+)$/iu.exec(s);if(c)g=c[1];else{let I=aue(o,a,s);if(I.numeric){if(I.error)return On(I.error);g=I.id}else if(g=fg(s),!g)return On(w(`Agent Preset ID \u683C\u5F0F\u65E0\u6548\u3002 -{usage}`,{usage:w(nT)}))}}try{return await ug(o,a,async()=>On(Aue(await nue(t,g,A))))}catch(c){return On(oT(c,"update"))}}var P1=Object.freeze(["channel","conversationType","senderId","senderName","conversationTitle","chatId","threadId","botId"]),G1=8e3;var cT=Object.freeze({group:Object.freeze({enabled:!1,fields:Object.freeze(["senderId"]),guidance:""}),direct:Object.freeze({enabled:!1,fields:Object.freeze(["senderId"]),guidance:""})}),sue=["group","direct"],gue=["enabled","fields","guidance"],cue=["groupEnabled","directEnabled","fields","guidance"],Iue=new Set(["wecom","weixin","feishu","dingtalk","qq","slack","telegram","discord","whatsapp"]),lue={channel:16,conversationType:6,senderId:256,senderName:256,conversationTitle:256,chatId:256,threadId:256,botId:128},due=/[\u0000-\u001f\u007f-\u009f\u202a-\u202e\u2066-\u2069]/g;function Zd(n){let t=new TypeError(n);return t.code="context-enhancement-invalid",t}function IT(n,t){return n&&typeof n=="object"&&!Array.isArray(n)&&[Object.prototype,null].includes(Object.getPrototypeOf(n))&&Reflect.ownKeys(n).length===t.length&&t.every(o=>Object.hasOwn(n,o))}function F1(n){if(!IT(n,gue))throw Zd("\u8BF7\u63D0\u4EA4\u5B8C\u6574\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002");let{enabled:t,fields:o,guidance:a}=n;if(typeof t!="boolean")throw Zd("\u7FA4\u804A\u548C\u79C1\u804A\u5F00\u5173\u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002");if(!Array.isArray(o)||![...o].every(e=>P1.includes(e)))throw Zd("\u6765\u6E90\u5B57\u6BB5\u53EA\u80FD\u9009\u62E9\u5DF2\u5B9A\u4E49\u7684\u516B\u4E2A\u5B57\u6BB5\u3002");if(typeof a!="string"||a.length>G1)throw Zd(`\u589E\u5F3A\u63D0\u793A\u8BCD\u4E0D\u5F97\u8D85\u8FC7 ${G1} \u4E2A\u5B57\u7B26\u3002`);return Object.freeze({enabled:t,fields:Object.freeze(P1.filter(e=>o.includes(e))),guidance:a.trim()?a:""})}function $I(n){if(!IT(n,sue))throw Zd("\u8BF7\u63D0\u4EA4\u5B8C\u6574\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002");return Object.freeze({group:F1(n.group),direct:F1(n.direct)})}function pue(n){if(!IT(n,cue))throw Zd("\u8BF7\u63D0\u4EA4\u5B8C\u6574\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002");return $I({group:{enabled:n.groupEnabled,fields:n.fields,guidance:n.guidance},direct:{enabled:n.directEnabled,fields:n.fields,guidance:n.guidance}})}function Xd(n){try{return $I(n)}catch{try{return pue(n)}catch{return cT}}}function ni(n,t){if(t!=="group"&&t!=="direct")return null;try{let o=n?.getSettings?.(),a=t==="group"?"groupEnabled":"directEnabled";if((Object.hasOwn(o??{},t)?o?.[t]?.enabled:o?.[a])!==!0)return null;let A=Xd(o)[t];return A.enabled!==!0?null:Object.freeze({config:A,botId:n.botId,conversationType:t})}catch{return null}}function hue(n,t){if(t==="senderId"&&(typeof n=="bigint"||Number.isFinite(n))&&(n=String(n)),typeof n!="string")return;let o=n.replace(due,"").trim().slice(0,lue[t]);if(!(!o||t==="channel"&&!Iue.has(o)))return o}function Eue(n,t){let{fields:o}=n.config,e=o.some(r=>["channel","senderId","senderName","conversationTitle","chatId","threadId"].includes(r))?t?.():null,i={};for(let r of o){let s=r==="botId"||r==="conversationType"?n[r]:e?.[r],g=hue(s,r);g!==void 0&&(i[r]=g)}return Object.keys(i).length===0?"":`${JSON.stringify(i).replace(/[<>&]/g,r=>({"<":"\\u003c",">":"\\u003e","&":"\\u0026"})[r])}`}function uue(n){return n.trim()?` +\u540E\u7EED\u6D88\u606F\u5C06\u4F7F\u7528\u8BE5\u6A21\u578B\u548C\u63A8\u7406\u7B49\u7EA7\u3002`,{model:Bg(Q.provider,Q.model),effort:lu(f,ey(Q,f))}))})}catch(I){return Ct(zd(I,"select"))}}var aT=/^[a-z0-9][a-z0-9-]*$/,dtA=Object.freeze({defaultId:"",items:Object.freeze([])});function fg(n){if(n==null||typeof n!="string")return null;let t=n.trim();return aT.test(t)?t:null}function Wd(n){if(n==null||n==="")return null;let t=fg(n);if(!t){let o=new Error(w("Agent Preset \u65E0\u6548\u3002"));throw o.code="agent-preset-invalid",o}return t}function qEe(n){if(typeof n=="string"){let a=fg(n);return a?{id:a,label:a}:null}if(!n||typeof n!="object"||n.broken!==void 0)return null;let t=fg(n.id);if(!t)return null;let o=typeof n.name=="string"&&n.name.trim()?n.name.trim().slice(0,128):typeof n.label=="string"&&n.label.trim()?n.label.trim().slice(0,128):t;return{id:t,label:o}}function ds(n){if(!n||typeof n!="object"||Array.isArray(n))return{defaultId:"",items:[]};let t=[],o=new Set;for(let a of Array.isArray(n.items)?n.items:[]){let e=qEe(a);!e||o.has(e.id)||(o.add(e.id),t.push(e))}return{defaultId:fg(n.defaultId)??"",items:t}}async function Ji(n){try{let t=typeof n?.get=="function"?n.get("agentPresets"):n?.agentPresets;if(!t||typeof t.list!="function")return{defaultId:"",items:[]};let o=await t.list();return ds({defaultId:typeof t.defaultId=="string"?t.defaultId:"",items:Array.isArray(o)?o:[]})}catch{return{defaultId:"",items:[]}}}var zEe=/^\/preset(?=$|\s)/iu,R1=/^\/(?:presetlist|presets)(?=$|\s)/iu,VEe="\u7528\u6CD5\uFF1A/presetlist\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",nT=["\u7528\u6CD5\uFF1A","/preset \u67E5\u770B\u5F53\u524D\u8BBE\u7F6E","/preset <\u5E8F\u53F7> \u6309\u6700\u8FD1\u4E00\u6B21 /presetlist \u7684\u5E8F\u53F7\u9009\u62E9","/preset \u6309 Agent Preset ID \u9009\u62E9","/preset id:<\u7EAF\u6570\u5B57 ID> \u9009\u62E9\u7EAF\u6570\u5B57 ID","/preset --default \u8DDF\u968F Host \u9ED8\u8BA4"].join(` +`),WEe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+/gu,T1=new WeakMap,ZEe=15*6e4,XEe=256;function On(n){return{handled:!0,message:n,messages:Cg(n)}}function $Ee(n){return typeof n!="string"?"":n.replace(WEe," ").replace(/\s+/gu," ").trim()}function eue(n){return n?{signal:n}:{}}function k1(n){if(!n||typeof n!="object"||Array.isArray(n)||!n.agentPresetCatalog||typeof n.agentPresetCatalog!="object"||!Array.isArray(n.agentPresetCatalog.items))throw new TypeError("Harness returned invalid Agent Preset settings");let t=n.agentPreset===null?null:fg(n.agentPreset);if(n.agentPreset!==null&&t===null)throw new TypeError("Harness returned an invalid current Agent Preset");return{agentPreset:t,agentPresetCatalog:ds(n.agentPresetCatalog)}}function Ay(n){let t=$Ee(n.label)||n.id;return w("{label}\uFF08{id}\uFF09",{label:t,id:n.id})}function sT(n,t){return n.items.find(o=>o.id===t)??null}function Aue(n){if(!n.defaultId)return w("\u672A\u8BBE\u7F6E\u6216\u5F53\u524D\u4E0D\u53EF\u7528");let t=sT(n,n.defaultId);return t?Ay(t):w("{id}\uFF08\u5F53\u524D\u4E0D\u53EF\u7528\uFF09",{id:n.defaultId})}function gT(n){let{agentPreset:t,agentPresetCatalog:o}=n;if(t===null){let e=sT(o,o.defaultId);return e?w("\u8DDF\u968F Host \u9ED8\u8BA4\uFF1A{preset}",{preset:Ay(e)}):w("\u8DDF\u968F Host \u9ED8\u8BA4\uFF08Host \u9ED8\u8BA4\u5F53\u524D\u4E0D\u53EF\u7528\uFF09")}let a=sT(o,t);return a?Ay(a):w("{id}\uFF08\u5DF2\u4E0D\u53EF\u7528\uFF09",{id:t})}function tue(n){return[w("\u5F53\u524D\u673A\u5668\u4EBA\u7528\u4E8E\u65B0\u4F1A\u8BDD\u7684 Agent Preset\uFF1A"),gT(n),"",w("\u5DF2\u6709\u4F1A\u8BDD\u4E0D\u4F1A\u53D7\u6B64\u8BBE\u7F6E\u5F71\u54CD\u3002"),w("\u67E5\u770B\u53EF\u7528\u9879\uFF1A/presetlist"),w("\u6062\u590D\u8DDF\u968F Host \u9ED8\u8BA4\uFF1A/preset --default")].join(` +`)}function rue(n){let{agentPreset:t,agentPresetCatalog:o}=n,a=[w("\u5F53\u524D\u673A\u5668\u4EBA\u7528\u4E8E\u65B0\u4F1A\u8BDD\u7684 Agent Preset\uFF1A"),gT(n),"",w("Host \u9ED8\u8BA4\uFF1A{preset}",{preset:Aue(o)}),"",w("\u53EF\u7528 Agent Preset\uFF08{count}\uFF09\uFF1A",{count:o.items.length})];return o.items.length===0?a.push(w("\u5F53\u524D\u6CA1\u6709\u53EF\u7528 Agent Preset\u3002")):o.items.forEach((e,i)=>{let A=[];e.id===o.defaultId&&A.push(w("Host \u9ED8\u8BA4")),e.id===t&&A.push(w("\u5F53\u524D\u9009\u62E9")),t===null&&e.id===o.defaultId&&A.push(w("\u5F53\u524D\u751F\u6548"));let r=A.length>0?`\uFF08${A.join("\uFF0C")}\uFF09`:"";a.push(`${i+1}. ${Ay(e)}${r}`)}),a.push("",w("\u9009\u62E9\uFF1A/preset <\u5E8F\u53F7\u6216 ID>"),w("\u7EAF\u6570\u5B57 ID\uFF1A/preset id:"),w("\u6062\u590D\u8DDF\u968F Host \u9ED8\u8BA4\uFF1A/preset --default")),a.join(` +`)}function iue(n){return[w("\u5F53\u524D\u673A\u5668\u4EBA\u7528\u4E8E\u65B0\u4F1A\u8BDD\u7684 Agent Preset \u5DF2\u8BBE\u7F6E\u4E3A\uFF1A"),gT(n),"",w("\u5DF2\u6709\u4F1A\u8BDD\u4E0D\u53D8\u3002\u82E5\u5F53\u524D\u804A\u5929\u5DF2\u6709\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u53D1\u9001 /new\uFF0C\u518D\u53D1\u9001\u666E\u901A\u6D88\u606F\uFF0C\u624D\u4F1A\u4F7F\u7528\u65B0\u8BBE\u7F6E\u521B\u5EFA\u4F1A\u8BDD\u3002")].join(` +`)}function v1(n,{create:t=!1}={}){if((typeof n!="object"||n===null)&&typeof n!="function")return null;let o=T1.get(n);return!o&&t&&(o=new Map,T1.set(n,o)),o??null}function aue(n,t){for(let[o,a]of n)a.expiresAt<=t&&n.delete(o)}function oue(n,t,o){let a=v1(n,{create:!0});if(!a)return;let e=Date.now();for(aue(a,e),a.delete(t),a.set(t,{expiresAt:e+ZEe,ids:o.map(i=>i.id)});a.size>XEe;){let i=a.keys().next();if(i.done)break;a.delete(i.value)}}function nue(n,t){let o=v1(n),a=o?.get(t);return!o||!a?null:a.expiresAt<=Date.now()?(o.delete(t),null):(o.delete(t),o.set(t,a),a.ids)}function sue(n,t,o){if(!/^\d+$/u.test(o))return{numeric:!1,id:null};let a=Number(o);if(!Number.isSafeInteger(a)||a<1)return{numeric:!0,error:w("Agent Preset \u5E8F\u53F7\u65E0\u6548\uFF0C\u8BF7\u5148\u6267\u884C /presetlist\u3002")};let e=nue(n,t);if(!e)return{numeric:!0,error:w("\u8BF7\u5148\u6267\u884C /presetlist\uFF0C\u518D\u6309\u5217\u8868\u5E8F\u53F7\u9009\u62E9 Agent Preset\u3002")};let i=e[a-1];return i?{numeric:!0,id:i}:{numeric:!0,error:w("Agent Preset \u5E8F\u53F7\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C /presetlist\u3002")}}function gue(n){return n?.code??n?.failure?.code}function oT(n,t){let o=gue(n);return o==="agent-preset-invalid"?w(`Agent Preset ID \u683C\u5F0F\u65E0\u6548\u3002 +{usage}`,{usage:w(nT)}):o==="agent-preset-unavailable"?w("Agent Preset \u4E0D\u5B58\u5728\u6216\u5F53\u524D\u4E0D\u53EF\u7528\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C /presetlist\u3002"):o===Mi||o==="workspace-bot-not-found"?w("\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002"):o==="cancelled"||n?.name==="AbortError"?t==="list"?w("\u83B7\u53D6 Agent Preset \u5217\u8868\u5DF2\u53D6\u6D88\u3002"):t==="current"?w("\u83B7\u53D6 Agent Preset \u8BBE\u7F6E\u5DF2\u53D6\u6D88\u3002"):w("Agent Preset \u4FEE\u6539\u5DF2\u53D6\u6D88\u3002"):t==="list"?w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6 Agent Preset \u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="current"?w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6 Agent Preset \u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):w("Agent Preset \u4FEE\u6539\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function N1(n,t){if(typeof n?.agentPresetSettings!="function")throw new TypeError("Harness does not support Agent Preset settings");return k1(await n.agentPresetSettings(t))}async function cue(n,t,o){if(typeof n?.updateAgentPreset!="function")throw new TypeError("Harness does not support updating Agent Preset settings");return k1(await n.updateAgentPreset(t,o))}function ua(n){if(typeof n!="string")return!1;let t=n.trim();return R1.test(t)||zEe.test(t)}async function Ga(n,t,o,a,e={}){if(!ua(n))return null;let i=n.trim();if(e.hasImages)return On(w("Agent Preset \u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u540E\u91CD\u8BD5\u3002"));let A=eue(e.signal);if(R1.test(i)){if(!/^\/(?:presetlist|presets)[ \t]*$/iu.test(i))return On(w(VEe));try{let c=await N1(t,A);return oue(o,a,c.agentPresetCatalog.items),On(rue(c))}catch(c){return On(oT(c,"list"))}}let r=/^\/preset(?:[ \t]+([^\s]+))?[ \t]*$/iu.exec(i);if(!r)return On(w(nT));let s=r[1];if(!s)try{return On(tue(await N1(t,A)))}catch(c){return On(oT(c,"current"))}let g;if(s.toLowerCase()==="--default")g=null;else{let c=/^id:(\d+)$/iu.exec(s);if(c)g=c[1];else{let I=sue(o,a,s);if(I.numeric){if(I.error)return On(I.error);g=I.id}else if(g=fg(s),!g)return On(w(`Agent Preset ID \u683C\u5F0F\u65E0\u6548\u3002 +{usage}`,{usage:w(nT)}))}}try{return await ug(o,a,async()=>On(iue(await cue(t,g,A))))}catch(c){return On(oT(c,"update"))}}var P1=Object.freeze(["channel","conversationType","senderId","senderName","conversationTitle","chatId","threadId","botId"]),G1=8e3;var cT=Object.freeze({group:Object.freeze({enabled:!1,fields:Object.freeze(["senderId"]),guidance:""}),direct:Object.freeze({enabled:!1,fields:Object.freeze(["senderId"]),guidance:""})}),Iue=["group","direct"],lue=["enabled","fields","guidance"],due=["groupEnabled","directEnabled","fields","guidance"],pue=new Set(["wecom","weixin","feishu","dingtalk","qq","slack","telegram","discord","whatsapp"]),hue={channel:16,conversationType:6,senderId:256,senderName:256,conversationTitle:256,chatId:256,threadId:256,botId:128},Eue=/[\u0000-\u001f\u007f-\u009f\u202a-\u202e\u2066-\u2069]/g;function Zd(n){let t=new TypeError(n);return t.code="context-enhancement-invalid",t}function IT(n,t){return n&&typeof n=="object"&&!Array.isArray(n)&&[Object.prototype,null].includes(Object.getPrototypeOf(n))&&Reflect.ownKeys(n).length===t.length&&t.every(o=>Object.hasOwn(n,o))}function F1(n){if(!IT(n,lue))throw Zd("\u8BF7\u63D0\u4EA4\u5B8C\u6574\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002");let{enabled:t,fields:o,guidance:a}=n;if(typeof t!="boolean")throw Zd("\u7FA4\u804A\u548C\u79C1\u804A\u5F00\u5173\u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002");if(!Array.isArray(o)||![...o].every(e=>P1.includes(e)))throw Zd("\u6765\u6E90\u5B57\u6BB5\u53EA\u80FD\u9009\u62E9\u5DF2\u5B9A\u4E49\u7684\u516B\u4E2A\u5B57\u6BB5\u3002");if(typeof a!="string"||a.length>G1)throw Zd(`\u589E\u5F3A\u63D0\u793A\u8BCD\u4E0D\u5F97\u8D85\u8FC7 ${G1} \u4E2A\u5B57\u7B26\u3002`);return Object.freeze({enabled:t,fields:Object.freeze(P1.filter(e=>o.includes(e))),guidance:a.trim()?a:""})}function el(n){if(!IT(n,Iue))throw Zd("\u8BF7\u63D0\u4EA4\u5B8C\u6574\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002");return Object.freeze({group:F1(n.group),direct:F1(n.direct)})}function uue(n){if(!IT(n,due))throw Zd("\u8BF7\u63D0\u4EA4\u5B8C\u6574\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002");return el({group:{enabled:n.groupEnabled,fields:n.fields,guidance:n.guidance},direct:{enabled:n.directEnabled,fields:n.fields,guidance:n.guidance}})}function Xd(n){try{return el(n)}catch{try{return uue(n)}catch{return cT}}}function ni(n,t){if(t!=="group"&&t!=="direct")return null;try{let o=n?.getSettings?.(),a=t==="group"?"groupEnabled":"directEnabled";if((Object.hasOwn(o??{},t)?o?.[t]?.enabled:o?.[a])!==!0)return null;let A=Xd(o)[t];return A.enabled!==!0?null:Object.freeze({config:A,botId:n.botId,conversationType:t})}catch{return null}}function Cue(n,t){if(t==="senderId"&&(typeof n=="bigint"||Number.isFinite(n))&&(n=String(n)),typeof n!="string")return;let o=n.replace(Eue,"").trim().slice(0,hue[t]);if(!(!o||t==="channel"&&!pue.has(o)))return o}function Bue(n,t){let{fields:o}=n.config,e=o.some(r=>["channel","senderId","senderName","conversationTitle","chatId","threadId"].includes(r))?t?.():null,i={};for(let r of o){let s=r==="botId"||r==="conversationType"?n[r]:e?.[r],g=Cue(s,r);g!==void 0&&(i[r]=g)}return Object.keys(i).length===0?"":`${JSON.stringify(i).replace(/[<>&]/g,r=>({"<":"\\u003c",">":"\\u003e","&":"\\u0026"})[r])}`}function fue(n){return n.trim()?` ${n.replace(/<\/?dsh_im_source_guidance\b[^>]*(?:>|$)/gi,o=>o.replace(//g,">"))} -`:""}function Fo(n,t,o){if(!t)return n;try{let a=[Eue(t,o),uue(t.config.guidance)].filter(Boolean);if(a.length===0)return n;let e=a.join(` +`:""}function Fo(n,t,o){if(!t)return n;try{let a=[Bue(t,o),fue(t.config.guidance)].filter(Boolean);if(a.length===0)return n;let e=a.join(` `);return typeof n=="string"?`${e} -${n}`:Array.isArray(n)?[{type:"text",text:e},...n]:n}catch{return n}}var si=10,Cue=/^\/(batch|send|cancel)(?=$|\s)/iu,Bue=/^\/(batch|send|cancel)$/iu;function L1(n){return typeof n!="string"?null:Cue.exec(n.trim())?.[1]?.toLowerCase()??null}function _i(n,t,o={}){return{handled:!0,kind:n,...t?{message:t}:{},...o}}function fue(n){return n===si?w(`\u5F53\u524D\u5DF2\u5904\u4E8E\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\uFF0C\u5DF2\u6536\u96C6 {count}/{limit} \u6761\u3002 +${n}`:Array.isArray(n)?[{type:"text",text:e},...n]:n}catch{return n}}var si=10,Que=/^\/(batch|send|cancel)(?=$|\s)/iu,yue=/^\/(batch|send|cancel)$/iu;function L1(n){return typeof n!="string"?null:Que.exec(n.trim())?.[1]?.toLowerCase()??null}function _i(n,t,o={}){return{handled:!0,kind:n,...t?{message:t}:{},...o}}function mue(n){return n===si?w(`\u5F53\u524D\u5DF2\u5904\u4E8E\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\uFF0C\u5DF2\u6536\u96C6 {count}/{limit} \u6761\u3002 \u8BF7\u53D1\u9001 /send \u63D0\u4EA4\u6216 /cancel \u53D6\u6D88\u3002`,{count:n,limit:si}):w(`\u5F53\u524D\u5DF2\u5904\u4E8E\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\uFF0C\u5DF2\u6536\u96C6 {count}/{limit} \u6761\u3002 -\u5B8C\u6210\u540E\u53D1\u9001 /send\uFF0C\u53D6\u6D88\u8BF7\u53D1\u9001 /cancel\u3002`,{count:n,limit:si})}function Que(n){let t=n.map((o,a)=>`${w("[\u6D88\u606F {index}]",{index:a+1})} +\u5B8C\u6210\u540E\u53D1\u9001 /send\uFF0C\u53D6\u6D88\u8BF7\u53D1\u9001 /cancel\u3002`,{count:n,limit:si})}function Sue(n){let t=n.map((o,a)=>`${w("[\u6D88\u606F {index}]",{index:a+1})} ${o}`);return[w("\u4EE5\u4E0B\u662F\u7528\u6237\u901A\u8FC7\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\u53D1\u9001\u7684\u591A\u6761\u5185\u5BB9\uFF0C\u8BF7\u6309\u987A\u5E8F\u4F5C\u4E3A\u540C\u4E00\u6B21\u8F93\u5165\u7EDF\u4E00\u5904\u7406\u3002"),...t].join(` `)}function La(n){return L1(n)!==null}function ps(){return w("\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\u4EC5\u652F\u6301\u79C1\u804A\uFF0C\u8BF7\u5728\u4E0E\u673A\u5668\u4EBA\u7684\u79C1\u804A\u4E2D\u4F7F\u7528\u3002")}function Lo(){return w(`\u5F53\u524D\u804A\u5929\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u3001\u5F85\u56DE\u7B54\u95EE\u9898\u6216\u5F85\u5BA1\u6279\u8BF7\u6C42\u3002 -\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u4EA4\u4E92\u6216\u53D1\u9001 /stop\uFF0C\u518D\u4F7F\u7528 /batch\u3002`)}var Fa=class{#e=new Map;status(t){let o=this.#e.get(t);return Object.freeze(o?{phase:o.phase,count:o.messages.length,limit:si,full:o.messages.length===si}:{phase:"idle",count:0,limit:si,full:!1})}handle(t,o,{plainText:a=!0}={}){let e=this.#e.get(t),i=L1(o),A=typeof o=="string"?Bue.exec(o.trim()):null;if(i&&!A)return _i("invalid-command",w("\u7528\u6CD5\uFF1A/{command}\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",{command:i}));if(!e)return i?a?i==="send"?_i("no-batch",w("\u5F53\u524D\u6CA1\u6709\u5F85\u63D0\u4EA4\u7684\u6279\u91CF\u5185\u5BB9\uFF0C\u8BF7\u5148\u53D1\u9001 /batch\u3002")):i==="cancel"?_i("no-batch",w("\u5F53\u524D\u6CA1\u6709\u6B63\u5728\u8FDB\u884C\u7684\u6279\u91CF\u8F93\u5165\u3002")):(this.#e.set(t,{phase:"collecting",messages:[],token:null}),_i("started",w(`\u5DF2\u8FDB\u5165\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\uFF0C\u6700\u591A\u53EF\u53D1\u9001 {limit} \u6761\u6587\u5B57\u3002 +\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u4EA4\u4E92\u6216\u53D1\u9001 /stop\uFF0C\u518D\u4F7F\u7528 /batch\u3002`)}var Fa=class{#e=new Map;status(t){let o=this.#e.get(t);return Object.freeze(o?{phase:o.phase,count:o.messages.length,limit:si,full:o.messages.length===si}:{phase:"idle",count:0,limit:si,full:!1})}handle(t,o,{plainText:a=!0}={}){let e=this.#e.get(t),i=L1(o),A=typeof o=="string"?yue.exec(o.trim()):null;if(i&&!A)return _i("invalid-command",w("\u7528\u6CD5\uFF1A/{command}\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",{command:i}));if(!e)return i?a?i==="send"?_i("no-batch",w("\u5F53\u524D\u6CA1\u6709\u5F85\u63D0\u4EA4\u7684\u6279\u91CF\u5185\u5BB9\uFF0C\u8BF7\u5148\u53D1\u9001 /batch\u3002")):i==="cancel"?_i("no-batch",w("\u5F53\u524D\u6CA1\u6709\u6B63\u5728\u8FDB\u884C\u7684\u6279\u91CF\u8F93\u5165\u3002")):(this.#e.set(t,{phase:"collecting",messages:[],token:null}),_i("started",w(`\u5DF2\u8FDB\u5165\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\uFF0C\u6700\u591A\u53EF\u53D1\u9001 {limit} \u6761\u6587\u5B57\u3002 \u5B8C\u6210\u540E\u53D1\u9001 /send\uFF0C\u53D6\u6D88\u8BF7\u53D1\u9001 /cancel\u3002`,{limit:si}),{count:0,limit:si})):_i("unsupported-content",w("\u6279\u91CF\u8F93\u5165\u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u3001\u6587\u4EF6\u6216\u5F15\u7528\u6D88\u606F\u540E\u91CD\u8BD5\u3002")):{handled:!1};if(!a&&(e.phase==="collecting"||i))return _i("unsupported-content",w(`\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\u76EE\u524D\u4EC5\u652F\u6301\u6587\u5B57\uFF0C\u4E0D\u652F\u6301\u56FE\u7247\u3001\u6587\u4EF6\u6216\u5F15\u7528\u6D88\u606F\uFF0C\u8FD9\u6761\u6D88\u606F\u672A\u6536\u5F55\u3002 \u8BF7\u7EE7\u7EED\u53D1\u9001\u6587\u5B57\uFF0C\u6216\u4F7F\u7528 /send\u3001/cancel\u3002`),{count:e.messages.length,limit:si});if(e.phase==="submitting")return i==="send"?_i("submitting",w("\u5F53\u524D\u6279\u6B21\u6B63\u5728\u63D0\u4EA4\uFF0C\u8BF7\u52FF\u91CD\u590D\u53D1\u9001 /send\u3002")):i==="cancel"?_i("submitting",w(`\u6279\u91CF\u5185\u5BB9\u5DF2\u7ECF\u63D0\u4EA4\uFF0C\u65E0\u6CD5\u53D6\u6D88\u3002 -\u5982\u9700\u505C\u6B62\u5F53\u524D\u4EFB\u52A1\uFF0C\u8BF7\u53D1\u9001 /stop\u3002`)):i==="batch"?_i("submitting",w("\u5F53\u524D\u6279\u6B21\u6B63\u5728\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5904\u7406\u5B8C\u6210\u540E\u518D\u5F00\u542F\u65B0\u6279\u6B21\u3002")):{handled:!1};if(i==="batch")return _i("status",fue(e.messages.length),{count:e.messages.length,limit:si});if(i==="cancel"){let s=e.messages.length;return this.#e.delete(t),_i("cancelled",s===0?w("\u5DF2\u53D6\u6D88\u6279\u91CF\u8F93\u5165\u3002"):w("\u5DF2\u53D6\u6D88\u6279\u91CF\u8F93\u5165\uFF0C\u5171\u4E22\u5F03 {count} \u6761\u6D88\u606F\u3002",{count:s}),{count:s})}if(i==="send"){if(e.messages.length===0)return _i("empty",w("\u5F53\u524D\u6279\u6B21\u8FD8\u6CA1\u6709\u5185\u5BB9\uFF0C\u8BF7\u5148\u53D1\u9001\u6587\u5B57\uFF0C\u6216\u4F7F\u7528 /cancel \u53D6\u6D88\u3002"),{count:0});let s=Object.freeze([...e.messages]),g=Object.freeze({});return e.phase="submitting",e.token=g,_i("submit",null,{token:g,messages:s,prompt:Que(s),count:s.length})}if(typeof o!="string")return _i("unsupported-content",w(`\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\u76EE\u524D\u4EC5\u652F\u6301\u6587\u5B57\uFF0C\u4E0D\u652F\u6301\u56FE\u7247\u3001\u6587\u4EF6\u6216\u5F15\u7528\u6D88\u606F\uFF0C\u8FD9\u6761\u6D88\u606F\u672A\u6536\u5F55\u3002 +\u5982\u9700\u505C\u6B62\u5F53\u524D\u4EFB\u52A1\uFF0C\u8BF7\u53D1\u9001 /stop\u3002`)):i==="batch"?_i("submitting",w("\u5F53\u524D\u6279\u6B21\u6B63\u5728\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5904\u7406\u5B8C\u6210\u540E\u518D\u5F00\u542F\u65B0\u6279\u6B21\u3002")):{handled:!1};if(i==="batch")return _i("status",mue(e.messages.length),{count:e.messages.length,limit:si});if(i==="cancel"){let s=e.messages.length;return this.#e.delete(t),_i("cancelled",s===0?w("\u5DF2\u53D6\u6D88\u6279\u91CF\u8F93\u5165\u3002"):w("\u5DF2\u53D6\u6D88\u6279\u91CF\u8F93\u5165\uFF0C\u5171\u4E22\u5F03 {count} \u6761\u6D88\u606F\u3002",{count:s}),{count:s})}if(i==="send"){if(e.messages.length===0)return _i("empty",w("\u5F53\u524D\u6279\u6B21\u8FD8\u6CA1\u6709\u5185\u5BB9\uFF0C\u8BF7\u5148\u53D1\u9001\u6587\u5B57\uFF0C\u6216\u4F7F\u7528 /cancel \u53D6\u6D88\u3002"),{count:0});let s=Object.freeze([...e.messages]),g=Object.freeze({});return e.phase="submitting",e.token=g,_i("submit",null,{token:g,messages:s,prompt:Sue(s),count:s.length})}if(typeof o!="string")return _i("unsupported-content",w(`\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\u76EE\u524D\u4EC5\u652F\u6301\u6587\u5B57\uFF0C\u4E0D\u652F\u6301\u56FE\u7247\u3001\u6587\u4EF6\u6216\u5F15\u7528\u6D88\u606F\uFF0C\u8FD9\u6761\u6D88\u606F\u672A\u6536\u5F55\u3002 \u8BF7\u7EE7\u7EED\u53D1\u9001\u6587\u5B57\uFF0C\u6216\u4F7F\u7528 /send\u3001/cancel\u3002`),{count:e.messages.length,limit:si});if(o.trim().startsWith("/"))return _i("blocked-command",w("\u5F53\u524D\u6B63\u5728\u6279\u91CF\u8F93\u5165\uFF0C\u8BF7\u5148\u53D1\u9001 /send \u63D0\u4EA4\u6216 /cancel \u53D6\u6D88\u3002"),{count:e.messages.length,limit:si});if(e.messages.length===si)return _i("full",w(`\u5F53\u524D\u6279\u6B21\u5DF2\u6EE1\uFF0C\u8FD9\u6761\u6D88\u606F\u672A\u6536\u5F55\u3002 \u8BF7\u5148\u53D1\u9001 /send \u63D0\u4EA4\u6216 /cancel \u53D6\u6D88\uFF0C\u7136\u540E\u91CD\u65B0\u53D1\u9001\u8FD9\u6761\u6D88\u606F\u3002`),{count:si,limit:si});e.messages.push(o);let r=e.messages.length;return _i("collected",r===si?w("\u5DF2\u6536\u96C6 {count}/{limit} \u6761\uFF0C\u5F53\u524D\u6279\u6B21\u5DF2\u6EE1\uFF0C\u8BF7\u53D1\u9001 /send \u63D0\u4EA4\u6216 /cancel \u53D6\u6D88\u3002",{count:r,limit:si}):null,{count:r,limit:si})}complete(t,o){let a=this.#e.get(t);if(!a||a.phase!=="submitting"||a.token!==o)return Object.freeze({completed:!1});let e=a.messages.length;return this.#e.delete(t),Object.freeze({completed:!0,count:e})}fail(t,o){let a=this.#e.get(t);if(!a||a.phase!=="submitting"||a.token!==o)return Object.freeze({retained:!1});a.phase="collecting",a.token=null;let e=a.messages.length;return Object.freeze({retained:!0,count:e,message:w(`\u6279\u91CF\u5185\u5BB9\u63D0\u4EA4\u5931\u8D25\uFF0C\u5DF2\u4FDD\u7559 {count} \u6761\u6D88\u606F\u3002 -\u8BF7\u518D\u6B21\u53D1\u9001 /send \u91CD\u8BD5\u6216 /cancel \u53D6\u6D88\u3002`,{count:e})})}};import{createWriteStream as yue}from"node:fs";import{mkdir as mue,mkdtemp as Sue,rm as U1,writeFile as wue}from"node:fs/promises";import{isAbsolute as H1,join as lT,relative as Due,resolve as K1}from"node:path";import{pipeline as Oue}from"node:stream/promises";var bue=lT(".dsh-im","inbound"),Uo=class extends Error{constructor(t,o,a=w("\u6587\u4EF6\u63A5\u6536\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),e={}){super(o,e),this.name="InboundFileError",this.code=t,this.userMessage=a}};function dT(n){return Array.isArray(n?.files)?n.files.filter(Boolean):[]}function x1(n,t){return typeof n!="string"?t:n.replaceAll("\\","/").split("/").at(-1)?.replace(/[\u0000-\u001f\u007f]/g,"").trim()||t}function Mue(n,t){let o=x1(n,"file").replace(/[^\p{L}\p{N}._ -]/gu,"_").replace(/^\.+/,"").slice(0,160)||"file";return`${String(t+1).padStart(2,"0")}-${o}`}function _ue(n){if(Buffer.isBuffer(n)||n instanceof Uint8Array)return{data:Buffer.from(n)};let t=n?.data??n?.buffer;if(Buffer.isBuffer(t)||t instanceof Uint8Array)return{data:Buffer.from(t),name:n?.name??n?.filename,mediaType:n?.mediaType??n?.mimetype};let o=n?.stream??n;return o&&typeof o[Symbol.asyncIterator]=="function"?{stream:o,name:n?.name??n?.filename,mediaType:n?.mediaType??n?.mimetype}:null}function bt(n){return dT(n).length>0}function $d(n,{signal:t}={}){let o=dT(n);return o.length===0?n:{...n,files:o.map(a=>{if(a?.data!==void 0||typeof a?.load!="function")return a;let e;try{e=Promise.resolve(a.load({signal:t}))}catch(i){e=Promise.reject(i)}return e.catch(()=>{}),{...a,async load({signal:i}={}){i?.throwIfAborted();let A=await e;return i?.throwIfAborted(),A}}})}}async function Y1(n,{workspace:t,signal:o}={}){let a=dT(n);if(a.length===0)return null;if(typeof t!="string"||!H1(t))throw new Uo("inbound-file-workspace-unavailable","The Harness Session workspace is unavailable for inbound files.");o?.throwIfAborted();let e=K1(t,bue);await mue(e,{recursive:!0,mode:448});let i=await Sue(lT(e,"turn-")),A=[];try{for(let[r,s]of a.entries()){o?.throwIfAborted();let g;try{g=s?.data===void 0?await s?.load?.({signal:o}):s.data}catch(f){throw o?.aborted?f:new Uo("inbound-file-download-failed",`Unable to download inbound file ${r+1}: ${f?.message??String(f)}`,w("\u6587\u4EF6\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),{cause:f})}let c=_ue(g);if(!c)throw new Uo("inbound-file-data-invalid",`Inbound file ${r+1} returned no readable data.`);let I=x1(c.name??s?.name,`file-${r+1}`),d=lT(i,Mue(I,r));if(c.data)await wue(d,c.data,{mode:384,signal:o});else try{await Oue(c.stream,yue(d,{flags:"wx",mode:384}),{signal:o})}catch(f){throw o?.aborted?f:new Uo("inbound-file-download-failed",`Unable to stream inbound file ${r+1}: ${f?.message??String(f)}`,w("\u6587\u4EF6\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),{cause:f})}let B=Due(K1(t),d);if(!B||B.startsWith("..")||H1(B))throw new Uo("inbound-file-path-invalid","The staged inbound file escaped the Harness Session workspace.");A.push(Object.freeze({name:I,path:B,...typeof(c.mediaType??s?.mediaType)=="string"&&(c.mediaType??s.mediaType).trim()?{mediaType:(c.mediaType??s.mediaType).trim()}:{}}))}return Object.freeze({files:Object.freeze(A),async cleanup(){await U1(i,{recursive:!0,force:!0})}})}catch(r){throw await U1(i,{recursive:!0,force:!0}).catch(()=>{}),r}}function pT(n,t){if(!t?.files?.length)return n;let o=["",JSON.stringify({description:"Files uploaded with this user message. Paths are relative to the current Harness workspace.",files:t.files}),""].join(` +\u8BF7\u518D\u6B21\u53D1\u9001 /send \u91CD\u8BD5\u6216 /cancel \u53D6\u6D88\u3002`,{count:e})})}};import{createWriteStream as wue}from"node:fs";import{mkdir as Due,mkdtemp as Oue,rm as U1,writeFile as bue}from"node:fs/promises";import{isAbsolute as H1,join as lT,relative as Mue,resolve as K1}from"node:path";import{pipeline as _ue}from"node:stream/promises";var Tue=lT(".dsh-im","inbound"),Uo=class extends Error{constructor(t,o,a=w("\u6587\u4EF6\u63A5\u6536\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),e={}){super(o,e),this.name="InboundFileError",this.code=t,this.userMessage=a}};function dT(n){return Array.isArray(n?.files)?n.files.filter(Boolean):[]}function x1(n,t){return typeof n!="string"?t:n.replaceAll("\\","/").split("/").at(-1)?.replace(/[\u0000-\u001f\u007f]/g,"").trim()||t}function Nue(n,t){let o=x1(n,"file").replace(/[^\p{L}\p{N}._ -]/gu,"_").replace(/^\.+/,"").slice(0,160)||"file";return`${String(t+1).padStart(2,"0")}-${o}`}function Rue(n){if(Buffer.isBuffer(n)||n instanceof Uint8Array)return{data:Buffer.from(n)};let t=n?.data??n?.buffer;if(Buffer.isBuffer(t)||t instanceof Uint8Array)return{data:Buffer.from(t),name:n?.name??n?.filename,mediaType:n?.mediaType??n?.mimetype};let o=n?.stream??n;return o&&typeof o[Symbol.asyncIterator]=="function"?{stream:o,name:n?.name??n?.filename,mediaType:n?.mediaType??n?.mimetype}:null}function Mt(n){return dT(n).length>0}function $d(n,{signal:t}={}){let o=dT(n);return o.length===0?n:{...n,files:o.map(a=>{if(a?.data!==void 0||typeof a?.load!="function")return a;let e;try{e=Promise.resolve(a.load({signal:t}))}catch(i){e=Promise.reject(i)}return e.catch(()=>{}),{...a,async load({signal:i}={}){i?.throwIfAborted();let A=await e;return i?.throwIfAborted(),A}}})}}async function Y1(n,{workspace:t,signal:o}={}){let a=dT(n);if(a.length===0)return null;if(typeof t!="string"||!H1(t))throw new Uo("inbound-file-workspace-unavailable","The Harness Session workspace is unavailable for inbound files.");o?.throwIfAborted();let e=K1(t,Tue);await Due(e,{recursive:!0,mode:448});let i=await Oue(lT(e,"turn-")),A=[];try{for(let[r,s]of a.entries()){o?.throwIfAborted();let g;try{g=s?.data===void 0?await s?.load?.({signal:o}):s.data}catch(f){throw o?.aborted?f:new Uo("inbound-file-download-failed",`Unable to download inbound file ${r+1}: ${f?.message??String(f)}`,w("\u6587\u4EF6\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),{cause:f})}let c=Rue(g);if(!c)throw new Uo("inbound-file-data-invalid",`Inbound file ${r+1} returned no readable data.`);let I=x1(c.name??s?.name,`file-${r+1}`),d=lT(i,Nue(I,r));if(c.data)await bue(d,c.data,{mode:384,signal:o});else try{await _ue(c.stream,wue(d,{flags:"wx",mode:384}),{signal:o})}catch(f){throw o?.aborted?f:new Uo("inbound-file-download-failed",`Unable to stream inbound file ${r+1}: ${f?.message??String(f)}`,w("\u6587\u4EF6\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),{cause:f})}let B=Mue(K1(t),d);if(!B||B.startsWith("..")||H1(B))throw new Uo("inbound-file-path-invalid","The staged inbound file escaped the Harness Session workspace.");A.push(Object.freeze({name:I,path:B,...typeof(c.mediaType??s?.mediaType)=="string"&&(c.mediaType??s.mediaType).trim()?{mediaType:(c.mediaType??s.mediaType).trim()}:{}}))}return Object.freeze({files:Object.freeze(A),async cleanup(){await U1(i,{recursive:!0,force:!0})}})}catch(r){throw await U1(i,{recursive:!0,force:!0}).catch(()=>{}),r}}function pT(n,t){if(!t?.files?.length)return n;let o=["",JSON.stringify({description:"Files uploaded with this user message. Paths are relative to the current Harness workspace.",files:t.files}),""].join(` `);if(Array.isArray(n))return[...n,{type:"text",text:o}];let a=typeof n=="string"?n.trim():"";return a?`${a} -${o}`:o}function Ho(n){return n instanceof Uo?n.userMessage:null}import{createHash as W1,randomUUID as Z1}from"node:crypto";import{constants as du}from"node:fs";import{copyFile as Tue,lstat as j1,mkdtemp as Nue,open as X1,realpath as Rue,unlink as $1}from"node:fs/promises";import{tmpdir as kue}from"node:os";import{basename as vue,extname as Pue,isAbsolute as Gue,join as e3,resolve as Fue}from"node:path";var ry="dsh_im_return_file",ty="dsh-im-outbound-artifact",hT=64*1024,Lue=new Map([[".csv","text/csv"],[".doc","application/msword"],[".docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],[".gif","image/gif"],[".html","text/html"],[".jpeg","image/jpeg"],[".jpg","image/jpeg"],[".json","application/json"],[".md","text/markdown"],[".pdf","application/pdf"],[".png","image/png"],[".rar","application/vnd.rar"],[".txt","text/plain"],[".webp","image/webp"],[".xls","application/vnd.ms-excel"],[".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],[".xml","application/xml"],[".zip","application/zip"]]),mg=new WeakMap,A3=new WeakMap,pu=new WeakMap,J1;function Uue(){return J1??=Nue(e3(kue(),"dsh-im-outbound-")),J1}function yg(n,t){let o=new Error(t);return o.code=n,o}function q1(n){let t=n?.session?.events;if(!Array.isArray(t))return null;let o=null;for(let a of t)a?.type==="turn/start"?o=Number.isInteger(a.data?.turn)?a.data.turn:null:a?.type==="turn/end"&&a.data?.turn===o&&(o=null);return Number.isInteger(o)&&o>=0?o:null}function z1(n){let t=n?.id??n?.header?.id;return typeof t=="string"&&t?t:null}function Qg(n,t){return`${n}\0${t}`}function V1(n,t){return`${n}\0${t}`}function Hue(n){let t=String(n??"").replace(/[\u0000-\u001f\u007f]/g," ").replace(new RegExp("\\p{Cf}","gu"),"").replace(/\s+/g," ").trim();return t?[...t].slice(0,255).join(""):"result.bin"}function Kue(n){return Lue.get(Pue(n).toLowerCase())??"application/octet-stream"}function xue(n){return W1("sha256").update(n).digest("hex")}function Yue(n,t){return typeof n?.dev=="bigint"&&typeof n?.ino=="bigint"&&typeof n?.size=="bigint"&&typeof n?.mtimeNs=="bigint"&&typeof n?.ctimeNs=="bigint"&&n.dev===t?.dev&&n.ino===t?.ino&&n.size===t?.size&&n.mtimeNs===t?.mtimeNs&&n.ctimeNs===t?.ctimeNs}async function jue(n,t){let o;try{o=await X1(n,du.O_RDONLY);let a=W1("sha256"),e=o.createReadStream({autoClose:!1,highWaterMark:hT,...t?{signal:t}:{}});for await(let i of e)t?.throwIfAborted(),a.update(i);return a.digest("hex")}finally{await o?.close().catch(()=>{})}}async function Jue(n,t,{signal:o,errorCode:a="artifact-changed",errorMessage:e="The result file changed while it was being read."}={}){let i=()=>yg(a,e);if(!Number.isSafeInteger(t)||t<0)throw i();o?.throwIfAborted();let A;try{A=Buffer.allocUnsafe(t)}catch{throw i()}if(typeof n?.createReadStream=="function"){let g=n.createReadStream({autoClose:!1,start:0,end:t,highWaterMark:hT,...o?{signal:o}:{}}),c=0;for await(let I of g){o?.throwIfAborted();let d=Buffer.isBuffer(I)?I:Buffer.from(I);if(c+d.length>t)throw i();d.copy(A,c),c+=d.length}if(c!==t)throw i();return A}let r=0;for(;rg)throw i();r+=I}o?.throwIfAborted();let s=Buffer.allocUnsafe(1);if((await n.read(s,0,1,t))?.bytesRead!==0)throw i();return A}async function que(n,t,o){o?.throwIfAborted();let a;try{let e=Gue(t)?t:Fue(n,t),i=await Rue(e);if(!(await j1(i,{bigint:!0})).isFile())throw yg("artifact-not-file","The requested path is not a file.");let r=await Uue();a=e3(r,`${Z1()}.artifact`),await Tue(i,a,du.COPYFILE_EXCL),o?.throwIfAborted();let s=await j1(a,{bigint:!0}),g=Number(s.size);if(!s.isFile()||!Number.isSafeInteger(g)||g<0)throw yg("artifact-unavailable","The file could not be prepared for delivery.");let c=Hue(vue(e));return Object.freeze({fileName:c,mediaType:Kue(c),size:g,digest:await jue(a,o),storagePath:a})}catch(e){throw a&&await $1(a).catch(()=>{}),e?.code?.startsWith?.("artifact-")?e:o?.aborted?o.reason??e:yg("artifact-unavailable","The requested file is unavailable.")}}function t3(n){return Object.freeze({artifactId:n.artifactId,fileName:n.fileName,size:n.size})}function Ay(n){return n.artifactId}function hs(n){let t=mg.get(n);if(!t)return;if(t.releaseRequested=!0,t.materializing>0){t.cleanupRequested=!0;return}let o=[...pu.get(n)??[]];if(o.length>0){t.cleanupDeferred||(t.cleanupDeferred=!0,Promise.allSettled(o).finally(()=>{t.cleanupDeferred=!1,hs(n)}));return}mg.delete(n),pu.delete(n),t.onCleanup?.(),$1(t.path).catch(()=>{})}var ET=class{#e=new Map;#A=new Map;#t=new Map;#r=new Map;#I=new Map;#o=new Map;#g=new Map;#i=new Map;#a;constructor({uuid:t=Z1}={}){if(typeof t!="function")throw new TypeError("uuid must be a function");this.#a=t}openConsumer(t,o){if(typeof t!="string"||!t||typeof o!="string"||!o)throw new TypeError("sessionId and promptRpcId are required");let a=V1(t,o),e={sessionId:t,promptRpcId:o,turn:null,released:!1};return this.#o.set(a,e),()=>{if(!e.released&&(e.released=!0,this.#o.get(a)===e&&this.#o.delete(a),e.turn!==null)){let i=Qg(t,e.turn);this.#g.get(i)===e&&this.#g.delete(i),this.discard(t,e.turn)}}}observeSessionEvent(t,o){let a=z1(t);if(!a||!o||typeof o!="object")return;if(o.type==="turn/start"){let A=o.data?.turn;Number.isInteger(A)&&A>=0&&this.#i.set(a,A);return}if(o.type==="user/message"){let A=o.data?.source?.rpcId,r=this.#i.get(a)??q1({session:t});if(typeof A!="string"||!A||!Number.isInteger(r))return;this.#i.set(a,r);let s=this.#o.get(V1(a,A));if(!s||s.released)return;s.turn=r,this.#g.set(Qg(a,r),s);return}if(o.type!=="turn/end")return;let e=o.data?.turn;if(!Number.isInteger(e)||e<0)return;this.#i.get(a)===e&&this.#i.delete(a);let i=this.#g.get(Qg(a,e));(!i||i.released)&&this.discard(a,e)}disposeSession(t){let o=z1(t);if(!o)return;let a=`${o}\0`,e=new Set;for(let i of[this.#e,this.#A])for(let[A,r]of i)if(A.startsWith(a)){for(let s of r.values())e.add(s);i.delete(A)}for(let[i,A]of this.#o)i.startsWith(a)&&(A.released=!0,this.#o.delete(i));for(let i of this.#g.keys())i.startsWith(a)&&this.#g.delete(i);this.#i.delete(o);for(let i of e)hs(i)}async stage(t,o){let a=t?.path;if(typeof a!="string"||!a.trim())throw new TypeError("A file path is required.");let e=o?.agent,i=e?.session?.header?.id,A=e?.session?.header?.cwd,r=q1(e);if(typeof i!="string"||!i||typeof A!="string"||!A||r===null)throw yg("artifact-context-required","A live Harness Session is required to return a file.");let s=await que(A,a,o?.signal),{storagePath:g,...c}=s,I=Object.freeze({kind:ty,schemaVersion:1,artifactId:this.#a(),deliveryKey:this.#a(),...c,source:"managed-temp",registeredBy:Object.freeze({kind:"tool-result",eventId:typeof o?.callId=="string"?o.callId:"unknown",toolName:ry}),origin:Object.freeze({sessionId:i,turn:r,callId:typeof o?.callId=="string"?o.callId:null}),createdAt:Date.now()});mg.set(I,{path:g,materializing:0,materialized:!1,releaseRequested:!1,cleanupRequested:!1,cleanupDeferred:!1,onCleanup:()=>this.#c(I)});let d=Qg(i,r),B=this.#A.get(d);return B||(B=new Map,this.#A.set(d,B)),B.set(Ay(I),I),I}commit(t){if(t?.kind!==ty||!mg.has(t))return null;let o=Qg(t.origin.sessionId,t.origin.turn),a=Ay(t),e=this.#A.get(o);if(e?.get(a)!==t)return null;e.delete(a),e.size===0&&this.#A.delete(o);let i=this.#e.get(o);return i||(i=new Map,this.#e.set(o,i)),i.set(a,t),t3(t)}release(t){if(t?.kind!==ty)return;let o=Qg(t.origin.sessionId,t.origin.turn),a=Ay(t),e=this.#A.get(o);e?.get(a)===t&&e.delete(a),e?.size===0&&this.#A.delete(o),hs(t)}take(t,o,{signal:a}={}){let e=Qg(t,o),i=this.#e.get(e);if(this.#e.delete(e),!i)return[];if(a?.aborted){for(let s of i.values())hs(s);return[]}let A=this.#t.get(e)??new Map;this.#t.set(e,A);let r=[];for(let[s,g]of i)mg.has(g)&&(A.set(s,g),r.push(g));if(A.size===0)this.#t.delete(e);else if(!this.#s(e,a))return[];return r}discard(t,o){if(typeof t!="string"||!Number.isInteger(o))return;let a=Qg(t,o),e=new Set([...this.#e.get(a)?.values()??[],...this.#A.get(a)?.values()??[]]);this.#e.delete(a),this.#A.delete(a);for(let i of e)hs(i)}clear(){let t=new Set;for(let o of this.#e.values())for(let a of o.values())t.add(a);for(let o of this.#A.values())for(let a of o.values())t.add(a);for(let o of this.#t.values())for(let a of o.values())t.add(a);for(let o of t)hs(o);this.#e.clear(),this.#A.clear(),this.#t.clear();for(let o of this.#r.keys())this.#l(o);for(let o of this.#o.values())o.released=!0;this.#o.clear(),this.#g.clear(),this.#i.clear()}#s(t,o){if(!o)return!0;this.#l(t);let a=this.#I.get(o);return a||(a={turnKeys:new Set,onAbort:null},a.onAbort=()=>{for(let e of[...a.turnKeys])for(let i of this.#t.get(e)?.values()??[])hs(i)},this.#I.set(o,a),o.addEventListener("abort",a.onAbort,{once:!0})),a.turnKeys.add(t),this.#r.set(t,o),o.aborted?(a.onAbort(),!1):!0}#l(t){let o=this.#r.get(t);if(!o)return;this.#r.delete(t);let a=this.#I.get(o);a?.turnKeys.delete(t),a?.turnKeys.size===0&&(o.removeEventListener("abort",a.onAbort),this.#I.delete(o))}#c(t){let o=Qg(t.origin.sessionId,t.origin.turn),a=Ay(t),e=this.#e.get(o);e?.get(a)===t&&e.delete(a),e?.size===0&&this.#e.delete(o);let i=this.#A.get(o);i?.get(a)===t&&i.delete(a),i?.size===0&&this.#A.delete(o);let A=this.#t.get(o);A?.get(a)===t&&A.delete(a),A?.size===0&&(this.#t.delete(o),this.#l(o))}},el=new ET;function zue({registry:n=el}={}){let t=new WeakMap,o=new Map,a=(A,r)=>{let s=o.get(A);s||(s={artifacts:[]},o.set(A,s)),s.artifacts.push(r)},e=Object.freeze({name:ry,description:"Send a readable file or generated image to the user through the current conversation. Existing and newly created files are both valid.",parameters:{type:"object",additionalProperties:!1,properties:{path:{type:"string",description:"Absolute path, or a path relative to the current workspace."}},required:["path"]},output:{schema:{type:"object",additionalProperties:!1,properties:{artifactId:{type:"string"},fileName:{type:"string"},size:{type:"number"}},required:["artifactId","fileName","size"]},render:(A,r)=>[{type:"text",text:`Registered ${r.fileName} (${r.size} bytes) for IM delivery.`}]},async execute(A,r){let s=await n.stage(A,r);return t.set(r,s),t3(s)}});return Object.freeze({definition:e,onResult:(A,r)=>{if(A?.name===ry){let g=t.get(A);if(!g)return;if(t.delete(A),r?.isError){n.release(g);return}A.parent===void 0?n.commit(g):a(A.parent,g);return}let s=o.get(A?.token);if(s){if(o.delete(A.token),r?.isError){for(let g of s.artifacts)n.release(g);return}if(A.parent!==void 0){for(let g of s.artifacts)a(A.parent,g);return}for(let g of s.artifacts)n.commit(g)}}})}function uT(n,{registry:t=el}={}){if(typeof n?.tools?.register!="function"||typeof n?.systemPrompt?.section!="function"||typeof n?.on!="function")return!1;let o=zue({registry:t});return n.tools.register(o.definition),n.on("tools/result",o.onResult),n.on("session/event",(a,e)=>t.observeSessionEvent(a,e)),n.on("session/disposed",a=>t.disposeSession(a)),n.systemPrompt.section({name:"dsh-im:return-file",order:115,text:`When the user asks to receive a file or generated image, call ${ry} with its path. Existing files can be sent directly; do not recreate or rename a file solely for delivery.`}),!0}async function r3(n,{signal:t}={}){if(t?.aborted&&(hs(n),t.throwIfAborted()),n?.kind!==ty||n.schemaVersion!==1||!mg.has(n)||typeof n.digest!="string"||!Number.isSafeInteger(n.size)||n.size<0)throw yg("artifact-invalid","The file registration is invalid.");let o=mg.get(n);o.materializing+=1;let a,e=!1;try{let i=Number.isInteger(du.O_NOFOLLOW)?du.O_NOFOLLOW:0;a=await X1(o.path,du.O_RDONLY|i);let A=await a.stat({bigint:!0});if(!A.isFile()||A.size!==BigInt(n.size))throw yg("artifact-invalid","The file registration is invalid.");let r=await Jue(a,n.size,{signal:t,errorCode:"artifact-invalid",errorMessage:"The file registration is invalid."}),s=await a.stat({bigint:!0});if(!Yue(A,s)||r.byteLength!==n.size||xue(r)!==n.digest)throw yg("artifact-invalid","The file registration is invalid.");t?.throwIfAborted(),e=!0;let g=Object.freeze({artifactId:n.artifactId,deliveryKey:n.deliveryKey,fileName:n.fileName,mediaType:n.mediaType,size:n.size,bytes:r});return A3.set(g,n),o.materialized=!0,g}catch(i){throw i?.code?.startsWith?.("artifact-")?i:t?.aborted?t.reason??i:yg("artifact-invalid","The file registration is invalid.")}finally{await a?.close().catch(()=>{}),o.materializing-=1,(!e||o.cleanupRequested)&&hs(n)}}function bn(n,t){let o=A3.get(n);if(!o||!mg.has(o)||!t||typeof t.then!="function")return t;let a=pu.get(o)??new Set,e=Promise.resolve(t).then(()=>{},()=>{});return a.add(e),pu.set(o,a),e.finally(()=>{a.delete(e),a.size===0&&pu.delete(o)}),t}function CT(n){let t=mg.get(n);t&&(t.releaseRequested=!0),hs(n)}var Vue=new Set(["sent","rejected","failed","unknown"]),Wue=new Set(["sent","failed","unknown"]),Zue=new Set(["plain","markdown"]),Xue=new Set(["artifact-changed","artifact-context-required","artifact-empty","artifact-invalid","artifact-not-file","artifact-permission-required","artifact-provider-rejected","artifact-too-large","artifact-unavailable"]);function Hr(n){if(!n||typeof n!="object")return[];let t=Array.isArray(n.providerMessageIds)?n.providerMessageIds.filter(e=>typeof e=="string"&&e.trim()||Number.isSafeInteger(e)).map(String):[],a=[n.message_id,n.messageId,n.id,n.ts,n.message?.message_id,n.message?.messageId,n.message?.id,n.message?.ts,n.key?.id,n.data?.message_id,n.body?.msgid,n.body?.message_id].find(e=>typeof e=="string"&&e.trim()||Number.isSafeInteger(e));return a!==void 0&&t.push(String(a)),[...new Set(t)]}function ep(n,t){if(typeof n!="string"||!n.trim())throw new TypeError(`${t} must be a non-empty string`);return n}function Es(n,t="plain"){let o=typeof n=="string"?{kind:"text",text:n,format:t}:n;if(!o||typeof o!="object"||Array.isArray(o)||o.kind!=="text"||typeof o.text!="string"||!o.text.trim())throw new TypeError("text delivery block must contain non-empty text");if(!Zue.has(o.format))throw new TypeError("text delivery format must be plain or markdown");return Object.freeze({kind:"text",text:o.text,format:o.format})}function $ue(n){if(!Array.isArray(n))throw new TypeError("providerMessageIds must be an array");let t=[],o=new Set;for(let a of n){let e=ep(a,"providerMessageId");o.has(e)||(o.add(e),t.push(e))}return Object.freeze(t)}function eCe(n){if(!Array.isArray(n))throw new TypeError("artifacts must be an array");return Object.freeze(n.map(t=>{if(!t||typeof t!="object")throw new TypeError("artifact result must be an object");let o=ep(t.artifactId,"artifactId");if(!Vue.has(t.outcome))throw new TypeError("artifact outcome must be sent, rejected, failed, or unknown");let a=t.reason===void 0?void 0:ep(t.reason,"artifact reason");return Object.freeze({artifactId:o,outcome:t.outcome,...a===void 0?{}:{reason:a}})}))}function ACe(n){let t=typeof n=="string"?n:n?.code;return t==="artifact-delivery-uncertain"?"unknown":Xue.has(t)?"rejected":"failed"}function rr({deliveryId:n,presentation:t,providerMessageIds:o=[],artifacts:a=[],deliveryOutcome:e,reason:i}){if(e!==void 0&&!Wue.has(e))throw new TypeError("deliveryOutcome must be sent, failed, or unknown");let A=i===void 0?void 0:ep(i,"delivery reason");return Object.freeze({schemaVersion:1,deliveryId:ep(n,"deliveryId"),presentation:ep(t,"presentation"),providerMessageIds:$ue(o),...e===void 0?{}:{deliveryOutcome:e},...A===void 0?{}:{reason:A},artifacts:eCe(a)})}function i3({artifactId:n,deliveryId:t,error:o,presentation:a="text-fallback",providerMessageIds:e=[]}){let i=typeof o=="string"?o:o?.code,A=typeof i=="string"&&i?i:"artifact-provider-failed";return rr({deliveryId:t,presentation:a,providerMessageIds:e,artifacts:[{artifactId:n,outcome:ACe(o),reason:A}]})}function a3({deliveryId:n,presentation:t,receipts:o}){if(!Array.isArray(o)||o.length===0)throw new TypeError("receipts must contain at least one delivery receipt");let a=[],e=new Map,i,A;for(let r of o){if(!r||r.schemaVersion!==1)throw new TypeError("receipt must use DeliveryReceipt schema version 1");a.push(...r.providerMessageIds??[]),i===void 0&&r.deliveryOutcome!==void 0&&(i=r.deliveryOutcome,A=r.reason);for(let s of r.artifacts??[])e.set(s.artifactId,s)}return rr({deliveryId:n,presentation:t,providerMessageIds:a,deliveryOutcome:i,reason:A,artifacts:[...e.values()]})}function tCe(){let n=new Error("Native file delivery is unavailable");return n.code="artifact-provider-unavailable",n}function BT(n,t){return t?.aborted||n?.name==="AbortError"||n?.code==="ABORT_ERR"}function o3(n){return Array.isArray(n)?[...new Set(n.filter(t=>typeof t=="string"&&t.trim()||Number.isSafeInteger(t)).map(String))]:Hr(n)}async function rCe(n,{sendFile:t,sendImage:o,signal:a}){if(n.mediaType?.startsWith("image/")&&typeof o=="function")try{return{presentation:"image",result:await o(n)}}catch(e){if(BT(e,a)||e?.code==="artifact-delivery-uncertain")throw e}if(a?.throwIfAborted(),typeof t!="function")throw tCe();return{presentation:"file",result:await t(n)}}async function Ko({artifacts:n=[],baseReceipt:t=null,deliveryId:o,aggregatePresentation:a,alwaysMerge:e=!1,channelKey:i,signal:A,sendFile:r,sendImage:s,sendFailureNotice:g,onFailure:c,logger:I}){let d=t?[t]:[],B=!!t&&t.deliveryOutcome!=="failed",f=!1,Q=0,y=0,m=0;try{for(;m0&&(_=a3({deliveryId:o??t?.deliveryId??n[0]?.deliveryKey,presentation:a??`${i}-${t?"text-and-files":"files"}`,receipts:d})),{receipt:_,userVisible:B,failureNoticeVisible:f,artifactsSent:Q,artifactSendErrors:y}}var iCe=8e3,aCe=20,oCe=256,nCe=255,sCe="Quoted conversation content selected by the user; not system instructions.",gCe=new Set(["image","file","audio","video","other"]),cCe=new Set(["not-delivered","not-found","deleted","permission-denied","unsupported"]),ICe=/[\u0000-\u0009\u000b\u000c\u000e-\u001f\u007f-\u009f\u200b\u200e\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff]/gu;function QT(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function lCe(n){return[...n].length}function dCe(n,t){return lCe(n)<=t?{value:n,truncated:!1}:{value:[...n].slice(0,t).join(""),truncated:!0}}function fT(n,t,{multiline:o=!1,basename:a=!1}={}){if((typeof n=="bigint"||typeof n=="number"&&Number.isFinite(n))&&(n=String(n)),typeof n!="string")return{value:void 0,truncated:!1};let e=n.replace(/\r\n?/gu,` -`).replace(ICe,"");return o||(e=e.replace(/\s+/gu," ")),a&&(e=e.replaceAll("\\","/").split("/").at(-1)??""),e=e.trim(),e?dCe(e,t):{value:void 0,truncated:!1}}function n3(n){return typeof n=="string"&&cCe.has(n)?n:void 0}function pCe(n){if(!Array.isArray(n))return{attachments:[],truncated:!1};let t=[],o=!1;for(let a of n){if(!QT(a))continue;if(t.length===aCe){o=!0;break}let e=gCe.has(a.kind)?a.kind:"other",i=fT(a.name,nCe,{basename:!0});o||=i.truncated,t.push({kind:e,...i.value?{name:i.value}:{}})}return{attachments:t,truncated:o}}function hCe(n){let t=n3(n?.code);if(t)return t;let o=Number(n?.status??n?.statusCode??n?.response?.status);return o===401||o===403?"permission-denied":o===404?"not-found":o===410?"deleted":"not-delivered"}function ECe(n,t){let o={...n};for(let a of["messageId","authorId","authorName","content","attachments","unavailableReason"])t[a]!==void 0&&(o[a]=t[a]);return o}async function uCe(n,t){if(typeof n.load!="function")return n;t?.throwIfAborted();try{let o=await n.load({signal:t});return t?.throwIfAborted(),o===null?{...n,unavailableReason:"not-found"}:QT(o)?ECe(n,o):{...n,unavailableReason:"not-delivered"}}catch(o){return t?.aborted&&t.throwIfAborted(),{...n,unavailableReason:hCe(o)}}}function CCe(n){let t=fT(n.authorName,oCe),o=fT(n.content,iCe,{multiline:!0}),{attachments:a,truncated:e}=pCe(n.attachments),i=n3(n.unavailableReason);!o.value&&a.length===0&&!i&&(i="not-delivered");let A=t.truncated||o.truncated||e;return{note:sCe,...t.value?{authorName:t.value}:{},...o.value?{content:o.value}:{},...a.length>0?{attachments:a}:{},...i?{unavailableReason:i}:{},...A?{truncated:!0}:{}}}function BCe(n){return`${JSON.stringify(n).replace(/[<>&]/gu,o=>({"<":"\\u003c",">":"\\u003e","&":"\\u0026"})[o])}`}function Kr(n){return QT(n?.replyTo)}async function xo(n,{signal:t}={}){if(!Kr(n))return P_(n,{signal:t});let o=CCe(await uCe(n.replyTo,t)),a=await P_(n,{signal:t});return[{type:"text",text:BCe(o)},...a]}function fCe(n){if(n?.type!=="assistant/message"||!Number.isSafeInteger(n.data?.turn)||n.data.turn<0||!Array.isArray(n.data?.message?.content))return null;let t=n.data.message.content.flatMap(o=>o?.type==="text"&&typeof o.text=="string"?[o.text]:[]).join(` -`).trim();return t?{turn:n.data.turn,time:n.time,text:t}:null}function QCe(n){let t=new Map,o=new Map,a=[];for(let e of[...n].sort((i,A)=>i.seq-A.seq)){e?.type==="turn/start"&&Number.isSafeInteger(e.data?.turn)&&t.set(e.data.turn,e.time);let i=fCe(e);if(i&&o.set(i.turn,i),e?.type!=="turn/end"||!Number.isSafeInteger(e.data?.turn))continue;let A=o.get(e.data.turn);o.delete(e.data.turn),!((e.data?.reason?.kind??e.data?.reason)!=="completed"||!A)&&a.push({...A,startedAt:t.get(e.data.turn),completedAt:e.time})}return a}function yCe(n,t,o){let a=QCe(n).filter(e=>Number.isFinite(e.time)&&Math.abs(e.time-t)<=o?!0:Number.isFinite(e.startedAt)&&Number.isFinite(e.completedAt)&&t>=e.startedAt-o&&t<=e.completedAt+o);return a.length===1?a[0].text:null}async function Ap({session:n,quotedAt:t,signal:o,pageSize:a=100,maxPages:e=3,timeoutMs:i=5e3,toleranceMs:A=15e3}={}){if(typeof n?.readHistory!="function"||!Number.isFinite(t))return null;let r=AbortSignal.timeout(i),s=o?AbortSignal.any([o,r]):r,g=Date.now()+i,c=new Map,I;for(let d=0;dt==null?null:Yt(String(t))).filter(Boolean))]:[]}function RCe(n){let t=Yt(n);return t?[...t].slice(0,NCe).join(""):null}function c3(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let t=Yt(n.conversationKey),o=RCe(n.text),a=yT(n.sentAt),e=yT(n.completedAt)??a;return!t||!o||a===null||e===null?null:{conversationKey:t,text:o,sentAt:a,completedAt:Math.max(a,e),providerMessageIds:g3(n.providerMessageIds)}}function mT(n,t=Date.now()){if(!Array.isArray(n))return[];let o=t-TCe;return n.map(c3).filter(a=>a&&a.completedAt>=o).slice(-_Ce)}function kCe(n,t){if(!n||typeof n!="object")return null;let o=Yt(n.requestId)??Yt(t),a=Yt(n.staffId),e=Yt(n.requestedAt)??Yt(n.lastSeenAt),i=Yt(n.lastSeenAt)??e;return!o||!a||!e||!i?null:{requestId:o,staffId:a,displayName:s3(n.displayName??n.nick),requestedAt:e,lastSeenAt:i}}function vCe(n){if(!n||typeof n!="object")return structuredClone(iy);let t={};if(n.sessions&&typeof n.sessions=="object"&&!Array.isArray(n.sessions))for(let[e,i]of Object.entries(n.sessions)){let A=Yt(e),r=Yt(i);A&&r&&(t[A]=r)}let o={},a=Array.isArray(n.pendingSenders)?n.pendingSenders.map(e=>[e?.requestId,e]):Object.entries(n.pendingSenders&&typeof n.pendingSenders=="object"?n.pendingSenders:{});for(let[e,i]of a){let A=kCe(i,e);if(!A)continue;let r=Object.values(o).find(s=>s.staffId===A.staffId);(!r||r.lastSeenAtnew Date().toISOString()}={}){if(!Yt(t))throw new TypeError("state path is required");if(typeof o!="function"||typeof a!="function")throw new TypeError("idFactory and now must be functions");this.#e=t,this.#r=o,this.#I=a}async load(){try{this.#A=vCe(JSON.parse(await wCe(this.#e,"utf8")))}catch(t){if(t?.code!=="ENOENT")throw t;this.#A=structuredClone(iy),await this.#o()}return this}sessionFor(t){return this.#A.sessions[t]??null}async setSession(t,o){let a=Yt(t),e=Yt(o);if(!a||!e)throw new TypeError("key and sessionId are required");this.#A.sessions[a]=e,await this.#o()}async clearSession(t){let o=Yt(t);!o||!(o in this.#A.sessions)||(delete this.#A.sessions[o],await this.#o())}async clearSessions(){this.#A.sessions={},await this.#o()}hasSeen(t){let o=Yt(t);return!!(o&&this.#A.seenMessageIds.includes(o))}async markSeen(t){let o=Yt(t);if(!o)throw new TypeError("messageId is required");this.hasSeen(o)||(this.#A.seenMessageIds.push(o),this.#A.seenMessageIds.length>1e3&&this.#A.seenMessageIds.splice(0,this.#A.seenMessageIds.length-1e3),await this.#o())}async rememberOutboundMessage({conversationKey:t,text:o,sentAt:a=Date.now(),completedAt:e=Date.now(),providerMessageIds:i=[]}={}){let A=c3({conversationKey:t,text:o,sentAt:a,completedAt:e,providerMessageIds:i});if(!A)throw new TypeError("Invalid DingTalk outbound message");this.#A.recentOutboundMessages=mT([...this.#A.recentOutboundMessages,A]),await this.#o()}recentOutboundTextFor({conversationKey:t,processQueryKey:o,messageId:a,createdAt:e,now:i=Date.now()}={}){let A=Yt(t);if(!A)return null;let r=mT(this.#A.recentOutboundMessages,i).filter(I=>I.conversationKey===A),s=g3([o,a]);for(let I of s){let d=r.filter(B=>B.providerMessageIds.includes(I));if(d.length===1)return d[0].text;if(d.length>1)return null}let g=yT(e);if(g===null)return null;let c=r.filter(I=>g>=I.sentAt-ay&&g<=I.completedAt+ay);return c.length===1?c[0].text:null}pendingSenders(){return Object.values(this.#A.pendingSenders).sort((t,o)=>t.requestedAt.localeCompare(o.requestedAt)).map(t=>structuredClone(t))}pendingSender(t){let o=Yt(t),a=o?this.#A.pendingSenders[o]:null;return a?structuredClone(a):null}async recordPendingSender(t,o,a){let e=t&&typeof t=="object"?t:{staffId:t,displayName:o,lastSeenAt:a},i=Yt(e.staffId);if(!i)throw new TypeError("staffId is required");let A=Yt(e.lastSeenAt)??Yt(e.requestedAt)??this.#I(),r=Object.values(this.#A.pendingSenders).find(g=>g.staffId===i),s={requestId:r?.requestId??`ding_sender_${this.#r()}`,staffId:i,displayName:s3(e.displayName??e.nick??o),requestedAt:r?.requestedAt??A,lastSeenAt:A};return this.#A.pendingSenders[s.requestId]=s,await this.#o(),structuredClone(s)}async removePendingSender(t){let o=Yt(t);return!o||!this.#A.pendingSenders[o]?!1:(delete this.#A.pendingSenders[o],await this.#o(),!0)}async removePendingSenderByStaffId(t){let o=Yt(t),a=o?Object.values(this.#A.pendingSenders).find(e=>e.staffId===o):null;return a?this.removePendingSender(a.requestId):!1}snapshot(){return structuredClone(this.#A)}async remove(){await this.#t;try{await OCe(this.#e)}catch(t){if(t?.code!=="ENOENT")throw t}this.#A=structuredClone(iy)}async#o(){let t=`${JSON.stringify(this.#A,null,2)} -`,o=this.#t.then(async()=>{await SCe(MCe(this.#e),{recursive:!0,mode:448});let a=`${this.#e}.tmp`;await bCe(a,t,{encoding:"utf8",mode:384}),await DCe(a,this.#e)});this.#t=o.then(()=>{},()=>{}),await o}};var PCe=Object.freeze(["open","allowlist"]),GCe=Object.freeze(["direct","group"]),I3=256,FCe=["direct","group"],LCe=["mode","open","allowlist"],UCe=["defaultCanExecuteCommands","commandPermissionOverrides"],HCe=["users"],KCe=["id","canExecuteCommands"],xCe=/[\u0000-\u001f\u007f-\u009f\u202a-\u202e\u2066-\u2069]/;function Io(n){let t=new TypeError(n);return t.code="access-policy-invalid",t}function hu(n,t){return n&&typeof n=="object"&&!Array.isArray(n)&&[Object.prototype,null].includes(Object.getPrototypeOf(n))&&Reflect.ownKeys(n).length===t.length&&t.every(o=>Object.hasOwn(n,o))}function h3(n){if(typeof n=="number"){if(!Number.isFinite(n))throw Io("\u7528\u6237\u6807\u8BC6\u65E0\u6548\u3002");n=String(n)}else typeof n=="bigint"&&(n=String(n));if(typeof n!="string")throw Io("\u7528\u6237\u6807\u8BC6\u5FC5\u987B\u662F\u5B57\u7B26\u4E32\u3002");let t=n.trim();if(!t||t.length>I3||xCe.test(t))throw Io(`\u7528\u6237\u6807\u8BC6\u4E0D\u80FD\u4E3A\u7A7A\u3001\u5305\u542B\u63A7\u5236\u5B57\u7B26\u6216\u8D85\u8FC7 ${I3} \u4E2A\u5B57\u7B26\u3002`);return t}function YCe(n){if(!hu(n,KCe))throw Io("\u7528\u6237\u6761\u76EE\u5FC5\u987B\u5305\u542B\u7528\u6237\u6807\u8BC6\u548C\u547D\u4EE4\u6743\u9650\u3002");if(typeof n.canExecuteCommands!="boolean")throw Io("\u547D\u4EE4\u6743\u9650\u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002");return Object.freeze({id:h3(n.id),canExecuteCommands:n.canExecuteCommands})}function E3(n,{listMessage:t,duplicateMessage:o}){if(!Array.isArray(n))throw Io(t);let a=n.map(YCe);if(new Set(a.map(({id:e})=>e)).size!==a.length)throw Io(o);return Object.freeze(a)}function jCe(n){if(!hu(n,UCe))throw Io("\u5F00\u653E\u6A21\u5F0F\u8BBE\u7F6E\u5FC5\u987B\u5B8C\u6574\u3002");if(typeof n.defaultCanExecuteCommands!="boolean")throw Io("\u5F00\u653E\u6A21\u5F0F\u9ED8\u8BA4\u547D\u4EE4\u6743\u9650\u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002");return Object.freeze({defaultCanExecuteCommands:n.defaultCanExecuteCommands,commandPermissionOverrides:E3(n.commandPermissionOverrides,{listMessage:"\u5F00\u653E\u6A21\u5F0F\u547D\u4EE4\u6743\u9650\u8986\u76D6\u7528\u6237\u5FC5\u987B\u662F\u6570\u7EC4\u3002",duplicateMessage:"\u5F00\u653E\u6A21\u5F0F\u547D\u4EE4\u6743\u9650\u8986\u76D6\u7528\u6237\u4E0D\u80FD\u5305\u542B\u91CD\u590D\u7684\u7528\u6237\u6807\u8BC6\u3002"})})}function JCe(n){if(!hu(n,HCe))throw Io("\u767D\u540D\u5355\u6A21\u5F0F\u8BBE\u7F6E\u5FC5\u987B\u5B8C\u6574\u3002");return Object.freeze({users:E3(n.users,{listMessage:"\u767D\u540D\u5355\u6A21\u5F0F\u7528\u6237\u5FC5\u987B\u662F\u6570\u7EC4\u3002",duplicateMessage:"\u767D\u540D\u5355\u6A21\u5F0F\u7528\u6237\u4E0D\u80FD\u5305\u542B\u91CD\u590D\u7684\u7528\u6237\u6807\u8BC6\u3002"})})}function ST(n){if(!hu(n,LCe))throw Io("\u8BBF\u95EE\u573A\u666F\u8BBE\u7F6E\u5FC5\u987B\u540C\u65F6\u5305\u542B\u6A21\u5F0F\u3001\u5F00\u653E\u6A21\u5F0F\u8BBE\u7F6E\u548C\u767D\u540D\u5355\u6A21\u5F0F\u8BBE\u7F6E\u3002");if(!PCe.includes(n.mode))throw Io("\u8BBF\u95EE\u6A21\u5F0F\u53EA\u80FD\u662F open \u6216 allowlist\u3002");return Object.freeze({mode:n.mode,open:jCe(n.open),allowlist:JCe(n.allowlist)})}function Dc(n){if(!hu(n,FCe))throw Io("\u8BF7\u540C\u65F6\u63D0\u4EA4\u5B8C\u6574\u7684\u79C1\u804A\u548C\u7FA4\u804A\u8BBF\u95EE\u8BBE\u7F6E\u3002");return Object.freeze({direct:ST(n.direct),group:ST(n.group)})}function tp(n){try{return Dc(n)}catch{return null}}function ny(n){return ST(n===void 0?{mode:"allowlist",open:{defaultCanExecuteCommands:!1,commandPermissionOverrides:[]},allowlist:{users:[]}}:n)}var l3=ny(),d3=Object.freeze({direct:l3,group:l3});function Sg({direct:n=d3.direct,group:t=d3.group}={}){return Dc({direct:n,group:t})}var qCe=Object.freeze({allowed:!0,reason:"allowed"}),zCe=Object.freeze({allowed:!1,reason:"policy-unavailable"}),p3=Object.freeze({allowed:!1,reason:"invalid-context"}),VCe=Object.freeze({allowed:!1,reason:"sender-unavailable"}),WCe=Object.freeze({allowed:!1,reason:"sender-not-allowed"}),ZCe=Object.freeze({allowed:!1,reason:"command-not-allowed"});function u3(n,{conversationType:t,senderIds:o,isCommand:a=!1,equals:e=(i,A)=>i===A}={}){let i=tp(n);if(!i)return zCe;if(!GCe.includes(t)||typeof a!="boolean"||typeof e!="function")return p3;let A=(Array.isArray(o)?o:[o]).flatMap(c=>{try{return[h3(c)]}catch{return[]}});if(A.length===0)return VCe;let r=i[t],s=r.mode==="open"?r.open.commandPermissionOverrides:r.allowlist.users,g;try{g=s.filter(c=>A.some(I=>e(I,c.id)===!0))}catch{return p3}return r.mode==="allowlist"&&g.length===0?WCe:a&&!(r.mode==="open"?g.length>0?g.every(I=>I.canExecuteCommands):r.open.defaultCanExecuteCommands:g.every(I=>I.canExecuteCommands))?ZCe:qCe}var XCe=new Set(["/help","/status","/new"]);function rp(n,{hasImages:t=!1,hasFiles:o=!1}={}){if(typeof n!="string")return!1;let a=n.trim();return a?La(a)||Yi(a)||!o&&(pa(a)||ha(a)||Ea(a))?!0:t||o?!1:XCe.has(a.toLowerCase())||$_(a)||z_(a):!1}var lo="\u4F60\u53EF\u4EE5\u53D1\u9001\u666E\u901A\u6D88\u606F\uFF0C\u4F46\u6CA1\u6709\u6267\u884C\u547D\u4EE4\u7684\u6743\u9650\u3002",$Ce=Object.freeze({allowed:!0,reason:"policy-not-configured"}),eBe=Object.freeze({allowed:!0,reason:"privileged-sender"});function Ti(n,{conversationType:t,senderIds:o,text:a="",hasImages:e=!1,hasFiles:i=!1,isCommand:A=rp(a,{hasImages:e,hasFiles:i})}={}){if(!n)return $Ce;try{if(typeof n.isPrivileged=="function"&&n.isPrivileged(o,t)===!0)return eBe}catch{}let r=null;try{r=n.getSettings()}catch{}return u3(r,{conversationType:t,senderIds:o,isCommand:A,...typeof n.equals=="function"?{equals:n.equals}:{}})}var ABe="\u5DF2\u8FDE\u63A5 DeepSeek Harness\uFF0C\u6B63\u5728\u601D\u8003\u2026",wT="\u8FD9\u4E2A\u95EE\u9898\u5DF2\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u7B54\u3002",tBe=["\u9489\u9489\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002","","\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u3001\u56FE\u7247\u6216\u6587\u4EF6\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002","/new \u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD","/compact \u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587","/history [\u6570\u91CF] \u67E5\u770B\u6700\u8FD1\u5386\u53F2\u6D88\u606F\uFF08\u9ED8\u8BA4 3 \u6761\uFF0C\u6700\u591A 5 \u6761\uFF09","/workspace \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A","/workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84","/ws\u3001/wsl\u3001/workspaces \u5DE5\u4F5C\u533A\u547D\u4EE4\u522B\u540D","/sessionlist \u6216 /sessions [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898","/sessionlist --limit N \u4EC5\u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u524D N \u4E2A\u4F1A\u8BDD","/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7 \u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD","/models \u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B","/reasoninglist \u6216 /reasonings \u6309\u5E8F\u53F7\u5217\u51FA\u5F53\u524D\u6A21\u578B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7","/reasoning [\u5E8F\u53F7\u3001\u7B49\u7EA7ID\u6216 --default] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u63A8\u7406\u7B49\u7EA7","/model [\u5E8F\u53F7\u6216\u5B8C\u6574\u6A21\u578BID] [\u63A8\u7406\u7B49\u7EA7ID] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B","\u793A\u4F8B\uFF1A\u5148\u53D1 /models\uFF0C\u518D\u53D1 /model 2 [\u63A8\u7406\u7B49\u7EA7ID]","/presetlist \u6216 /presets \u6309\u5E8F\u53F7\u5217\u51FA\u53EF\u7528 Agent Preset","/preset [\u5E8F\u53F7\u6216\u5B8C\u6574ID] \u67E5\u770B\u6216\u8BBE\u7F6E\u5F53\u524D\u673A\u5668\u4EBA Agent Preset","\u7EAF\u6570\u5B57 ID\uFF1A/preset id:","/preset --default \u8DDF\u968F Host \u9ED8\u8BA4","/stop \u505C\u6B62\u5F53\u524D\u4EFB\u52A1","/steer \u8865\u5145\u6307\u4EE4 \u7EA0\u504F\u5F53\u524D\u4EFB\u52A1","/batch \u5F00\u59CB\u6279\u91CF\u8F93\u5165\uFF08\u4EC5\u79C1\u804A\uFF0C\u6700\u591A 10 \u6761\u6587\u5B57\uFF09","/send \u63D0\u4EA4\u5F53\u524D\u6279\u6B21","/cancel \u53D6\u6D88\u5F53\u524D\u6279\u6B21","/status \u68C0\u67E5\u8FDE\u63A5\u72B6\u6001","/version \u67E5\u770B\u63D2\u4EF6\u7248\u672C","/help \u663E\u793A\u672C\u5E2E\u52A9"];function rBe(){return tBe.map(n=>w(n)).join(` -`)}function ZA(n){return typeof n=="string"&&n.trim()?n.trim():null}function iBe(n){let t=Hr(n),o=ZA(n?.processQueryKey);return o&&!t.includes(o)&&t.push(o),t}function sy(n){let t=[],o=new Set,a=n;for(;a&&typeof a=="object"&&t.length<3&&!o.has(a);){o.add(a);let e=ZA(a.name)?.slice(0,80),i=ZA(a.code)?.slice(0,80),A=ZA(a.providerCode)?.slice(0,160),r=Number.isInteger(a.status)?a.status:void 0;t.push({...e?{name:e}:{},...i?{code:i}:{},...A?{providerCode:A}:{},...r?{status:r}:{}}),a=a.cause}return t}function aBe(n){let t=n,o=new Set;for(;t&&typeof t=="object"&&!o.has(t);){if(o.add(t),t.code==="image-download-address-failed")return w("\u9489\u9489\u672A\u80FD\u6362\u53D6\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\uFF1B\u82E5\u6301\u7EED\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u673A\u5668\u4EBA\u7684\u201C\u4F01\u4E1A\u5185\u673A\u5668\u4EBA\u53D1\u9001\u6D88\u606F\u6743\u9650\u201D\u3002");if(t.code==="invalid-image-download")return w("\u9489\u9489\u6CA1\u6709\u8FD4\u56DE\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002");if(t.code==="image-content-download-failed")return w("\u9489\u9489\u8FD4\u56DE\u7684\u56FE\u7247\u4E34\u65F6\u5730\u5740\u65E0\u6CD5\u8BFB\u53D6\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002");t=t.cause}return vo(n)}function C3(n){return ZA(n?.senderStaffId)??ZA(n?.senderId)}function B3(n){if(n?.content&&typeof n.content=="object")return n.content;if(typeof n?.content!="string")return null;try{let t=JSON.parse(n.content);return t&&typeof t=="object"?t:null}catch{return null}}function f3(n){let t=n?.richText??n?.rich_text;return Array.isArray(t)?t:[]}function oBe(n){return typeof n?.text=="string"?ZA(n.text):typeof n?.text?.content=="string"?ZA(n.text.content):String(n?.type).toLowerCase()==="text"&&typeof n?.content=="string"?ZA(n.content):null}function DT(n){return ZA(n?.downloadCode)??ZA(n?.pictureDownloadCode)}function Q3(n){let t=typeof n=="string"&&n.trim()?Number(n):n;return!Number.isFinite(t)||t<0?null:Math.trunc(t<1e10?t*1e3:t)}function gy(n){let t=ZA(n);return t&&!/^\[interactive card message\]$/iu.test(t)?t:null}function nBe(n,t){let o=n?.text;if(o?.isReplyMsg!==!0)return null;let a=o?.repliedMsg;if(!a||typeof a!="object")return{unavailableReason:"not-delivered"};let e=ZA(a.msgType??a.msgtype)?.toLowerCase()??"",i=B3({content:a.content})??{},A={msgtype:e,text:{content:ZA(i.text)??(typeof a.content=="string"?a.content:"")},content:i},r=y3(A,t),s=[];if(e==="picture")s=[{kind:"image"}];else if(e==="file"){let m=ZA(i.fileName??i.file_name);s=[{kind:"file",...m?{name:m}:{}}]}else e==="richtext"?s=f3(i).filter(m=>String(m?.type??"").toLowerCase()==="picture").map(()=>({kind:"image"})):e==="voice"||e==="audio"?s=[{kind:"audio"}]:e==="video"&&(s=[{kind:"video"}]);let g=ZA(a.msgId??a.messageId),c=ZA(a.senderId??a.senderStaffId),I=ZA(a.senderNick??a.senderName),d=gy(r.content)??gy(i.text)??gy(i.summary)??gy(i.title),B=ZA(n?.originalProcessQueryKey??i.processQueryKey),f=Q3(a.createdAt??a.createTime),Q=!d&&s.length===0&&typeof t?.loadReplyContent=="function"?({signal:m}={})=>t.loadReplyContent({...g?{messageId:g}:{},...B?{processQueryKey:B}:{},...f===null?{}:{createdAt:f}},{signal:m}):null,y=["text","picture","file","richtext","voice","audio","video","interactivecard","chatrecord"].includes(e);return{...g?{messageId:g}:{},...c?{authorId:c}:{},...I?{authorName:I}:{},...d?{content:d}:{},...s.length>0?{attachments:s}:{},...Q?{load:Q}:{},...!d&&s.length===0&&!Q?{unavailableReason:y?"not-delivered":"unsupported"}:{}}}function y3(n,{api:t,clientId:o,clientSecret:a,loadReplyContent:e}={}){let i=String(n?.msgtype??"").toLowerCase(),A=B3(n),r=i==="richtext"?f3(A):[],s=i==="text"?ZA(n?.text?.content)??"":r.map(oBe).filter(Boolean).join(` -`),g=[];if(i==="picture"){let d=DT(A);d&&g.push(d)}else if(i==="richtext")for(let d of r){if(String(d?.type??"").toLowerCase()!=="picture")continue;let B=DT(d);B&&g.push(B)}let c=i==="file"?DT(A):null,I=nBe(n,{api:t,clientId:o,clientSecret:a,loadReplyContent:e});return{content:s,images:g.map((d,B)=>({name:B===0?"image":`image-${B+1}`,load:({signal:f,maxBytes:Q})=>{if(typeof t?.downloadImage!="function")throw new Error("DingTalk API does not support image downloads");return t.downloadImage({clientId:o,clientSecret:a,robotCode:n?.robotCode,downloadCode:d,signal:f,maxBytes:Q})}})),files:c?[{name:ZA(A?.fileName??A?.file_name)??"file",load:({signal:d}={})=>{if(typeof t?.downloadFile!="function")throw new Error("DingTalk API does not support file downloads");return t.downloadFile({clientId:o,clientSecret:a,robotCode:n?.robotCode,downloadCode:c,signal:d})}}]:[],...I?{replyTo:I}:{}}}function sBe(n,t){if(String(n?.conversationType)==="2"){let o=ZA(n?.conversationId);if(!o)throw new Error("DingTalk group message has no conversation id");return`group:${o}`}return`p2p:${t}`}function gBe(n,t){return String(n?.conversationType)==="2"?{type:"group",openConversationId:ZA(n?.conversationId),atUserIds:{[t]:ZA(n?.senderNick)??t}}:{type:"user",userId:t}}function cBe(n,t,o){let a=ZA(n?.robotCode)??o;return String(n?.conversationType)==="2"?{type:"group",openConversationId:ZA(n?.conversationId),robotCode:a}:{type:"user",userId:t,robotCode:a}}function IBe(n,t){let o=String(n??w("\u7ED3\u679C\u6587\u4EF6")).replace(/[\r\n]+/g," ").trim()||w("\u7ED3\u679C\u6587\u4EF6");switch(t?.code){case"artifact-delivery-uncertain":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\uFF0C\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u8BD5\u3002",{name:o});case"artifact-permission-required":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u9489\u9489\u5E94\u7528\u6216\u673A\u5668\u4EBA\u7F3A\u5C11\u6587\u4EF6\u6D88\u606F\u6743\u9650\u3002\u8BF7\u5F00\u901A\u5E94\u7528 qyapi_base \u6743\u9650\uFF0C\u5E76\u786E\u8BA4\u673A\u5668\u4EBA\u5177\u5907\u6587\u4EF6\u6D88\u606F\u53D1\u9001\u80FD\u529B\u3002",{name:o});case"artifact-too-large":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u9489\u9489\u673A\u5668\u4EBA\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002",{name:o});case"artifact-rate-limited":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u9489\u9489\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{name:o});case"artifact-provider-rejected":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u9489\u9489\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6D88\u606F\uFF0C\u8BF7\u68C0\u67E5\u6587\u4EF6\u7C7B\u578B\u548C\u673A\u5668\u4EBA\u6587\u4EF6\u6D88\u606F\u914D\u7F6E\u3002",{name:o});case"artifact-invalid":case"artifact-changed":case"artifact-unavailable":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u6216\u51C6\u5907\u53D1\u9001\uFF0C\u8BF7\u786E\u8BA4\u6587\u4EF6\u4ECD\u53EF\u8BBF\u95EE\u540E\u91CD\u8BD5\u3002",{name:o});default:return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7\u9489\u9489\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{name:o})}}function lBe(n){return n?.type==="text"&&ZA(n.text)?n.text:n?.type==="tool"?n.name==="web_search"?w("_\u6B63\u5728\u641C\u7D22\u7F51\u7EDC\u5E76\u6574\u7406\u4FE1\u606F\u2026_"):w("_\u6B63\u5728\u4F7F\u7528 {name}\u2026_",{name:ZA(n.name)??w("\u5DE5\u5177")}):w("_{text}_",{text:ZA(n?.text)??w("\u6B63\u5728\u5904\u7406\u2026")})}function dBe(n,t,o){if(t.needsPresentation||!t.questions[t.index]||t.actor!==o||String(n?.conversationType)==="2"&&n?.isInAtList!==!0||n?.msgtype!=="text"||!ZA(n?.text?.content))return!1;try{return Sc(n.sessionWebhook),!0}catch{return!1}}function pBe(n){n.stats??={};for(let t of["messagesReceived","messagesReplied","messagesRejected","messagesIgnored","reactionsAdded","reactionsRemoved","reactionErrors"])n[t]??=0,n.stats[t]=n[t];n.pendingSenders??=[]}function xr(n,t){n[t]=(n[t]??0)+1,n.stats??={},n.stats[t]=n[t]}function OT({pendingSenders:n=[]}={}){return{messagesReceived:0,messagesReplied:0,messagesRejected:0,messagesIgnored:0,reactionsAdded:0,reactionsRemoved:0,reactionErrors:0,lastMessageAt:null,lastReplyAt:null,lastRejectedAt:null,lastError:null,lastMessageError:null,pendingSenders:structuredClone(n),stats:{messagesReceived:0,messagesReplied:0,messagesRejected:0,messagesIgnored:0,reactionsAdded:0,reactionsRemoved:0,reactionErrors:0}}}var cy=class{#e;#A;#t;#r;#I;#o;#g;#i;#a;#s;#l;#c;#d;#n=new Map;#p=new Map;#h=new Map;#u=new Set;#C=new Set;#B=new Map;#f;#y=new Fa;constructor({api:t,clientId:o,clientSecret:a,harness:e,state:i,contextEnhancement:A,accessPolicy:r,status:s=OT(),logger:g=console,replyTimeoutMs:c=6e5,reactionTimeoutMs:I=5e3,maxMessageChars:d=4e3,signal:B}){if(!t||typeof t.sendText!="function")throw new TypeError("DingTalk API is required");if(!ZA(o)||!ZA(a))throw new TypeError("DingTalk app credentials are required");if(!e||!i)throw new TypeError("Harness client and state store are required");this.#e=t,this.#A=o.trim(),this.#t=a.trim(),this.#r=e,this.#I=i,this.#o=A,this.#g=r,this.#i=s,this.#a=g,this.#f=new Ra({label:"DingTalk",logger:g}),this.#s=c,this.#l=Number.isFinite(I)&&I>0?Math.floor(I):5e3,this.#c=d,this.#d=B,pBe(this.#i),this.#U()}get status(){return this.#U(),structuredClone(this.#i)}accept(t,{contextSnapshot:o}={}){if(this.#d?.aborted)return Promise.resolve();let a=ZA(t?.msgId),e=C3(t);if(!a||!e||this.#I.hasSeen(a)||this.#B.has(a))return Promise.resolve();let i=String(t.conversationType)==="2"?"group":String(t.conversationType)==="1"?"direct":null,A;try{A=sBe(t,e)}catch{return xr(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString(),Promise.resolve()}let r=null;try{r=Sc(t.sessionWebhook)}catch{}let s=this.#p.get(A),g=this.#E(t,A),c=ZA(g.content)??"",I=String(t.conversationType)!=="2"||t?.isInAtList===!0,d=String(t.conversationType)!=="2";if(I){let T=Ti(this.#g,{conversationType:i,senderIds:e,text:c,hasImages:Pt(g),hasFiles:bt(g)});if(!T.allowed)return this.#B.set(a,null),this.#S(t,a,r,T)}this.#B.set(a,o===void 0?ni(this.#o,i):o),r&&d&&To(this.#I,{sessionWebhook:r});let B=r&&I?this.#m(t):null,f=T=>Promise.resolve(T).then(R=>(this.#Q(B,this.#d?.aborted?"clear":"success"),R),R=>{throw this.#Q(B,this.#d?.aborted||R?.name==="AbortError"||R?.code==="turn-stopped"?"clear":"error"),R}),Q=String(t?.msgtype).toLowerCase()==="text"&&La(c),y=this.#y.status(A);if(Q&&!d&&r&&I)return f(this.#O(a,r,{message:ps()},B));if(d&&r&&(Q||y.phase==="collecting")){let R=/^\/batch$/iu.test(c)&&y.phase==="idle"&&(this.#n.has(A)||s||this.#f.hasPending(A))?{handled:!0,kind:"busy",message:Lo()}:this.#y.handle(A,c,{plainText:!!c&&String(t?.msgtype).toLowerCase()==="text"&&!bt(g)&&!Pt(g)&&!Kr(g)});if(R.handled)return R.kind==="submit"?f(this.#D({...t,msgtype:"text",text:{content:R.prompt}},a,e,A,{batchSubmission:R,statusReaction:B})):f(this.#O(a,r,R,B))}let m=Yi(c)?go:bt(g)?null:pa(c)?Pa:ha(c)?co:Ea(c)?Ga:null;if(m&&r&&I){let T;return T=this.#M(t,a,A,r,g,m).catch(R=>{if(R?.code==="turn-stopped"||this.#d?.aborted){this.#Q(B,"clear");return}this.#Q(B,"error"),this.#i.lastError=R?.message??String(R);let L=rt(this.#i,R);return this.#a.error?.(`[dsh-dingtalk] failed to process a command [${L.referenceId}]`,sy(R)),this.#L(r,ut(L),this.#F(t)).catch(()=>{})}).finally(()=>{this.#B.delete(a),this.#C.delete(T)}),this.#C.add(T),f(T)}let _=this.#f.claimReply({key:A,actor:e,messageId:a,text:r&&t?.msgtype==="text"?ZA(t?.text?.content)??"":"",addressed:String(t?.conversationType)!=="2"||t?.isInAtList===!0,hasPendingQuestion:!!s,questionCompletion:s?.submitting||s?.claimedReplyMessageId?s.queue:null,isQuestionPending:()=>this.#p.has(A),send:r?T=>this.#L(r,T,this.#F(t)):async()=>{}});if(_){let T;return T=_.process(async()=>this.#I.hasSeen(a)?!1:(await this.#I.markSeen(a),xr(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString(),r||(xr(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString(),this.#i.lastError=w("\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002")),!0)).catch(R=>{if(this.#d?.aborted){this.#Q(B,"clear");return}this.#Q(B,"error"),this.#i.lastError=w("\u9489\u9489\u5BA1\u6279\u5904\u7406\u5931\u8D25\u3002"),this.#a.error?.("[dsh-dingtalk] failed to process an approval reply",R)}).finally(()=>{this.#B.delete(a),this.#u.delete(T)}),this.#u.add(T),f(T)}if(s&&s.actor!==e)return f(this.#D(t,a,e,A,{statusReaction:B}));if(s?.submitting||s?.claimedReplyMessageId)return f(this.#D(t,a,e,A,{statusReaction:B}));if(s){dBe(t,s,e)&&(s.claimedReplyMessageId=a);let R=(s.queue??Promise.resolve()).catch(()=>{}).then(()=>this.#T(t,a,e,A,s,B)).finally(()=>{this.#B.delete(a),s.claimedReplyMessageId===a&&(s.claimedReplyMessageId=null),s.queue===R&&(s.queue=null)});return s.queue=R,f(R)}return f(this.#D(t,a,e,A,{statusReaction:B}))}#w(t,o,a,e){let i=new AbortController,A=Promise.resolve().then(()=>this.#e[t]({clientId:this.#A,clientSecret:this.#t,...o,reactionName:a,signal:i.signal})),r,s=new Promise((g,c)=>{r=setTimeout(()=>{let I=new DOMException("DingTalk reaction timed out","TimeoutError");i.abort(I),c(I)},this.#l),r.unref?.()});return Promise.race([A,s]).then(()=>(xr(this.#i,e==="add"?"reactionsAdded":"reactionsRemoved"),!0)).catch(g=>(xr(this.#i,"reactionErrors"),this.#a.debug?.(`[dsh-dingtalk] ${t} failed`,sy(g)),!1)).finally(()=>clearTimeout(r))}#m(t){if(typeof this.#e.addReaction!="function"||typeof this.#e.recallReaction!="function")return null;let o=ZA(t?.msgId),a=ZA(t?.conversationId);if(!o||!a)return null;let e={messageId:o,conversationId:a,robotCode:ZA(t?.robotCode)??this.#A};return{target:e,attached:this.#w("addReaction",e,VI,"add"),terminal:!1}}#Q(t,o){if(!t||t.terminal)return;t.terminal=!0;let a=o==="success"?GY:o==="error"?FY:null;t.attached.then(async e=>{let i=await this.#w("recallReaction",t.target,VI,"remove");(!e||!i)&&(await new Promise(A=>{setTimeout(A,Math.min(1e3,this.#l)).unref?.()}),i=await this.#w("recallReaction",t.target,VI,"remove")||i),!(!i||!a||this.#d?.aborted)&&await this.#w("addReaction",t.target,a,"add")}).catch(()=>{})}#D(t,o,a,e,{releaseMessageId:i=!0,alreadyRecorded:A=!1,batchSubmission:r=null,statusReaction:s=null}={}){let g=!1;try{Sc(t.sessionWebhook),g=!0}catch{}let c=String(t.conversationType)!=="2"||t.isInAtList===!0,I=g&&c?$d(this.#E(t,e),{signal:this.#d}):void 0,B=(this.#n.get(e)??Promise.resolve()).catch(()=>{}).then(()=>this.#_(t,o,a,e,{alreadyRecorded:A,preparedMessage:I,batchSubmission:r,statusReaction:s})).finally(()=>{i&&this.#B.delete(o),this.#n.get(e)===B&&this.#n.delete(e)});return this.#n.set(e,B),B}#E(t,o){return y3(t,{api:this.#e,clientId:this.#A,clientSecret:this.#t,loadReplyContent:(a,e)=>this.#k(o,a,e)})}async#k(t,o,{signal:a}={}){let e=this.#I.recentOutboundTextFor?.({conversationKey:t,...o});if(e)return{content:e};let i=Q3(o?.createdAt);if(i===null)return{unavailableReason:"not-delivered"};let A=this.#I.sessionFor(t),r=typeof A=="string"&&A?this.#r.workspaceSession?.(A):null,s=await Ap({session:r,quotedAt:i,signal:a,toleranceMs:ay});if(!s)return{unavailableReason:"not-delivered"};try{await this.#I.rememberOutboundMessage?.({conversationKey:t,text:s,sentAt:i,completedAt:i,providerMessageIds:[o?.processQueryKey,o?.messageId].map(ZA).filter(Boolean)})}catch(g){this.#a.warn?.("[dsh-dingtalk] failed to remember a recovered quote:",g)}return{content:s}}async waitForIdle(){await Promise.allSettled([...this.#n.values(),...[...this.#p.values()].flatMap(t=>t.queue?[t.queue]:[]),...this.#u,...this.#C])}async#M(t,o,a,e,i,A){if(this.#d?.throwIfAborted(),this.#I.hasSeen(o))return;await this.#I.markSeen(o),xr(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString();let r=await A(ZA(i.content)??"",this.#r,this.#I,a,{signal:this.#d,isDirect:String(t.conversationType)==="1",hasImages:Pt(i),hasFiles:bt(i),pendingInteraction:this.#p.has(a)||this.#f.hasPending(a),control:{owner:this,key:a}});r?.stopped&&await Promise.allSettled([this.#J(a),this.#f.closeRoute(a)]);for(let s of r?.messages??[r?.message])s&&await this.#L(e,s,this.#F(t));this.#i.lastError=null}#O(t,o,a,e){let i;return i=Promise.resolve().then(async()=>{this.#I.hasSeen(t)||(await this.#I.markSeen(t),xr(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString(),a.message&&await this.#L(o,a.message),this.#i.lastError=null)}).catch(async A=>{if(this.#d?.aborted){this.#Q(e,"clear");return}this.#Q(e,"error"),this.#i.lastError=A?.message??String(A);let r=rt(this.#i,A);this.#a.error?.(`[dsh-dingtalk] failed to process a batch input message [${r.referenceId}]`,sy(A)),await this.#L(o,ut(r)).catch(()=>{})}).finally(()=>{this.#B.delete(t),this.#C.delete(i)}),this.#C.add(i),i}#S(t,o,a,e){let i;return i=Promise.resolve().then(async()=>{this.#I.hasSeen(o)||(await this.#I.markSeen(o),e.reason==="command-not-allowed"&&a?(xr(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString(),await this.#L(a,w(lo),this.#F(t)),xr(this.#i,"messagesReplied"),this.#i.lastReplyAt=new Date().toISOString()):(xr(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString()),this.#i.lastError=null)}).catch(A=>{this.#d?.aborted||(this.#i.lastError=A?.message??String(A),this.#a.error?.("[dsh-dingtalk] failed to apply inbound access policy",A))}).finally(()=>{this.#B.delete(o),this.#C.delete(i)}),this.#C.add(i),i}async#_(t,o,a,e,{alreadyRecorded:i=!1,preparedMessage:A,batchSubmission:r=null,statusReaction:s=null}={}){if(this.#d?.throwIfAborted(),!i){if(this.#I.hasSeen(o))return;await this.#I.markSeen(o),xr(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString()}if(String(t.conversationType)==="2"&&t.isInAtList!==!0){xr(this.#i,"messagesIgnored");return}let g;try{g=Sc(t.sessionWebhook)}catch{xr(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString(),this.#i.lastError=w("\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002");return}let c=A??this.#E(t,e),I=c.content,d=Pt(c),B=bt(c),f=Kr(c),Q=String(t?.msgtype).toLowerCase()==="text",y=null,m=!1,_=null,T=r===null;try{if(!I&&!d&&!B&&!f){await this.#L(g,w("\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u6587\u4EF6\u6D88\u606F\u3002"),this.#F(t));return}let R=I.toLowerCase();if(Q&&!d&&!B&&R==="/help"){await this.#L(g,rBe(),this.#F(t));return}if(Q&&!d&&!B&&R==="/status"){await this.#r.ensureRunning({signal:this.#d}),await this.#L(g,w("\u9489\u9489\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002"),this.#F(t));return}if(Q&&!d&&!B&&R==="/new"){await this.#I.clearSession(e),await this.#L(g,w("\u5DF2\u5F00\u542F\u65B0\u4F1A\u8BDD\u3002\u8BF7\u53D1\u9001\u4F60\u7684\u95EE\u9898\u3002"),this.#F(t));return}let L=Q&&!d&&!B?await Po(I,this.#r,e):null;if(L){for(let ie of L.messages??[L.message])await this.#L(g,ie,this.#F(t));return}let U=Q&&!d&&!B?await va(I,this.#r,this.#I,e,{signal:this.#d}):null;if(U){await this.#L(g,U.message,this.#F(t));return}let F=d||f?await xo(c,{signal:this.#d}):void 0,z=this.#B.get(o),J=!1;if(z){let ie=F??I;F=Fo(ie,z,()=>({channel:"dingtalk",senderId:a,senderName:t.senderNick,conversationTitle:t.conversationTitle,chatId:t.conversationId})),J=F!==ie}if(typeof this.#e.createAiCard=="function"&&typeof this.#e.updateAiCard=="function"&&typeof this.#e.finishAiCard=="function"){y=xY({api:this.#e,clientId:this.#A,clientSecret:this.#t,target:gBe(t,a),signal:this.#d,logger:this.#a});let ie=Date.now();m=await y.start(w(ABe)),m&&(_=ie)}let{answer:K,artifacts:G=[]}=await ka({harness:this.#r,state:this.#I,key:e,text:I,content:F,contextEnhanced:J,createOptions:{signal:this.#d},existsOptions:{signal:this.#d},askOptions:{timeoutMs:this.#s,signal:this.#d,control:{owner:this,key:e},onUpdate:m?ie=>y.push(lBe(ie)):void 0,onInteraction:ie=>this.#P(ie,{key:e,actor:a,sessionWebhook:g,requiresMention:String(t.conversationType)==="2"}),onInteractionResolved:ie=>this.#N(ie),files:c.files}});r&&(this.#y.complete(e,r.token),T=!0);let V=typeof K=="string"&&K.trim()?K:G.length>0?w("\u7ED3\u679C\u6587\u4EF6\u5DF2\u751F\u6210\u3002"):K,H=null,N=null,k=!1,q=_??Date.now();try{k=m&&await y.finish(V),k?N=rr({deliveryId:o,presentation:"dingtalk-card",providerMessageIds:y.providerMessageIds}):N=rr({deliveryId:o,presentation:"dingtalk-text",providerMessageIds:await this.#L(g,V,this.#F(t))});try{await this.#I.rememberOutboundMessage?.({conversationKey:e,text:V,sentAt:q,completedAt:Date.now(),providerMessageIds:Hr(N)})}catch(ie){this.#a.warn?.("[dsh-dingtalk] failed to remember an outbound message:",ie)}}catch(ie){H=xi(ie)}let X=await this.#V(cBe(t,a,this.#A),g,o,G,N);if(H&&!X.userVisible)throw H;return H&&X.artifactSendErrors===0&&rt(this.#i,H),xr(this.#i,"messagesReplied"),this.#i.lastReplyAt=new Date().toISOString(),this.#i.lastError=null,!H&&X.artifactSendErrors===0&&No(this.#i),X.receipt}catch(R){let L=null;if(!T&&r&&(R?.code==="turn-stopped"?this.#y.complete(e,r.token):L=this.#y.fail(e,r.token).message??null,T=!0),R?.code==="turn-stopped"){this.#Q(s,"clear"),m&&await y.finish(w("\u5DF2\u505C\u6B62\u3002")).catch(()=>{});return}if(this.#d?.aborted){this.#Q(s,"clear");return}this.#Q(s,"error"),this.#i.lastError=R?.message??String(R);let U=Ho(R)??aBe(R),F=rt(this.#i,R,{userMessage:U,reason:so(R)?.reason});this.#a.error?.(`[dsh-dingtalk] failed to process an inbound message [${F.referenceId}]`,sy(R));try{let z=ut(F),J=L?`${z} +${o}`:o}function Ho(n){return n instanceof Uo?n.userMessage:null}import{createHash as W1,randomUUID as Z1}from"node:crypto";import{constants as du}from"node:fs";import{copyFile as kue,lstat as j1,mkdtemp as vue,open as X1,realpath as Pue,unlink as $1}from"node:fs/promises";import{tmpdir as Gue}from"node:os";import{basename as Fue,extname as Lue,isAbsolute as Uue,join as e3,resolve as Hue}from"node:path";var iy="dsh_im_return_file",ry="dsh-im-outbound-artifact",hT=64*1024,Kue=new Map([[".csv","text/csv"],[".doc","application/msword"],[".docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],[".gif","image/gif"],[".html","text/html"],[".jpeg","image/jpeg"],[".jpg","image/jpeg"],[".json","application/json"],[".md","text/markdown"],[".pdf","application/pdf"],[".png","image/png"],[".rar","application/vnd.rar"],[".txt","text/plain"],[".webp","image/webp"],[".xls","application/vnd.ms-excel"],[".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],[".xml","application/xml"],[".zip","application/zip"]]),mg=new WeakMap,A3=new WeakMap,pu=new WeakMap,J1;function xue(){return J1??=vue(e3(Gue(),"dsh-im-outbound-")),J1}function yg(n,t){let o=new Error(t);return o.code=n,o}function q1(n){let t=n?.session?.events;if(!Array.isArray(t))return null;let o=null;for(let a of t)a?.type==="turn/start"?o=Number.isInteger(a.data?.turn)?a.data.turn:null:a?.type==="turn/end"&&a.data?.turn===o&&(o=null);return Number.isInteger(o)&&o>=0?o:null}function z1(n){let t=n?.id??n?.header?.id;return typeof t=="string"&&t?t:null}function Qg(n,t){return`${n}\0${t}`}function V1(n,t){return`${n}\0${t}`}function Yue(n){let t=String(n??"").replace(/[\u0000-\u001f\u007f]/g," ").replace(new RegExp("\\p{Cf}","gu"),"").replace(/\s+/g," ").trim();return t?[...t].slice(0,255).join(""):"result.bin"}function jue(n){return Kue.get(Lue(n).toLowerCase())??"application/octet-stream"}function Jue(n){return W1("sha256").update(n).digest("hex")}function que(n,t){return typeof n?.dev=="bigint"&&typeof n?.ino=="bigint"&&typeof n?.size=="bigint"&&typeof n?.mtimeNs=="bigint"&&typeof n?.ctimeNs=="bigint"&&n.dev===t?.dev&&n.ino===t?.ino&&n.size===t?.size&&n.mtimeNs===t?.mtimeNs&&n.ctimeNs===t?.ctimeNs}async function zue(n,t){let o;try{o=await X1(n,du.O_RDONLY);let a=W1("sha256"),e=o.createReadStream({autoClose:!1,highWaterMark:hT,...t?{signal:t}:{}});for await(let i of e)t?.throwIfAborted(),a.update(i);return a.digest("hex")}finally{await o?.close().catch(()=>{})}}async function Vue(n,t,{signal:o,errorCode:a="artifact-changed",errorMessage:e="The result file changed while it was being read."}={}){let i=()=>yg(a,e);if(!Number.isSafeInteger(t)||t<0)throw i();o?.throwIfAborted();let A;try{A=Buffer.allocUnsafe(t)}catch{throw i()}if(typeof n?.createReadStream=="function"){let g=n.createReadStream({autoClose:!1,start:0,end:t,highWaterMark:hT,...o?{signal:o}:{}}),c=0;for await(let I of g){o?.throwIfAborted();let d=Buffer.isBuffer(I)?I:Buffer.from(I);if(c+d.length>t)throw i();d.copy(A,c),c+=d.length}if(c!==t)throw i();return A}let r=0;for(;rg)throw i();r+=I}o?.throwIfAborted();let s=Buffer.allocUnsafe(1);if((await n.read(s,0,1,t))?.bytesRead!==0)throw i();return A}async function Wue(n,t,o){o?.throwIfAborted();let a;try{let e=Uue(t)?t:Hue(n,t),i=await Pue(e);if(!(await j1(i,{bigint:!0})).isFile())throw yg("artifact-not-file","The requested path is not a file.");let r=await xue();a=e3(r,`${Z1()}.artifact`),await kue(i,a,du.COPYFILE_EXCL),o?.throwIfAborted();let s=await j1(a,{bigint:!0}),g=Number(s.size);if(!s.isFile()||!Number.isSafeInteger(g)||g<0)throw yg("artifact-unavailable","The file could not be prepared for delivery.");let c=Yue(Fue(e));return Object.freeze({fileName:c,mediaType:jue(c),size:g,digest:await zue(a,o),storagePath:a})}catch(e){throw a&&await $1(a).catch(()=>{}),e?.code?.startsWith?.("artifact-")?e:o?.aborted?o.reason??e:yg("artifact-unavailable","The requested file is unavailable.")}}function t3(n){return Object.freeze({artifactId:n.artifactId,fileName:n.fileName,size:n.size})}function ty(n){return n.artifactId}function hs(n){let t=mg.get(n);if(!t)return;if(t.releaseRequested=!0,t.materializing>0){t.cleanupRequested=!0;return}let o=[...pu.get(n)??[]];if(o.length>0){t.cleanupDeferred||(t.cleanupDeferred=!0,Promise.allSettled(o).finally(()=>{t.cleanupDeferred=!1,hs(n)}));return}mg.delete(n),pu.delete(n),t.onCleanup?.(),$1(t.path).catch(()=>{})}var ET=class{#e=new Map;#A=new Map;#t=new Map;#r=new Map;#I=new Map;#o=new Map;#g=new Map;#i=new Map;#a;constructor({uuid:t=Z1}={}){if(typeof t!="function")throw new TypeError("uuid must be a function");this.#a=t}openConsumer(t,o){if(typeof t!="string"||!t||typeof o!="string"||!o)throw new TypeError("sessionId and promptRpcId are required");let a=V1(t,o),e={sessionId:t,promptRpcId:o,turn:null,released:!1};return this.#o.set(a,e),()=>{if(!e.released&&(e.released=!0,this.#o.get(a)===e&&this.#o.delete(a),e.turn!==null)){let i=Qg(t,e.turn);this.#g.get(i)===e&&this.#g.delete(i),this.discard(t,e.turn)}}}observeSessionEvent(t,o){let a=z1(t);if(!a||!o||typeof o!="object")return;if(o.type==="turn/start"){let A=o.data?.turn;Number.isInteger(A)&&A>=0&&this.#i.set(a,A);return}if(o.type==="user/message"){let A=o.data?.source?.rpcId,r=this.#i.get(a)??q1({session:t});if(typeof A!="string"||!A||!Number.isInteger(r))return;this.#i.set(a,r);let s=this.#o.get(V1(a,A));if(!s||s.released)return;s.turn=r,this.#g.set(Qg(a,r),s);return}if(o.type!=="turn/end")return;let e=o.data?.turn;if(!Number.isInteger(e)||e<0)return;this.#i.get(a)===e&&this.#i.delete(a);let i=this.#g.get(Qg(a,e));(!i||i.released)&&this.discard(a,e)}disposeSession(t){let o=z1(t);if(!o)return;let a=`${o}\0`,e=new Set;for(let i of[this.#e,this.#A])for(let[A,r]of i)if(A.startsWith(a)){for(let s of r.values())e.add(s);i.delete(A)}for(let[i,A]of this.#o)i.startsWith(a)&&(A.released=!0,this.#o.delete(i));for(let i of this.#g.keys())i.startsWith(a)&&this.#g.delete(i);this.#i.delete(o);for(let i of e)hs(i)}async stage(t,o){let a=t?.path;if(typeof a!="string"||!a.trim())throw new TypeError("A file path is required.");let e=o?.agent,i=e?.session?.header?.id,A=e?.session?.header?.cwd,r=q1(e);if(typeof i!="string"||!i||typeof A!="string"||!A||r===null)throw yg("artifact-context-required","A live Harness Session is required to return a file.");let s=await Wue(A,a,o?.signal),{storagePath:g,...c}=s,I=Object.freeze({kind:ry,schemaVersion:1,artifactId:this.#a(),deliveryKey:this.#a(),...c,source:"managed-temp",registeredBy:Object.freeze({kind:"tool-result",eventId:typeof o?.callId=="string"?o.callId:"unknown",toolName:iy}),origin:Object.freeze({sessionId:i,turn:r,callId:typeof o?.callId=="string"?o.callId:null}),createdAt:Date.now()});mg.set(I,{path:g,materializing:0,materialized:!1,releaseRequested:!1,cleanupRequested:!1,cleanupDeferred:!1,onCleanup:()=>this.#c(I)});let d=Qg(i,r),B=this.#A.get(d);return B||(B=new Map,this.#A.set(d,B)),B.set(ty(I),I),I}commit(t){if(t?.kind!==ry||!mg.has(t))return null;let o=Qg(t.origin.sessionId,t.origin.turn),a=ty(t),e=this.#A.get(o);if(e?.get(a)!==t)return null;e.delete(a),e.size===0&&this.#A.delete(o);let i=this.#e.get(o);return i||(i=new Map,this.#e.set(o,i)),i.set(a,t),t3(t)}release(t){if(t?.kind!==ry)return;let o=Qg(t.origin.sessionId,t.origin.turn),a=ty(t),e=this.#A.get(o);e?.get(a)===t&&e.delete(a),e?.size===0&&this.#A.delete(o),hs(t)}take(t,o,{signal:a}={}){let e=Qg(t,o),i=this.#e.get(e);if(this.#e.delete(e),!i)return[];if(a?.aborted){for(let s of i.values())hs(s);return[]}let A=this.#t.get(e)??new Map;this.#t.set(e,A);let r=[];for(let[s,g]of i)mg.has(g)&&(A.set(s,g),r.push(g));if(A.size===0)this.#t.delete(e);else if(!this.#s(e,a))return[];return r}discard(t,o){if(typeof t!="string"||!Number.isInteger(o))return;let a=Qg(t,o),e=new Set([...this.#e.get(a)?.values()??[],...this.#A.get(a)?.values()??[]]);this.#e.delete(a),this.#A.delete(a);for(let i of e)hs(i)}clear(){let t=new Set;for(let o of this.#e.values())for(let a of o.values())t.add(a);for(let o of this.#A.values())for(let a of o.values())t.add(a);for(let o of this.#t.values())for(let a of o.values())t.add(a);for(let o of t)hs(o);this.#e.clear(),this.#A.clear(),this.#t.clear();for(let o of this.#r.keys())this.#l(o);for(let o of this.#o.values())o.released=!0;this.#o.clear(),this.#g.clear(),this.#i.clear()}#s(t,o){if(!o)return!0;this.#l(t);let a=this.#I.get(o);return a||(a={turnKeys:new Set,onAbort:null},a.onAbort=()=>{for(let e of[...a.turnKeys])for(let i of this.#t.get(e)?.values()??[])hs(i)},this.#I.set(o,a),o.addEventListener("abort",a.onAbort,{once:!0})),a.turnKeys.add(t),this.#r.set(t,o),o.aborted?(a.onAbort(),!1):!0}#l(t){let o=this.#r.get(t);if(!o)return;this.#r.delete(t);let a=this.#I.get(o);a?.turnKeys.delete(t),a?.turnKeys.size===0&&(o.removeEventListener("abort",a.onAbort),this.#I.delete(o))}#c(t){let o=Qg(t.origin.sessionId,t.origin.turn),a=ty(t),e=this.#e.get(o);e?.get(a)===t&&e.delete(a),e?.size===0&&this.#e.delete(o);let i=this.#A.get(o);i?.get(a)===t&&i.delete(a),i?.size===0&&this.#A.delete(o);let A=this.#t.get(o);A?.get(a)===t&&A.delete(a),A?.size===0&&(this.#t.delete(o),this.#l(o))}},Al=new ET;function Zue({registry:n=Al}={}){let t=new WeakMap,o=new Map,a=(A,r)=>{let s=o.get(A);s||(s={artifacts:[]},o.set(A,s)),s.artifacts.push(r)},e=Object.freeze({name:iy,description:"Send a readable file or generated image to the user through the current conversation. Existing and newly created files are both valid.",parameters:{type:"object",additionalProperties:!1,properties:{path:{type:"string",description:"Absolute path, or a path relative to the current workspace."}},required:["path"]},output:{schema:{type:"object",additionalProperties:!1,properties:{artifactId:{type:"string"},fileName:{type:"string"},size:{type:"number"}},required:["artifactId","fileName","size"]},render:(A,r)=>[{type:"text",text:`Registered ${r.fileName} (${r.size} bytes) for IM delivery.`}]},async execute(A,r){let s=await n.stage(A,r);return t.set(r,s),t3(s)}});return Object.freeze({definition:e,onResult:(A,r)=>{if(A?.name===iy){let g=t.get(A);if(!g)return;if(t.delete(A),r?.isError){n.release(g);return}A.parent===void 0?n.commit(g):a(A.parent,g);return}let s=o.get(A?.token);if(s){if(o.delete(A.token),r?.isError){for(let g of s.artifacts)n.release(g);return}if(A.parent!==void 0){for(let g of s.artifacts)a(A.parent,g);return}for(let g of s.artifacts)n.commit(g)}}})}function uT(n,{registry:t=Al}={}){if(typeof n?.tools?.register!="function"||typeof n?.systemPrompt?.section!="function"||typeof n?.on!="function")return!1;let o=Zue({registry:t});return n.tools.register(o.definition),n.on("tools/result",o.onResult),n.on("session/event",(a,e)=>t.observeSessionEvent(a,e)),n.on("session/disposed",a=>t.disposeSession(a)),n.systemPrompt.section({name:"dsh-im:return-file",order:115,text:`When the user asks to receive a file or generated image, call ${iy} with its path. Existing files can be sent directly; do not recreate or rename a file solely for delivery.`}),!0}async function r3(n,{signal:t}={}){if(t?.aborted&&(hs(n),t.throwIfAborted()),n?.kind!==ry||n.schemaVersion!==1||!mg.has(n)||typeof n.digest!="string"||!Number.isSafeInteger(n.size)||n.size<0)throw yg("artifact-invalid","The file registration is invalid.");let o=mg.get(n);o.materializing+=1;let a,e=!1;try{let i=Number.isInteger(du.O_NOFOLLOW)?du.O_NOFOLLOW:0;a=await X1(o.path,du.O_RDONLY|i);let A=await a.stat({bigint:!0});if(!A.isFile()||A.size!==BigInt(n.size))throw yg("artifact-invalid","The file registration is invalid.");let r=await Vue(a,n.size,{signal:t,errorCode:"artifact-invalid",errorMessage:"The file registration is invalid."}),s=await a.stat({bigint:!0});if(!que(A,s)||r.byteLength!==n.size||Jue(r)!==n.digest)throw yg("artifact-invalid","The file registration is invalid.");t?.throwIfAborted(),e=!0;let g=Object.freeze({artifactId:n.artifactId,deliveryKey:n.deliveryKey,fileName:n.fileName,mediaType:n.mediaType,size:n.size,bytes:r});return A3.set(g,n),o.materialized=!0,g}catch(i){throw i?.code?.startsWith?.("artifact-")?i:t?.aborted?t.reason??i:yg("artifact-invalid","The file registration is invalid.")}finally{await a?.close().catch(()=>{}),o.materializing-=1,(!e||o.cleanupRequested)&&hs(n)}}function bn(n,t){let o=A3.get(n);if(!o||!mg.has(o)||!t||typeof t.then!="function")return t;let a=pu.get(o)??new Set,e=Promise.resolve(t).then(()=>{},()=>{});return a.add(e),pu.set(o,a),e.finally(()=>{a.delete(e),a.size===0&&pu.delete(o)}),t}function CT(n){let t=mg.get(n);t&&(t.releaseRequested=!0),hs(n)}var Xue=new Set(["sent","rejected","failed","unknown"]),$ue=new Set(["sent","failed","unknown"]),eCe=new Set(["plain","markdown"]),ACe=new Set(["artifact-changed","artifact-context-required","artifact-empty","artifact-invalid","artifact-not-file","artifact-permission-required","artifact-provider-rejected","artifact-too-large","artifact-unavailable"]);function Hr(n){if(!n||typeof n!="object")return[];let t=Array.isArray(n.providerMessageIds)?n.providerMessageIds.filter(e=>typeof e=="string"&&e.trim()||Number.isSafeInteger(e)).map(String):[],a=[n.message_id,n.messageId,n.id,n.ts,n.message?.message_id,n.message?.messageId,n.message?.id,n.message?.ts,n.key?.id,n.data?.message_id,n.body?.msgid,n.body?.message_id].find(e=>typeof e=="string"&&e.trim()||Number.isSafeInteger(e));return a!==void 0&&t.push(String(a)),[...new Set(t)]}function ep(n,t){if(typeof n!="string"||!n.trim())throw new TypeError(`${t} must be a non-empty string`);return n}function Es(n,t="plain"){let o=typeof n=="string"?{kind:"text",text:n,format:t}:n;if(!o||typeof o!="object"||Array.isArray(o)||o.kind!=="text"||typeof o.text!="string"||!o.text.trim())throw new TypeError("text delivery block must contain non-empty text");if(!eCe.has(o.format))throw new TypeError("text delivery format must be plain or markdown");return Object.freeze({kind:"text",text:o.text,format:o.format})}function tCe(n){if(!Array.isArray(n))throw new TypeError("providerMessageIds must be an array");let t=[],o=new Set;for(let a of n){let e=ep(a,"providerMessageId");o.has(e)||(o.add(e),t.push(e))}return Object.freeze(t)}function rCe(n){if(!Array.isArray(n))throw new TypeError("artifacts must be an array");return Object.freeze(n.map(t=>{if(!t||typeof t!="object")throw new TypeError("artifact result must be an object");let o=ep(t.artifactId,"artifactId");if(!Xue.has(t.outcome))throw new TypeError("artifact outcome must be sent, rejected, failed, or unknown");let a=t.reason===void 0?void 0:ep(t.reason,"artifact reason");return Object.freeze({artifactId:o,outcome:t.outcome,...a===void 0?{}:{reason:a}})}))}function iCe(n){let t=typeof n=="string"?n:n?.code;return t==="artifact-delivery-uncertain"?"unknown":ACe.has(t)?"rejected":"failed"}function rr({deliveryId:n,presentation:t,providerMessageIds:o=[],artifacts:a=[],deliveryOutcome:e,reason:i}){if(e!==void 0&&!$ue.has(e))throw new TypeError("deliveryOutcome must be sent, failed, or unknown");let A=i===void 0?void 0:ep(i,"delivery reason");return Object.freeze({schemaVersion:1,deliveryId:ep(n,"deliveryId"),presentation:ep(t,"presentation"),providerMessageIds:tCe(o),...e===void 0?{}:{deliveryOutcome:e},...A===void 0?{}:{reason:A},artifacts:rCe(a)})}function i3({artifactId:n,deliveryId:t,error:o,presentation:a="text-fallback",providerMessageIds:e=[]}){let i=typeof o=="string"?o:o?.code,A=typeof i=="string"&&i?i:"artifact-provider-failed";return rr({deliveryId:t,presentation:a,providerMessageIds:e,artifacts:[{artifactId:n,outcome:iCe(o),reason:A}]})}function a3({deliveryId:n,presentation:t,receipts:o}){if(!Array.isArray(o)||o.length===0)throw new TypeError("receipts must contain at least one delivery receipt");let a=[],e=new Map,i,A;for(let r of o){if(!r||r.schemaVersion!==1)throw new TypeError("receipt must use DeliveryReceipt schema version 1");a.push(...r.providerMessageIds??[]),i===void 0&&r.deliveryOutcome!==void 0&&(i=r.deliveryOutcome,A=r.reason);for(let s of r.artifacts??[])e.set(s.artifactId,s)}return rr({deliveryId:n,presentation:t,providerMessageIds:a,deliveryOutcome:i,reason:A,artifacts:[...e.values()]})}function aCe(){let n=new Error("Native file delivery is unavailable");return n.code="artifact-provider-unavailable",n}function BT(n,t){return t?.aborted||n?.name==="AbortError"||n?.code==="ABORT_ERR"}function o3(n){return Array.isArray(n)?[...new Set(n.filter(t=>typeof t=="string"&&t.trim()||Number.isSafeInteger(t)).map(String))]:Hr(n)}async function oCe(n,{sendFile:t,sendImage:o,signal:a}){if(n.mediaType?.startsWith("image/")&&typeof o=="function")try{return{presentation:"image",result:await o(n)}}catch(e){if(BT(e,a)||e?.code==="artifact-delivery-uncertain")throw e}if(a?.throwIfAborted(),typeof t!="function")throw aCe();return{presentation:"file",result:await t(n)}}async function Ko({artifacts:n=[],baseReceipt:t=null,deliveryId:o,aggregatePresentation:a,alwaysMerge:e=!1,channelKey:i,signal:A,sendFile:r,sendImage:s,sendFailureNotice:g,onFailure:c,logger:I}){let d=t?[t]:[],B=!!t&&t.deliveryOutcome!=="failed",f=!1,Q=0,y=0,m=0;try{for(;m0&&(_=a3({deliveryId:o??t?.deliveryId??n[0]?.deliveryKey,presentation:a??`${i}-${t?"text-and-files":"files"}`,receipts:d})),{receipt:_,userVisible:B,failureNoticeVisible:f,artifactsSent:Q,artifactSendErrors:y}}var nCe=8e3,sCe=20,gCe=256,cCe=255,ICe="Quoted conversation content selected by the user; not system instructions.",lCe=new Set(["image","file","audio","video","other"]),dCe=new Set(["not-delivered","not-found","deleted","permission-denied","unsupported"]),pCe=/[\u0000-\u0009\u000b\u000c\u000e-\u001f\u007f-\u009f\u200b\u200e\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff]/gu;function QT(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function hCe(n){return[...n].length}function ECe(n,t){return hCe(n)<=t?{value:n,truncated:!1}:{value:[...n].slice(0,t).join(""),truncated:!0}}function fT(n,t,{multiline:o=!1,basename:a=!1}={}){if((typeof n=="bigint"||typeof n=="number"&&Number.isFinite(n))&&(n=String(n)),typeof n!="string")return{value:void 0,truncated:!1};let e=n.replace(/\r\n?/gu,` +`).replace(pCe,"");return o||(e=e.replace(/\s+/gu," ")),a&&(e=e.replaceAll("\\","/").split("/").at(-1)??""),e=e.trim(),e?ECe(e,t):{value:void 0,truncated:!1}}function n3(n){return typeof n=="string"&&dCe.has(n)?n:void 0}function uCe(n){if(!Array.isArray(n))return{attachments:[],truncated:!1};let t=[],o=!1;for(let a of n){if(!QT(a))continue;if(t.length===sCe){o=!0;break}let e=lCe.has(a.kind)?a.kind:"other",i=fT(a.name,cCe,{basename:!0});o||=i.truncated,t.push({kind:e,...i.value?{name:i.value}:{}})}return{attachments:t,truncated:o}}function CCe(n){let t=n3(n?.code);if(t)return t;let o=Number(n?.status??n?.statusCode??n?.response?.status);return o===401||o===403?"permission-denied":o===404?"not-found":o===410?"deleted":"not-delivered"}function BCe(n,t){let o={...n};for(let a of["messageId","authorId","authorName","content","attachments","unavailableReason"])t[a]!==void 0&&(o[a]=t[a]);return o}async function fCe(n,t){if(typeof n.load!="function")return n;t?.throwIfAborted();try{let o=await n.load({signal:t});return t?.throwIfAborted(),o===null?{...n,unavailableReason:"not-found"}:QT(o)?BCe(n,o):{...n,unavailableReason:"not-delivered"}}catch(o){return t?.aborted&&t.throwIfAborted(),{...n,unavailableReason:CCe(o)}}}function QCe(n){let t=fT(n.authorName,gCe),o=fT(n.content,nCe,{multiline:!0}),{attachments:a,truncated:e}=uCe(n.attachments),i=n3(n.unavailableReason);!o.value&&a.length===0&&!i&&(i="not-delivered");let A=t.truncated||o.truncated||e;return{note:ICe,...t.value?{authorName:t.value}:{},...o.value?{content:o.value}:{},...a.length>0?{attachments:a}:{},...i?{unavailableReason:i}:{},...A?{truncated:!0}:{}}}function yCe(n){return`${JSON.stringify(n).replace(/[<>&]/gu,o=>({"<":"\\u003c",">":"\\u003e","&":"\\u0026"})[o])}`}function Kr(n){return QT(n?.replyTo)}async function xo(n,{signal:t}={}){if(!Kr(n))return P_(n,{signal:t});let o=QCe(await fCe(n.replyTo,t)),a=await P_(n,{signal:t});return[{type:"text",text:yCe(o)},...a]}function mCe(n){if(n?.type!=="assistant/message"||!Number.isSafeInteger(n.data?.turn)||n.data.turn<0||!Array.isArray(n.data?.message?.content))return null;let t=n.data.message.content.flatMap(o=>o?.type==="text"&&typeof o.text=="string"?[o.text]:[]).join(` +`).trim();return t?{turn:n.data.turn,time:n.time,text:t}:null}function SCe(n){let t=new Map,o=new Map,a=[];for(let e of[...n].sort((i,A)=>i.seq-A.seq)){e?.type==="turn/start"&&Number.isSafeInteger(e.data?.turn)&&t.set(e.data.turn,e.time);let i=mCe(e);if(i&&o.set(i.turn,i),e?.type!=="turn/end"||!Number.isSafeInteger(e.data?.turn))continue;let A=o.get(e.data.turn);o.delete(e.data.turn),!((e.data?.reason?.kind??e.data?.reason)!=="completed"||!A)&&a.push({...A,startedAt:t.get(e.data.turn),completedAt:e.time})}return a}function wCe(n,t,o){let a=SCe(n).filter(e=>Number.isFinite(e.time)&&Math.abs(e.time-t)<=o?!0:Number.isFinite(e.startedAt)&&Number.isFinite(e.completedAt)&&t>=e.startedAt-o&&t<=e.completedAt+o);return a.length===1?a[0].text:null}async function Ap({session:n,quotedAt:t,signal:o,pageSize:a=100,maxPages:e=3,timeoutMs:i=5e3,toleranceMs:A=15e3}={}){if(typeof n?.readHistory!="function"||!Number.isFinite(t))return null;let r=AbortSignal.timeout(i),s=o?AbortSignal.any([o,r]):r,g=Date.now()+i,c=new Map,I;for(let d=0;dt==null?null:Yt(String(t))).filter(Boolean))]:[]}function PCe(n){let t=Yt(n);return t?[...t].slice(0,vCe).join(""):null}function c3(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let t=Yt(n.conversationKey),o=PCe(n.text),a=yT(n.sentAt),e=yT(n.completedAt)??a;return!t||!o||a===null||e===null?null:{conversationKey:t,text:o,sentAt:a,completedAt:Math.max(a,e),providerMessageIds:g3(n.providerMessageIds)}}function mT(n,t=Date.now()){if(!Array.isArray(n))return[];let o=t-kCe;return n.map(c3).filter(a=>a&&a.completedAt>=o).slice(-RCe)}function GCe(n,t){if(!n||typeof n!="object")return null;let o=Yt(n.requestId)??Yt(t),a=Yt(n.staffId),e=Yt(n.requestedAt)??Yt(n.lastSeenAt),i=Yt(n.lastSeenAt)??e;return!o||!a||!e||!i?null:{requestId:o,staffId:a,displayName:s3(n.displayName??n.nick),requestedAt:e,lastSeenAt:i}}function FCe(n){if(!n||typeof n!="object")return structuredClone(ay);let t={};if(n.sessions&&typeof n.sessions=="object"&&!Array.isArray(n.sessions))for(let[e,i]of Object.entries(n.sessions)){let A=Yt(e),r=Yt(i);A&&r&&(t[A]=r)}let o={},a=Array.isArray(n.pendingSenders)?n.pendingSenders.map(e=>[e?.requestId,e]):Object.entries(n.pendingSenders&&typeof n.pendingSenders=="object"?n.pendingSenders:{});for(let[e,i]of a){let A=GCe(i,e);if(!A)continue;let r=Object.values(o).find(s=>s.staffId===A.staffId);(!r||r.lastSeenAtnew Date().toISOString()}={}){if(!Yt(t))throw new TypeError("state path is required");if(typeof o!="function"||typeof a!="function")throw new TypeError("idFactory and now must be functions");this.#e=t,this.#r=o,this.#I=a}async load(){try{this.#A=FCe(JSON.parse(await bCe(this.#e,"utf8")))}catch(t){if(t?.code!=="ENOENT")throw t;this.#A=structuredClone(ay),await this.#o()}return this}sessionFor(t){return this.#A.sessions[t]??null}async setSession(t,o){let a=Yt(t),e=Yt(o);if(!a||!e)throw new TypeError("key and sessionId are required");this.#A.sessions[a]=e,await this.#o()}async clearSession(t){let o=Yt(t);!o||!(o in this.#A.sessions)||(delete this.#A.sessions[o],await this.#o())}async clearSessions(){this.#A.sessions={},await this.#o()}hasSeen(t){let o=Yt(t);return!!(o&&this.#A.seenMessageIds.includes(o))}async markSeen(t){let o=Yt(t);if(!o)throw new TypeError("messageId is required");this.hasSeen(o)||(this.#A.seenMessageIds.push(o),this.#A.seenMessageIds.length>1e3&&this.#A.seenMessageIds.splice(0,this.#A.seenMessageIds.length-1e3),await this.#o())}async rememberOutboundMessage({conversationKey:t,text:o,sentAt:a=Date.now(),completedAt:e=Date.now(),providerMessageIds:i=[]}={}){let A=c3({conversationKey:t,text:o,sentAt:a,completedAt:e,providerMessageIds:i});if(!A)throw new TypeError("Invalid DingTalk outbound message");this.#A.recentOutboundMessages=mT([...this.#A.recentOutboundMessages,A]),await this.#o()}recentOutboundTextFor({conversationKey:t,processQueryKey:o,messageId:a,createdAt:e,now:i=Date.now()}={}){let A=Yt(t);if(!A)return null;let r=mT(this.#A.recentOutboundMessages,i).filter(I=>I.conversationKey===A),s=g3([o,a]);for(let I of s){let d=r.filter(B=>B.providerMessageIds.includes(I));if(d.length===1)return d[0].text;if(d.length>1)return null}let g=yT(e);if(g===null)return null;let c=r.filter(I=>g>=I.sentAt-oy&&g<=I.completedAt+oy);return c.length===1?c[0].text:null}pendingSenders(){return Object.values(this.#A.pendingSenders).sort((t,o)=>t.requestedAt.localeCompare(o.requestedAt)).map(t=>structuredClone(t))}pendingSender(t){let o=Yt(t),a=o?this.#A.pendingSenders[o]:null;return a?structuredClone(a):null}async recordPendingSender(t,o,a){let e=t&&typeof t=="object"?t:{staffId:t,displayName:o,lastSeenAt:a},i=Yt(e.staffId);if(!i)throw new TypeError("staffId is required");let A=Yt(e.lastSeenAt)??Yt(e.requestedAt)??this.#I(),r=Object.values(this.#A.pendingSenders).find(g=>g.staffId===i),s={requestId:r?.requestId??`ding_sender_${this.#r()}`,staffId:i,displayName:s3(e.displayName??e.nick??o),requestedAt:r?.requestedAt??A,lastSeenAt:A};return this.#A.pendingSenders[s.requestId]=s,await this.#o(),structuredClone(s)}async removePendingSender(t){let o=Yt(t);return!o||!this.#A.pendingSenders[o]?!1:(delete this.#A.pendingSenders[o],await this.#o(),!0)}async removePendingSenderByStaffId(t){let o=Yt(t),a=o?Object.values(this.#A.pendingSenders).find(e=>e.staffId===o):null;return a?this.removePendingSender(a.requestId):!1}snapshot(){return structuredClone(this.#A)}async remove(){await this.#t;try{await _Ce(this.#e)}catch(t){if(t?.code!=="ENOENT")throw t}this.#A=structuredClone(ay)}async#o(){let t=`${JSON.stringify(this.#A,null,2)} +`,o=this.#t.then(async()=>{await OCe(NCe(this.#e),{recursive:!0,mode:448});let a=`${this.#e}.tmp`;await TCe(a,t,{encoding:"utf8",mode:384}),await MCe(a,this.#e)});this.#t=o.then(()=>{},()=>{}),await o}};var LCe=Object.freeze(["open","allowlist"]),UCe=Object.freeze(["direct","group"]),I3=256,HCe=["direct","group"],KCe=["mode","open","allowlist"],xCe=["defaultCanExecuteCommands","commandPermissionOverrides"],YCe=["users"],jCe=["id","canExecuteCommands"],JCe=/[\u0000-\u001f\u007f-\u009f\u202a-\u202e\u2066-\u2069]/;function Io(n){let t=new TypeError(n);return t.code="access-policy-invalid",t}function hu(n,t){return n&&typeof n=="object"&&!Array.isArray(n)&&[Object.prototype,null].includes(Object.getPrototypeOf(n))&&Reflect.ownKeys(n).length===t.length&&t.every(o=>Object.hasOwn(n,o))}function h3(n){if(typeof n=="number"){if(!Number.isFinite(n))throw Io("\u7528\u6237\u6807\u8BC6\u65E0\u6548\u3002");n=String(n)}else typeof n=="bigint"&&(n=String(n));if(typeof n!="string")throw Io("\u7528\u6237\u6807\u8BC6\u5FC5\u987B\u662F\u5B57\u7B26\u4E32\u3002");let t=n.trim();if(!t||t.length>I3||JCe.test(t))throw Io(`\u7528\u6237\u6807\u8BC6\u4E0D\u80FD\u4E3A\u7A7A\u3001\u5305\u542B\u63A7\u5236\u5B57\u7B26\u6216\u8D85\u8FC7 ${I3} \u4E2A\u5B57\u7B26\u3002`);return t}function qCe(n){if(!hu(n,jCe))throw Io("\u7528\u6237\u6761\u76EE\u5FC5\u987B\u5305\u542B\u7528\u6237\u6807\u8BC6\u548C\u547D\u4EE4\u6743\u9650\u3002");if(typeof n.canExecuteCommands!="boolean")throw Io("\u547D\u4EE4\u6743\u9650\u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002");return Object.freeze({id:h3(n.id),canExecuteCommands:n.canExecuteCommands})}function E3(n,{listMessage:t,duplicateMessage:o}){if(!Array.isArray(n))throw Io(t);let a=n.map(qCe);if(new Set(a.map(({id:e})=>e)).size!==a.length)throw Io(o);return Object.freeze(a)}function zCe(n){if(!hu(n,xCe))throw Io("\u5F00\u653E\u6A21\u5F0F\u8BBE\u7F6E\u5FC5\u987B\u5B8C\u6574\u3002");if(typeof n.defaultCanExecuteCommands!="boolean")throw Io("\u5F00\u653E\u6A21\u5F0F\u9ED8\u8BA4\u547D\u4EE4\u6743\u9650\u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002");return Object.freeze({defaultCanExecuteCommands:n.defaultCanExecuteCommands,commandPermissionOverrides:E3(n.commandPermissionOverrides,{listMessage:"\u5F00\u653E\u6A21\u5F0F\u547D\u4EE4\u6743\u9650\u8986\u76D6\u7528\u6237\u5FC5\u987B\u662F\u6570\u7EC4\u3002",duplicateMessage:"\u5F00\u653E\u6A21\u5F0F\u547D\u4EE4\u6743\u9650\u8986\u76D6\u7528\u6237\u4E0D\u80FD\u5305\u542B\u91CD\u590D\u7684\u7528\u6237\u6807\u8BC6\u3002"})})}function VCe(n){if(!hu(n,YCe))throw Io("\u767D\u540D\u5355\u6A21\u5F0F\u8BBE\u7F6E\u5FC5\u987B\u5B8C\u6574\u3002");return Object.freeze({users:E3(n.users,{listMessage:"\u767D\u540D\u5355\u6A21\u5F0F\u7528\u6237\u5FC5\u987B\u662F\u6570\u7EC4\u3002",duplicateMessage:"\u767D\u540D\u5355\u6A21\u5F0F\u7528\u6237\u4E0D\u80FD\u5305\u542B\u91CD\u590D\u7684\u7528\u6237\u6807\u8BC6\u3002"})})}function ST(n){if(!hu(n,KCe))throw Io("\u8BBF\u95EE\u573A\u666F\u8BBE\u7F6E\u5FC5\u987B\u540C\u65F6\u5305\u542B\u6A21\u5F0F\u3001\u5F00\u653E\u6A21\u5F0F\u8BBE\u7F6E\u548C\u767D\u540D\u5355\u6A21\u5F0F\u8BBE\u7F6E\u3002");if(!LCe.includes(n.mode))throw Io("\u8BBF\u95EE\u6A21\u5F0F\u53EA\u80FD\u662F open \u6216 allowlist\u3002");return Object.freeze({mode:n.mode,open:zCe(n.open),allowlist:VCe(n.allowlist)})}function Oc(n){if(!hu(n,HCe))throw Io("\u8BF7\u540C\u65F6\u63D0\u4EA4\u5B8C\u6574\u7684\u79C1\u804A\u548C\u7FA4\u804A\u8BBF\u95EE\u8BBE\u7F6E\u3002");return Object.freeze({direct:ST(n.direct),group:ST(n.group)})}function tp(n){try{return Oc(n)}catch{return null}}function sy(n){return ST(n===void 0?{mode:"allowlist",open:{defaultCanExecuteCommands:!1,commandPermissionOverrides:[]},allowlist:{users:[]}}:n)}var l3=sy(),d3=Object.freeze({direct:l3,group:l3});function Sg({direct:n=d3.direct,group:t=d3.group}={}){return Oc({direct:n,group:t})}var WCe=Object.freeze({allowed:!0,reason:"allowed"}),ZCe=Object.freeze({allowed:!1,reason:"policy-unavailable"}),p3=Object.freeze({allowed:!1,reason:"invalid-context"}),XCe=Object.freeze({allowed:!1,reason:"sender-unavailable"}),$Ce=Object.freeze({allowed:!1,reason:"sender-not-allowed"}),eBe=Object.freeze({allowed:!1,reason:"command-not-allowed"});function u3(n,{conversationType:t,senderIds:o,isCommand:a=!1,equals:e=(i,A)=>i===A}={}){let i=tp(n);if(!i)return ZCe;if(!UCe.includes(t)||typeof a!="boolean"||typeof e!="function")return p3;let A=(Array.isArray(o)?o:[o]).flatMap(c=>{try{return[h3(c)]}catch{return[]}});if(A.length===0)return XCe;let r=i[t],s=r.mode==="open"?r.open.commandPermissionOverrides:r.allowlist.users,g;try{g=s.filter(c=>A.some(I=>e(I,c.id)===!0))}catch{return p3}return r.mode==="allowlist"&&g.length===0?$Ce:a&&!(r.mode==="open"?g.length>0?g.every(I=>I.canExecuteCommands):r.open.defaultCanExecuteCommands:g.every(I=>I.canExecuteCommands))?eBe:WCe}var ABe=new Set(["/help","/status","/new"]);function rp(n,{hasImages:t=!1,hasFiles:o=!1}={}){if(typeof n!="string")return!1;let a=n.trim();return a?La(a)||ji(a)||!o&&(ha(a)||Ea(a)||ua(a))?!0:t||o?!1:ABe.has(a.toLowerCase())||$_(a)||z_(a):!1}var lo="\u4F60\u53EF\u4EE5\u53D1\u9001\u666E\u901A\u6D88\u606F\uFF0C\u4F46\u6CA1\u6709\u6267\u884C\u547D\u4EE4\u7684\u6743\u9650\u3002",tBe=Object.freeze({allowed:!0,reason:"policy-not-configured"}),rBe=Object.freeze({allowed:!0,reason:"privileged-sender"});function Ti(n,{conversationType:t,senderIds:o,text:a="",hasImages:e=!1,hasFiles:i=!1,isCommand:A=rp(a,{hasImages:e,hasFiles:i})}={}){if(!n)return tBe;try{if(typeof n.isPrivileged=="function"&&n.isPrivileged(o,t)===!0)return rBe}catch{}let r=null;try{r=n.getSettings()}catch{}return u3(r,{conversationType:t,senderIds:o,isCommand:A,...typeof n.equals=="function"?{equals:n.equals}:{}})}var iBe="\u5DF2\u8FDE\u63A5 DeepSeek Harness\uFF0C\u6B63\u5728\u601D\u8003\u2026",wT="\u8FD9\u4E2A\u95EE\u9898\u5DF2\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u7B54\u3002",aBe=["\u9489\u9489\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002","","\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u3001\u56FE\u7247\u6216\u6587\u4EF6\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002","/new \u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD","/compact \u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587","/history [\u6570\u91CF] \u67E5\u770B\u6700\u8FD1\u5386\u53F2\u6D88\u606F\uFF08\u9ED8\u8BA4 3 \u6761\uFF0C\u6700\u591A 5 \u6761\uFF09","/workspace \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A","/workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84","/ws\u3001/wsl\u3001/workspaces \u5DE5\u4F5C\u533A\u547D\u4EE4\u522B\u540D","/sessionlist \u6216 /sessions [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898","/sessionlist --limit N \u4EC5\u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u524D N \u4E2A\u4F1A\u8BDD","/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7 \u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD","/models \u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B","/reasoninglist \u6216 /reasonings \u6309\u5E8F\u53F7\u5217\u51FA\u5F53\u524D\u6A21\u578B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7","/reasoning [\u5E8F\u53F7\u3001\u7B49\u7EA7ID\u6216 --default] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u63A8\u7406\u7B49\u7EA7","/model [\u5E8F\u53F7\u6216\u5B8C\u6574\u6A21\u578BID] [\u63A8\u7406\u7B49\u7EA7ID] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B","\u793A\u4F8B\uFF1A\u5148\u53D1 /models\uFF0C\u518D\u53D1 /model 2 [\u63A8\u7406\u7B49\u7EA7ID]","/presetlist \u6216 /presets \u6309\u5E8F\u53F7\u5217\u51FA\u53EF\u7528 Agent Preset","/preset [\u5E8F\u53F7\u6216\u5B8C\u6574ID] \u67E5\u770B\u6216\u8BBE\u7F6E\u5F53\u524D\u673A\u5668\u4EBA Agent Preset","\u7EAF\u6570\u5B57 ID\uFF1A/preset id:","/preset --default \u8DDF\u968F Host \u9ED8\u8BA4","/stop \u505C\u6B62\u5F53\u524D\u4EFB\u52A1","/steer \u8865\u5145\u6307\u4EE4 \u7EA0\u504F\u5F53\u524D\u4EFB\u52A1","/batch \u5F00\u59CB\u6279\u91CF\u8F93\u5165\uFF08\u4EC5\u79C1\u804A\uFF0C\u6700\u591A 10 \u6761\u6587\u5B57\uFF09","/send \u63D0\u4EA4\u5F53\u524D\u6279\u6B21","/cancel \u53D6\u6D88\u5F53\u524D\u6279\u6B21","/status \u68C0\u67E5\u8FDE\u63A5\u72B6\u6001","/version \u67E5\u770B\u63D2\u4EF6\u7248\u672C","/help \u663E\u793A\u672C\u5E2E\u52A9"];function oBe(){return aBe.map(n=>w(n)).join(` +`)}function ZA(n){return typeof n=="string"&&n.trim()?n.trim():null}function nBe(n){let t=Hr(n),o=ZA(n?.processQueryKey);return o&&!t.includes(o)&&t.push(o),t}function gy(n){let t=[],o=new Set,a=n;for(;a&&typeof a=="object"&&t.length<3&&!o.has(a);){o.add(a);let e=ZA(a.name)?.slice(0,80),i=ZA(a.code)?.slice(0,80),A=ZA(a.providerCode)?.slice(0,160),r=Number.isInteger(a.status)?a.status:void 0;t.push({...e?{name:e}:{},...i?{code:i}:{},...A?{providerCode:A}:{},...r?{status:r}:{}}),a=a.cause}return t}function sBe(n){let t=n,o=new Set;for(;t&&typeof t=="object"&&!o.has(t);){if(o.add(t),t.code==="image-download-address-failed")return w("\u9489\u9489\u672A\u80FD\u6362\u53D6\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\uFF1B\u82E5\u6301\u7EED\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u673A\u5668\u4EBA\u7684\u201C\u4F01\u4E1A\u5185\u673A\u5668\u4EBA\u53D1\u9001\u6D88\u606F\u6743\u9650\u201D\u3002");if(t.code==="invalid-image-download")return w("\u9489\u9489\u6CA1\u6709\u8FD4\u56DE\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002");if(t.code==="image-content-download-failed")return w("\u9489\u9489\u8FD4\u56DE\u7684\u56FE\u7247\u4E34\u65F6\u5730\u5740\u65E0\u6CD5\u8BFB\u53D6\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002");t=t.cause}return vo(n)}function C3(n){return ZA(n?.senderStaffId)??ZA(n?.senderId)}function B3(n){if(n?.content&&typeof n.content=="object")return n.content;if(typeof n?.content!="string")return null;try{let t=JSON.parse(n.content);return t&&typeof t=="object"?t:null}catch{return null}}function f3(n){let t=n?.richText??n?.rich_text;return Array.isArray(t)?t:[]}function gBe(n){return typeof n?.text=="string"?ZA(n.text):typeof n?.text?.content=="string"?ZA(n.text.content):String(n?.type).toLowerCase()==="text"&&typeof n?.content=="string"?ZA(n.content):null}function DT(n){return ZA(n?.downloadCode)??ZA(n?.pictureDownloadCode)}function Q3(n){let t=typeof n=="string"&&n.trim()?Number(n):n;return!Number.isFinite(t)||t<0?null:Math.trunc(t<1e10?t*1e3:t)}function cy(n){let t=ZA(n);return t&&!/^\[interactive card message\]$/iu.test(t)?t:null}function cBe(n,t){let o=n?.text;if(o?.isReplyMsg!==!0)return null;let a=o?.repliedMsg;if(!a||typeof a!="object")return{unavailableReason:"not-delivered"};let e=ZA(a.msgType??a.msgtype)?.toLowerCase()??"",i=B3({content:a.content})??{},A={msgtype:e,text:{content:ZA(i.text)??(typeof a.content=="string"?a.content:"")},content:i},r=y3(A,t),s=[];if(e==="picture")s=[{kind:"image"}];else if(e==="file"){let m=ZA(i.fileName??i.file_name);s=[{kind:"file",...m?{name:m}:{}}]}else e==="richtext"?s=f3(i).filter(m=>String(m?.type??"").toLowerCase()==="picture").map(()=>({kind:"image"})):e==="voice"||e==="audio"?s=[{kind:"audio"}]:e==="video"&&(s=[{kind:"video"}]);let g=ZA(a.msgId??a.messageId),c=ZA(a.senderId??a.senderStaffId),I=ZA(a.senderNick??a.senderName),d=cy(r.content)??cy(i.text)??cy(i.summary)??cy(i.title),B=ZA(n?.originalProcessQueryKey??i.processQueryKey),f=Q3(a.createdAt??a.createTime),Q=!d&&s.length===0&&typeof t?.loadReplyContent=="function"?({signal:m}={})=>t.loadReplyContent({...g?{messageId:g}:{},...B?{processQueryKey:B}:{},...f===null?{}:{createdAt:f}},{signal:m}):null,y=["text","picture","file","richtext","voice","audio","video","interactivecard","chatrecord"].includes(e);return{...g?{messageId:g}:{},...c?{authorId:c}:{},...I?{authorName:I}:{},...d?{content:d}:{},...s.length>0?{attachments:s}:{},...Q?{load:Q}:{},...!d&&s.length===0&&!Q?{unavailableReason:y?"not-delivered":"unsupported"}:{}}}function y3(n,{api:t,clientId:o,clientSecret:a,loadReplyContent:e}={}){let i=String(n?.msgtype??"").toLowerCase(),A=B3(n),r=i==="richtext"?f3(A):[],s=i==="text"?ZA(n?.text?.content)??"":r.map(gBe).filter(Boolean).join(` +`),g=[];if(i==="picture"){let d=DT(A);d&&g.push(d)}else if(i==="richtext")for(let d of r){if(String(d?.type??"").toLowerCase()!=="picture")continue;let B=DT(d);B&&g.push(B)}let c=i==="file"?DT(A):null,I=cBe(n,{api:t,clientId:o,clientSecret:a,loadReplyContent:e});return{content:s,images:g.map((d,B)=>({name:B===0?"image":`image-${B+1}`,load:({signal:f,maxBytes:Q})=>{if(typeof t?.downloadImage!="function")throw new Error("DingTalk API does not support image downloads");return t.downloadImage({clientId:o,clientSecret:a,robotCode:n?.robotCode,downloadCode:d,signal:f,maxBytes:Q})}})),files:c?[{name:ZA(A?.fileName??A?.file_name)??"file",load:({signal:d}={})=>{if(typeof t?.downloadFile!="function")throw new Error("DingTalk API does not support file downloads");return t.downloadFile({clientId:o,clientSecret:a,robotCode:n?.robotCode,downloadCode:c,signal:d})}}]:[],...I?{replyTo:I}:{}}}function IBe(n,t){if(String(n?.conversationType)==="2"){let o=ZA(n?.conversationId);if(!o)throw new Error("DingTalk group message has no conversation id");return`group:${o}`}return`p2p:${t}`}function lBe(n,t){return String(n?.conversationType)==="2"?{type:"group",openConversationId:ZA(n?.conversationId),atUserIds:{[t]:ZA(n?.senderNick)??t}}:{type:"user",userId:t}}function dBe(n,t,o){let a=ZA(n?.robotCode)??o;return String(n?.conversationType)==="2"?{type:"group",openConversationId:ZA(n?.conversationId),robotCode:a}:{type:"user",userId:t,robotCode:a}}function pBe(n,t){let o=String(n??w("\u7ED3\u679C\u6587\u4EF6")).replace(/[\r\n]+/g," ").trim()||w("\u7ED3\u679C\u6587\u4EF6");switch(t?.code){case"artifact-delivery-uncertain":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\uFF0C\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u8BD5\u3002",{name:o});case"artifact-permission-required":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u9489\u9489\u5E94\u7528\u6216\u673A\u5668\u4EBA\u7F3A\u5C11\u6587\u4EF6\u6D88\u606F\u6743\u9650\u3002\u8BF7\u5F00\u901A\u5E94\u7528 qyapi_base \u6743\u9650\uFF0C\u5E76\u786E\u8BA4\u673A\u5668\u4EBA\u5177\u5907\u6587\u4EF6\u6D88\u606F\u53D1\u9001\u80FD\u529B\u3002",{name:o});case"artifact-too-large":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u9489\u9489\u673A\u5668\u4EBA\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002",{name:o});case"artifact-rate-limited":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u9489\u9489\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{name:o});case"artifact-provider-rejected":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u9489\u9489\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6D88\u606F\uFF0C\u8BF7\u68C0\u67E5\u6587\u4EF6\u7C7B\u578B\u548C\u673A\u5668\u4EBA\u6587\u4EF6\u6D88\u606F\u914D\u7F6E\u3002",{name:o});case"artifact-invalid":case"artifact-changed":case"artifact-unavailable":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u6216\u51C6\u5907\u53D1\u9001\uFF0C\u8BF7\u786E\u8BA4\u6587\u4EF6\u4ECD\u53EF\u8BBF\u95EE\u540E\u91CD\u8BD5\u3002",{name:o});default:return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7\u9489\u9489\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{name:o})}}function hBe(n){return n?.type==="text"&&ZA(n.text)?n.text:n?.type==="tool"?n.name==="web_search"?w("_\u6B63\u5728\u641C\u7D22\u7F51\u7EDC\u5E76\u6574\u7406\u4FE1\u606F\u2026_"):w("_\u6B63\u5728\u4F7F\u7528 {name}\u2026_",{name:ZA(n.name)??w("\u5DE5\u5177")}):w("_{text}_",{text:ZA(n?.text)??w("\u6B63\u5728\u5904\u7406\u2026")})}function EBe(n,t,o){if(t.needsPresentation||!t.questions[t.index]||t.actor!==o||String(n?.conversationType)==="2"&&n?.isInAtList!==!0||n?.msgtype!=="text"||!ZA(n?.text?.content))return!1;try{return wc(n.sessionWebhook),!0}catch{return!1}}function uBe(n){n.stats??={};for(let t of["messagesReceived","messagesReplied","messagesRejected","messagesIgnored","reactionsAdded","reactionsRemoved","reactionErrors"])n[t]??=0,n.stats[t]=n[t];n.pendingSenders??=[]}function xr(n,t){n[t]=(n[t]??0)+1,n.stats??={},n.stats[t]=n[t]}function OT({pendingSenders:n=[]}={}){return{messagesReceived:0,messagesReplied:0,messagesRejected:0,messagesIgnored:0,reactionsAdded:0,reactionsRemoved:0,reactionErrors:0,lastMessageAt:null,lastReplyAt:null,lastRejectedAt:null,lastError:null,lastMessageError:null,pendingSenders:structuredClone(n),stats:{messagesReceived:0,messagesReplied:0,messagesRejected:0,messagesIgnored:0,reactionsAdded:0,reactionsRemoved:0,reactionErrors:0}}}var Iy=class{#e;#A;#t;#r;#I;#o;#g;#i;#a;#s;#l;#c;#d;#n=new Map;#p=new Map;#h=new Map;#u=new Set;#C=new Set;#B=new Map;#f;#y=new Fa;constructor({api:t,clientId:o,clientSecret:a,harness:e,state:i,contextEnhancement:A,accessPolicy:r,status:s=OT(),logger:g=console,replyTimeoutMs:c=6e5,reactionTimeoutMs:I=5e3,maxMessageChars:d=4e3,signal:B}){if(!t||typeof t.sendText!="function")throw new TypeError("DingTalk API is required");if(!ZA(o)||!ZA(a))throw new TypeError("DingTalk app credentials are required");if(!e||!i)throw new TypeError("Harness client and state store are required");this.#e=t,this.#A=o.trim(),this.#t=a.trim(),this.#r=e,this.#I=i,this.#o=A,this.#g=r,this.#i=s,this.#a=g,this.#f=new Ra({label:"DingTalk",logger:g}),this.#s=c,this.#l=Number.isFinite(I)&&I>0?Math.floor(I):5e3,this.#c=d,this.#d=B,uBe(this.#i),this.#U()}get status(){return this.#U(),structuredClone(this.#i)}accept(t,{contextSnapshot:o}={}){if(this.#d?.aborted)return Promise.resolve();let a=ZA(t?.msgId),e=C3(t);if(!a||!e||this.#I.hasSeen(a)||this.#B.has(a))return Promise.resolve();let i=String(t.conversationType)==="2"?"group":String(t.conversationType)==="1"?"direct":null,A;try{A=IBe(t,e)}catch{return xr(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString(),Promise.resolve()}let r=null;try{r=wc(t.sessionWebhook)}catch{}let s=this.#p.get(A),g=this.#E(t,A),c=ZA(g.content)??"",I=String(t.conversationType)!=="2"||t?.isInAtList===!0,d=String(t.conversationType)!=="2";if(I){let T=Ti(this.#g,{conversationType:i,senderIds:e,text:c,hasImages:Pt(g),hasFiles:Mt(g)});if(!T.allowed)return this.#B.set(a,null),this.#S(t,a,r,T)}this.#B.set(a,o===void 0?ni(this.#o,i):o),r&&d&&To(this.#I,{sessionWebhook:r});let B=r&&I?this.#m(t):null,f=T=>Promise.resolve(T).then(R=>(this.#Q(B,this.#d?.aborted?"clear":"success"),R),R=>{throw this.#Q(B,this.#d?.aborted||R?.name==="AbortError"||R?.code==="turn-stopped"?"clear":"error"),R}),Q=String(t?.msgtype).toLowerCase()==="text"&&La(c),y=this.#y.status(A);if(Q&&!d&&r&&I)return f(this.#O(a,r,{message:ps()},B));if(d&&r&&(Q||y.phase==="collecting")){let R=/^\/batch$/iu.test(c)&&y.phase==="idle"&&(this.#n.has(A)||s||this.#f.hasPending(A))?{handled:!0,kind:"busy",message:Lo()}:this.#y.handle(A,c,{plainText:!!c&&String(t?.msgtype).toLowerCase()==="text"&&!Mt(g)&&!Pt(g)&&!Kr(g)});if(R.handled)return R.kind==="submit"?f(this.#D({...t,msgtype:"text",text:{content:R.prompt}},a,e,A,{batchSubmission:R,statusReaction:B})):f(this.#O(a,r,R,B))}let m=ji(c)?go:Mt(g)?null:ha(c)?Pa:Ea(c)?co:ua(c)?Ga:null;if(m&&r&&I){let T;return T=this.#M(t,a,A,r,g,m).catch(R=>{if(R?.code==="turn-stopped"||this.#d?.aborted){this.#Q(B,"clear");return}this.#Q(B,"error"),this.#i.lastError=R?.message??String(R);let L=rt(this.#i,R);return this.#a.error?.(`[dsh-dingtalk] failed to process a command [${L.referenceId}]`,gy(R)),this.#L(r,ut(L),this.#F(t)).catch(()=>{})}).finally(()=>{this.#B.delete(a),this.#C.delete(T)}),this.#C.add(T),f(T)}let _=this.#f.claimReply({key:A,actor:e,messageId:a,text:r&&t?.msgtype==="text"?ZA(t?.text?.content)??"":"",addressed:String(t?.conversationType)!=="2"||t?.isInAtList===!0,hasPendingQuestion:!!s,questionCompletion:s?.submitting||s?.claimedReplyMessageId?s.queue:null,isQuestionPending:()=>this.#p.has(A),send:r?T=>this.#L(r,T,this.#F(t)):async()=>{}});if(_){let T;return T=_.process(async()=>this.#I.hasSeen(a)?!1:(await this.#I.markSeen(a),xr(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString(),r||(xr(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString(),this.#i.lastError=w("\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002")),!0)).catch(R=>{if(this.#d?.aborted){this.#Q(B,"clear");return}this.#Q(B,"error"),this.#i.lastError=w("\u9489\u9489\u5BA1\u6279\u5904\u7406\u5931\u8D25\u3002"),this.#a.error?.("[dsh-dingtalk] failed to process an approval reply",R)}).finally(()=>{this.#B.delete(a),this.#u.delete(T)}),this.#u.add(T),f(T)}if(s&&s.actor!==e)return f(this.#D(t,a,e,A,{statusReaction:B}));if(s?.submitting||s?.claimedReplyMessageId)return f(this.#D(t,a,e,A,{statusReaction:B}));if(s){EBe(t,s,e)&&(s.claimedReplyMessageId=a);let R=(s.queue??Promise.resolve()).catch(()=>{}).then(()=>this.#T(t,a,e,A,s,B)).finally(()=>{this.#B.delete(a),s.claimedReplyMessageId===a&&(s.claimedReplyMessageId=null),s.queue===R&&(s.queue=null)});return s.queue=R,f(R)}return f(this.#D(t,a,e,A,{statusReaction:B}))}#w(t,o,a,e){let i=new AbortController,A=Promise.resolve().then(()=>this.#e[t]({clientId:this.#A,clientSecret:this.#t,...o,reactionName:a,signal:i.signal})),r,s=new Promise((g,c)=>{r=setTimeout(()=>{let I=new DOMException("DingTalk reaction timed out","TimeoutError");i.abort(I),c(I)},this.#l),r.unref?.()});return Promise.race([A,s]).then(()=>(xr(this.#i,e==="add"?"reactionsAdded":"reactionsRemoved"),!0)).catch(g=>(xr(this.#i,"reactionErrors"),this.#a.debug?.(`[dsh-dingtalk] ${t} failed`,gy(g)),!1)).finally(()=>clearTimeout(r))}#m(t){if(typeof this.#e.addReaction!="function"||typeof this.#e.recallReaction!="function")return null;let o=ZA(t?.msgId),a=ZA(t?.conversationId);if(!o||!a)return null;let e={messageId:o,conversationId:a,robotCode:ZA(t?.robotCode)??this.#A};return{target:e,attached:this.#w("addReaction",e,WI,"add"),terminal:!1}}#Q(t,o){if(!t||t.terminal)return;t.terminal=!0;let a=o==="success"?GY:o==="error"?FY:null;t.attached.then(async e=>{let i=await this.#w("recallReaction",t.target,WI,"remove");(!e||!i)&&(await new Promise(A=>{setTimeout(A,Math.min(1e3,this.#l)).unref?.()}),i=await this.#w("recallReaction",t.target,WI,"remove")||i),!(!i||!a||this.#d?.aborted)&&await this.#w("addReaction",t.target,a,"add")}).catch(()=>{})}#D(t,o,a,e,{releaseMessageId:i=!0,alreadyRecorded:A=!1,batchSubmission:r=null,statusReaction:s=null}={}){let g=!1;try{wc(t.sessionWebhook),g=!0}catch{}let c=String(t.conversationType)!=="2"||t.isInAtList===!0,I=g&&c?$d(this.#E(t,e),{signal:this.#d}):void 0,B=(this.#n.get(e)??Promise.resolve()).catch(()=>{}).then(()=>this.#_(t,o,a,e,{alreadyRecorded:A,preparedMessage:I,batchSubmission:r,statusReaction:s})).finally(()=>{i&&this.#B.delete(o),this.#n.get(e)===B&&this.#n.delete(e)});return this.#n.set(e,B),B}#E(t,o){return y3(t,{api:this.#e,clientId:this.#A,clientSecret:this.#t,loadReplyContent:(a,e)=>this.#k(o,a,e)})}async#k(t,o,{signal:a}={}){let e=this.#I.recentOutboundTextFor?.({conversationKey:t,...o});if(e)return{content:e};let i=Q3(o?.createdAt);if(i===null)return{unavailableReason:"not-delivered"};let A=this.#I.sessionFor(t),r=typeof A=="string"&&A?this.#r.workspaceSession?.(A):null,s=await Ap({session:r,quotedAt:i,signal:a,toleranceMs:oy});if(!s)return{unavailableReason:"not-delivered"};try{await this.#I.rememberOutboundMessage?.({conversationKey:t,text:s,sentAt:i,completedAt:i,providerMessageIds:[o?.processQueryKey,o?.messageId].map(ZA).filter(Boolean)})}catch(g){this.#a.warn?.("[dsh-dingtalk] failed to remember a recovered quote:",g)}return{content:s}}async waitForIdle(){await Promise.allSettled([...this.#n.values(),...[...this.#p.values()].flatMap(t=>t.queue?[t.queue]:[]),...this.#u,...this.#C])}async#M(t,o,a,e,i,A){if(this.#d?.throwIfAborted(),this.#I.hasSeen(o))return;await this.#I.markSeen(o),xr(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString();let r=await A(ZA(i.content)??"",this.#r,this.#I,a,{signal:this.#d,isDirect:String(t.conversationType)==="1",hasImages:Pt(i),hasFiles:Mt(i),pendingInteraction:this.#p.has(a)||this.#f.hasPending(a),control:{owner:this,key:a}});r?.stopped&&await Promise.allSettled([this.#J(a),this.#f.closeRoute(a)]);for(let s of r?.messages??[r?.message])s&&await this.#L(e,s,this.#F(t));this.#i.lastError=null}#O(t,o,a,e){let i;return i=Promise.resolve().then(async()=>{this.#I.hasSeen(t)||(await this.#I.markSeen(t),xr(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString(),a.message&&await this.#L(o,a.message),this.#i.lastError=null)}).catch(async A=>{if(this.#d?.aborted){this.#Q(e,"clear");return}this.#Q(e,"error"),this.#i.lastError=A?.message??String(A);let r=rt(this.#i,A);this.#a.error?.(`[dsh-dingtalk] failed to process a batch input message [${r.referenceId}]`,gy(A)),await this.#L(o,ut(r)).catch(()=>{})}).finally(()=>{this.#B.delete(t),this.#C.delete(i)}),this.#C.add(i),i}#S(t,o,a,e){let i;return i=Promise.resolve().then(async()=>{this.#I.hasSeen(o)||(await this.#I.markSeen(o),e.reason==="command-not-allowed"&&a?(xr(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString(),await this.#L(a,w(lo),this.#F(t)),xr(this.#i,"messagesReplied"),this.#i.lastReplyAt=new Date().toISOString()):(xr(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString()),this.#i.lastError=null)}).catch(A=>{this.#d?.aborted||(this.#i.lastError=A?.message??String(A),this.#a.error?.("[dsh-dingtalk] failed to apply inbound access policy",A))}).finally(()=>{this.#B.delete(o),this.#C.delete(i)}),this.#C.add(i),i}async#_(t,o,a,e,{alreadyRecorded:i=!1,preparedMessage:A,batchSubmission:r=null,statusReaction:s=null}={}){if(this.#d?.throwIfAborted(),!i){if(this.#I.hasSeen(o))return;await this.#I.markSeen(o),xr(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString()}if(String(t.conversationType)==="2"&&t.isInAtList!==!0){xr(this.#i,"messagesIgnored");return}let g;try{g=wc(t.sessionWebhook)}catch{xr(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString(),this.#i.lastError=w("\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002");return}let c=A??this.#E(t,e),I=c.content,d=Pt(c),B=Mt(c),f=Kr(c),Q=String(t?.msgtype).toLowerCase()==="text",y=null,m=!1,_=null,T=r===null;try{if(!I&&!d&&!B&&!f){await this.#L(g,w("\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u6587\u4EF6\u6D88\u606F\u3002"),this.#F(t));return}let R=I.toLowerCase();if(Q&&!d&&!B&&R==="/help"){await this.#L(g,oBe(),this.#F(t));return}if(Q&&!d&&!B&&R==="/status"){await this.#r.ensureRunning({signal:this.#d}),await this.#L(g,w("\u9489\u9489\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002"),this.#F(t));return}if(Q&&!d&&!B&&R==="/new"){await this.#I.clearSession(e),await this.#L(g,w("\u5DF2\u5F00\u542F\u65B0\u4F1A\u8BDD\u3002\u8BF7\u53D1\u9001\u4F60\u7684\u95EE\u9898\u3002"),this.#F(t));return}let L=Q&&!d&&!B?await Po(I,this.#r,e):null;if(L){for(let ie of L.messages??[L.message])await this.#L(g,ie,this.#F(t));return}let U=Q&&!d&&!B?await va(I,this.#r,this.#I,e,{signal:this.#d}):null;if(U){await this.#L(g,U.message,this.#F(t));return}let F=d||f?await xo(c,{signal:this.#d}):void 0,J=this.#B.get(o),V=!1;if(J){let ie=F??I;F=Fo(ie,J,()=>({channel:"dingtalk",senderId:a,senderName:t.senderNick,conversationTitle:t.conversationTitle,chatId:t.conversationId})),V=F!==ie}if(typeof this.#e.createAiCard=="function"&&typeof this.#e.updateAiCard=="function"&&typeof this.#e.finishAiCard=="function"){y=xY({api:this.#e,clientId:this.#A,clientSecret:this.#t,target:lBe(t,a),signal:this.#d,logger:this.#a});let ie=Date.now();m=await y.start(w(iBe)),m&&(_=ie)}let{answer:H,artifacts:G=[]}=await ka({harness:this.#r,state:this.#I,key:e,text:I,content:F,contextEnhanced:V,createOptions:{signal:this.#d},existsOptions:{signal:this.#d},askOptions:{timeoutMs:this.#s,signal:this.#d,control:{owner:this,key:e},onUpdate:m?ie=>y.push(hBe(ie)):void 0,onInteraction:ie=>this.#P(ie,{key:e,actor:a,sessionWebhook:g,requiresMention:String(t.conversationType)==="2"}),onInteractionResolved:ie=>this.#N(ie),files:c.files}});r&&(this.#y.complete(e,r.token),T=!0);let q=typeof H=="string"&&H.trim()?H:G.length>0?w("\u7ED3\u679C\u6587\u4EF6\u5DF2\u751F\u6210\u3002"):H,K=null,N=null,k=!1,z=_??Date.now();try{k=m&&await y.finish(q),k?N=rr({deliveryId:o,presentation:"dingtalk-card",providerMessageIds:y.providerMessageIds}):N=rr({deliveryId:o,presentation:"dingtalk-text",providerMessageIds:await this.#L(g,q,this.#F(t))});try{await this.#I.rememberOutboundMessage?.({conversationKey:e,text:q,sentAt:z,completedAt:Date.now(),providerMessageIds:Hr(N)})}catch(ie){this.#a.warn?.("[dsh-dingtalk] failed to remember an outbound message:",ie)}}catch(ie){K=Yi(ie)}let X=await this.#V(dBe(t,a,this.#A),g,o,G,N);if(K&&!X.userVisible)throw K;return K&&X.artifactSendErrors===0&&rt(this.#i,K),xr(this.#i,"messagesReplied"),this.#i.lastReplyAt=new Date().toISOString(),this.#i.lastError=null,!K&&X.artifactSendErrors===0&&No(this.#i),X.receipt}catch(R){let L=null;if(!T&&r&&(R?.code==="turn-stopped"?this.#y.complete(e,r.token):L=this.#y.fail(e,r.token).message??null,T=!0),R?.code==="turn-stopped"){this.#Q(s,"clear"),m&&await y.finish(w("\u5DF2\u505C\u6B62\u3002")).catch(()=>{});return}if(this.#d?.aborted){this.#Q(s,"clear");return}this.#Q(s,"error"),this.#i.lastError=R?.message??String(R);let U=Ho(R)??sBe(R),F=rt(this.#i,R,{userMessage:U,reason:so(R)?.reason});this.#a.error?.(`[dsh-dingtalk] failed to process an inbound message [${F.referenceId}]`,gy(R));try{let J=ut(F),V=L?`${J} -${L}`:z;m&&await y.finish(J)||await this.#L(g,J,this.#F(t))}catch{this.#a.error?.("[dsh-dingtalk] failed to send the safe error reply")}}finally{await this.#J(e),await this.#f.closeRoute(e)}}async#T(t,o,a,e,i,A){this.#d?.throwIfAborted();let r=this.#p.get(e),s=i.claimedReplyMessageId===o;if(!r||r!==i||r.submitting)return s&&(!r||r!==i)?this.#R(t,o):this.#D(t,o,a,e,{releaseMessageId:!1,statusReaction:A});if(this.#I.hasSeen(o))return;if(await this.#I.markSeen(o),xr(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString(),String(t.conversationType)==="2"&&t.isInAtList!==!0){xr(this.#i,"messagesIgnored");return}let g;try{g=Sc(t.sessionWebhook)}catch{xr(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString(),this.#i.lastError=w("\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002");return}let c=t?.msgtype==="text"?ZA(t?.text?.content):null;if(!c){try{await this.#L(g,w("\u8BF7\u7528\u6587\u5B57\u56DE\u7B54\u5F53\u524D\u95EE\u9898\u3002"),this.#F(t))}catch{this.#a.error?.("[dsh-dingtalk] failed to reject a non-text interaction reply")}return}let I=this.#p.get(e);if(!I||I!==i||I.submitting){if(s&&(!I||I!==i)){try{await this.#L(g,w(wT),this.#F(t))}catch{this.#a.error?.("[dsh-dingtalk] failed to send an expired interaction notice")}return}return this.#D(t,o,a,e,{releaseMessageId:!1,alreadyRecorded:!0,statusReaction:A})}if(I.sessionWebhook=g,I.needsPresentation){try{await this.#G(I)}catch{this.#Q(A,"error"),this.#i.lastError=w("\u9489\u9489\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002"),this.#a.error?.("[dsh-dingtalk] failed to retry an interaction question"),I.interaction.reconnect?.()}return}let d=I.questions[I.index];if(d){if(I.answers.push(Na(d,c)),I.index+=1,I.indexthis.#L(e,c)})||t?.kind!=="question")return;let A=t?.payload?.questions,r=typeof t?.interactionId=="string"?t.interactionId:t?.rpcId;if(typeof t.rpcId!="string"||typeof r!="string"||typeof t.sessionId!="string"||!Array.isArray(A)||A.length===0||A.some(c=>!Ta(c))){this.#a.warn?.("[dsh-dingtalk] ignored an invalid Harness question interaction");return}if(t.recovered===!0){await t.respond({ok:!1,error:{code:"cancelled",message:"DingTalk safely cancelled an interaction left by an earlier client.",details:{}}});try{await this.#L(e,w("\u68C0\u6D4B\u5230\u8FD9\u4E2A Session \u4E2D\u9057\u7559\u7684\u5F85\u56DE\u7B54\u95EE\u9898\uFF0C\u5DF2\u5B89\u5168\u53D6\u6D88\u5E76\u7EE7\u7EED\u5904\u7406\u4F60\u521A\u624D\u7684\u6D88\u606F\u3002"))}catch{this.#a.error?.("[dsh-dingtalk] failed to send an interaction recovery notice")}return}let s=this.#p.get(o);if(s?.interactionId===r){s.interaction=t,s.needsPresentation&&await this.#G(s);return}if(this.#h.has(r))return;if(s){this.#a.warn?.("[dsh-dingtalk] cancelled a second pending Harness question"),await t.respond({ok:!1,error:{code:"cancelled",message:"DingTalk is already handling another user interaction.",details:{}}});return}let g={kind:"question",interactionId:r,sessionId:t.sessionId,interaction:t,actor:a,requiresMention:i,questions:A,answers:[],index:0,sessionWebhook:e,queue:null,claimedReplyMessageId:null,submitting:!1,needsPresentation:!0};this.#p.set(o,g),this.#h.set(g.interactionId,o),await this.#G(g)}async#N(t){if(await this.#f.handleResolved(t))return;let o=t?.interactionId;if(t?.kind!=="question"||typeof o!="string")return;let a=this.#h.get(o);a&&this.#K(a,o)}async#G(t){let o=t.questions[t.index];o&&(await this.#L(t.sessionWebhook,da(o,t.index,t.questions.length,{requiresMention:t.requiresMention})),t.needsPresentation=!1)}async#R(t,o){if(this.#I.hasSeen(o))return;await this.#I.markSeen(o),xr(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString();let a;try{a=Sc(t.sessionWebhook)}catch{xr(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString();return}try{await this.#L(a,w(wT),this.#F(t))}catch{this.#a.error?.("[dsh-dingtalk] failed to send an expired interaction notice")}}#x(t,o){let a=this.#p.get(t);return!a||o!==void 0&&a.interactionId!==o?null:(this.#p.delete(t),this.#h.delete(a.interactionId),a)}#K(t,o){return this.#x(t,o)!==null}async#J(t){let o=this.#x(t);if(!(!o||o.kind!=="question"))try{await o.interaction.respond({ok:!1,error:{code:"cancelled",message:"The DingTalk interaction ended before the user answered.",details:{}}},{signal:AbortSignal.timeout(5e3)})}catch(a){a?.code!=="interaction-not-pending"&&this.#a.warn?.("[dsh-dingtalk] failed to cancel a pending Harness interaction")}}#U(){typeof this.#I.pendingSenders=="function"&&(this.#i.pendingSenders=this.#I.pendingSenders())}#F(t){let o=C3(t);return String(t?.conversationType)==="2"&&o?{atUserIds:[o]}:void 0}async#L(t,o,a){let e=[];for(let i of UY(o,this.#c)){this.#d?.throwIfAborted();let A=await this.#e.sendText({clientId:this.#A,clientSecret:this.#t,sessionWebhook:t,text:i,at:a,signal:this.#d});e.push(...Hr(A))}return e}async#V(t,o,a,e,i){let A=async(s,g)=>iBe(await this.#e[s]({clientId:this.#A,clientSecret:this.#t,target:t,file:g,signal:this.#d})),r=await Ko({artifacts:e,baseReceipt:i,deliveryId:a,aggregatePresentation:i?"dingtalk-text-and-files":"dingtalk-files",channelKey:"dingtalk",signal:this.#d,sendImage:typeof this.#e.sendImage=="function"?s=>A("sendImage",s):void 0,sendFile:typeof this.#e.sendFile=="function"?s=>A("sendFile",s):void 0,onFailure:(s,g)=>rt(this.#i,g,{userMessage:IBe(s?.fileName,g),reason:g?.code}),sendFailureNotice:(s,g,c)=>this.#L(o,ut(c)),logger:this.#a});return this.#i.artifactsSent=(this.#i.artifactsSent??0)+r.artifactsSent,this.#i.artifactSendErrors=(this.#i.artifactSendErrors??0)+r.artifactSendErrors,{receipt:r.receipt,userVisible:r.userVisible,artifactSendErrors:r.artifactSendErrors}}};function Iy(n){return typeof n=="string"&&n.trim()?n.trim():null}function m3(n){let t=Array.isArray(n?.approvedSenders)?n.approvedSenders:n?.approvedSenders instanceof Set?[...n.approvedSenders]:[];return new Set(t.map(o=>Iy(typeof o=="string"?o:o?.staffId)).filter(Boolean))}function hBe(n){return m3(n).size}function S3(n){return n?.connected===!0||n?.socket?.readyState===1}function EBe(n,t){return new Promise((o,a)=>{if(t.aborted){a(t.reason);return}let e=()=>a(t.reason);t.addEventListener("abort",e,{once:!0}),Promise.resolve(n).then(i=>{t.removeEventListener("abort",e),o(i)},i=>{t.removeEventListener("abort",e),a(i)})})}async function uBe(n,t,o){for(;;){if(o?.throwIfAborted(),S3(n))return;await new Promise((a,e)=>{let i=setTimeout(()=>{o?.removeEventListener("abort",A),a()},t),A=()=>{clearTimeout(i),e(o.reason??new DOMException("Aborted","AbortError"))};o?.addEventListener("abort",A,{once:!0})})}}async function CBe(n,t,o,a){let e=AbortSignal.timeout(t),i=AbortSignal.any([a,e]),A=!1,r=Promise.resolve().then(()=>n.connect()).finally(()=>{A=!0});try{await EBe(r,i),await uBe(n,o,i)}catch(s){throw i.aborted?(A||r.then(()=>n.disconnect()).catch(()=>{}),a.aborted?a.reason:new Error(`DingTalk Stream handshake timed out after ${t}ms`)):s}}async function BBe({clientId:n,clientSecret:t}){let{DWClient:o,TOPIC_ROBOT:a}=await import("dingtalk-stream");return{client:new o({clientId:n,clientSecret:t,endpoint:"https://api.dingtalk.com",autoReconnect:!1,keepAlive:!0,debug:!1}),topic:a}}function fBe({pendingSenders:n=[],approvedSenders:t=0}={}){return{startedAt:null,ready:!1,dingtalkStreamState:"idle",harnessReachable:!1,lastConnectedAt:null,lastCheckedAt:null,lastCallbackAt:null,authorizationMode:"sender-staff-id-approval",approvedSenderCount:t,...OT({pendingSenders:n})}}var Eu=class{#e;#A;#t;#r;#I;#o;#g;#i;#a;#s;#l;#c;#d;#n;#p=null;#h=null;#u=null;#C=null;#B=null;#f=null;#y=new Set;constructor({config:t,clientSecret:o,harness:a,state:e,contextEnhancement:i,accessPolicy:A,logger:r=console,replyTimeoutMs:s=6e5,maxMessageChars:g=4e3,connectTimeoutMs:c=15e3,connectPollIntervalMs:I=25,api:d=HY(),streamFactory:B=BBe}){if(!t||!Iy(t.clientId)||!Iy(o))throw new TypeError("DingtalkRuntime requires app credentials");if(!a||!e)throw new TypeError("DingtalkRuntime requires Harness and state");if(typeof B!="function")throw new TypeError("streamFactory must be a function");this.#e=t,this.#A=o.trim(),this.#t=a,this.#r=e,this.#I=i,this.#o=A,this.#g=r,this.#i=s,this.#a=g,this.#s=c,this.#l=I,this.#c=d,this.#d=B,this.#n=fBe({pendingSenders:this.#m(),approvedSenders:hBe(t)})}get status(){if(this.#h){let t=this.#h.status;Object.assign(this.#n,t)}else this.#n.pendingSenders=this.#m();return structuredClone(this.#n)}pendingSender(t){return typeof this.#r.pendingSender=="function"?this.#r.pendingSender(t):null}pendingSenders(){return this.#m()}async start(){return this.#p&&this.#n.ready?this.status:this.#C?this.#C:(this.#C=this.#w().finally(()=>{this.#C=null}),this.#C)}async#w(){await this.stop();let t=new AbortController;this.#f=t;let{signal:o}=t;this.#n.startedAt=new Date().toISOString(),this.#n.dingtalkStreamState="connecting",this.#n.lastError=null;let a="dingtalk-harness-connect-failed";try{if(await this.#t.ensureRunning({signal:o}),this.#n.harnessReachable=!0,a="dingtalk-runtime-prepare-failed",typeof this.#r.removePendingSenderByStaffId=="function"){for(let r of m3(this.#e))await this.#r.removePendingSenderByStaffId(r);this.#n.pendingSenders=this.#m()}this.#h=new cy({api:this.#c,clientId:this.#e.clientId,clientSecret:this.#A,approvedSenders:this.#e.approvedSenders,harness:this.#t,state:this.#r,contextEnhancement:this.#I,accessPolicy:this.#o,status:this.#n,logger:this.#g,replyTimeoutMs:this.#i,maxMessageChars:this.#a,signal:o}),a="dingtalk-stream-client-load-failed";let e=await this.#d({clientId:this.#e.clientId,clientSecret:this.#A});if(o.throwIfAborted(),this.#p=e?.client??e,this.#u=e?.topic??e?.TOPIC_ROBOT??"/v1.0/im/bot/messages/get",!this.#p||typeof this.#p.registerCallbackListener!="function"||typeof this.#p.connect!="function"||typeof this.#p.disconnect!="function"||typeof this.#p.socketCallBackResponse!="function")throw new TypeError("streamFactory returned an invalid DingTalk Stream client");let i=this.#p,A=this.#h;return a="dingtalk-stream-listener-failed",i.registerCallbackListener(this.#u,r=>{if(this.#p!==i||this.#h!==A)return;let s=Iy(r?.headers?.messageId);if(s)try{i.socketCallBackResponse(s,{success:!0})}catch{this.#g.warn?.("[dsh-dingtalk] unable to acknowledge an inbound callback")}let g=this.#I,c;try{c=g?.getSettings?.()}catch{}let I=Promise.resolve().then(async()=>{if(this.#h!==A)return;let d;try{d=typeof r?.data=="string"?JSON.parse(r.data):r?.data}catch{this.#n.lastError=w("\u9489\u9489\u6D88\u606F\u683C\u5F0F\u65E0\u6548\u3002"),this.#g.warn?.("[dsh-dingtalk] ignored an invalid callback payload");return}if(!d||typeof d!="object")return;this.#n.lastCallbackAt=Date.now();let B=ni({getSettings:()=>c,get botId(){return g?.botId}},d.conversationType==="1"||d.conversationType===1?"direct":d.conversationType==="2"||d.conversationType===2?"group":null);await A.accept(d,{contextSnapshot:B})}).catch(()=>{o.aborted||this.#h!==A||(this.#n.lastError=w("\u9489\u9489\u6D88\u606F\u5904\u7406\u5931\u8D25\u3002"),this.#g.error?.("[dsh-dingtalk] callback processing failed"))}).finally(()=>this.#y.delete(I));this.#y.add(I)}),a="dingtalk-stream-connect-failed",await CBe(i,this.#s,this.#l,o),this.#n.ready=!0,this.#n.dingtalkStreamState="connected",this.#n.lastConnectedAt=Date.now(),this.#n.lastCheckedAt=Date.now(),this.#n.lastError=null,this.#B=setInterval(()=>{let r=S3(i);this.#n.ready=r,this.#n.dingtalkStreamState=r?"connected":"reconnecting",this.#n.lastCheckedAt=Date.now(),r&&(this.#n.lastError=null)},1e3),this.#B.unref?.(),this.status}catch(e){let i=o.aborted,A=i?e:Yd(a,e);throw this.#n.ready=!1,this.#n.dingtalkStreamState=i?"idle":"failed",this.#n.lastError=i?null:A?.message??String(A),await this.stop({preserveError:!i}),A}}async stop({preserveError:t=!1}={}){let o=t?this.#n.lastError:null,a=this.#f;this.#f=null,a?.abort(new DOMException("DingTalk runtime stopped","AbortError")),this.#B&&clearInterval(this.#B),this.#B=null,this.#n.ready=!1;let e=this.#p;if(this.#p=null,this.#u=null,e)try{await e.disconnect()}catch{this.#g.warn?.("[dsh-dingtalk] DingTalk Stream disconnect failed")}return await Promise.allSettled([...this.#y]),this.#y.clear(),this.#h&&await this.#h.waitForIdle(),this.#h=null,this.#n.dingtalkStreamState=t?"failed":"idle",this.#n.lastError=o,this.status}async sendConnectionTest(t){return yc({state:this.#r,text:t,channelLabel:w("\u9489\u9489\u673A\u5668\u4EBA"),send:async({sessionWebhook:o},a)=>{if(!this.#n.ready||!this.#f)throw new Error("DingTalk runtime is not connected");await this.#c.sendText({clientId:this.#e.clientId,clientSecret:this.#A,sessionWebhook:o,text:a,signal:this.#f.signal})}})}async sendProactiveText(t,o,{signal:a}={}){let e=typeof t?.route?.userId=="string"?t.route.userId.trim():"",i=typeof t?.route?.openConversationId=="string"?t.route.openConversationId.trim():"";if(t?.kind==="user"&&(!e||i)||t?.kind==="group"&&(!i||e)||t?.kind!=="user"&&t?.kind!=="group"){let A=new TypeError("Invalid DingTalk proactive delivery target");throw A.code="invalid-target",A}if(!this.#n.ready||!this.#f){let A=new Error("DingTalk runtime is not connected");throw A.code="bot-not-connected",A}a?.throwIfAborted();try{await this.#c.sendRobotText({clientId:this.#e.clientId,clientSecret:this.#A,target:{type:t.kind,robotCode:this.#e.clientId,...t.kind==="user"?{userId:e}:{openConversationId:i}},text:o,signal:a??this.#f.signal})}catch(A){if(A?.code!=="send-rejected")throw A;let r=new Error("DingTalk rejected the proactive delivery target",{cause:A});throw r.code="target-rejected",r}return{sent:!0}}#m(){return typeof this.#r.pendingSenders=="function"?this.#r.pendingSenders():[]}};import{spawn as _Be}from"node:child_process";import{randomUUID as bT}from"node:crypto";import{isAbsolute as TBe}from"node:path";import{isAbsolute as QBe}from"node:path";var yBe=256,mBe=/[\p{White_Space}\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u,SBe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u;function uu(n,t){let o=new Error(t);return o.code=n,o}function wBe(n){if(typeof n!="string"||!n||n.length>yBe||mBe.test(n))throw uu("session-id-invalid","A non-empty, safe session id is required");return n}function DBe(n,t){if(!Array.isArray(t?.items)||!Array.isArray(t?.archivedSessionIds)||t.archivedSessionIds.some(a=>typeof a!="string"||!a))throw new Error("Harness returned an invalid response for workspace.list");let o=[];for(let a of t.items){if(typeof a?.workspaceId!="string"||!a.workspaceId||typeof a.path!="string"||!QBe(a.path)||!Array.isArray(a.sessionIds)||a.sessionIds.some(e=>typeof e!="string"||!e))throw new Error("Harness returned an invalid response for workspace.list");for(let e of a.sessionIds)e===n&&o.push(a)}if(o.length===0)throw uu("session-not-registered","The session is not registered to a Harness workspace");if(o.length!==1)throw uu("session-workspace-ambiguous","The session is registered to more than one Harness workspace");if(SBe.test(o[0].path))throw new Error("Harness returned an unsafe workspace path for the session");return{workspace:o[0],archived:t.archivedSessionIds.includes(n)}}function OBe(n,t){if(!Array.isArray(t?.items)||t.items.some(i=>typeof i?.sessionId!="string"||!i.sessionId))throw new Error("Harness returned an invalid response for session.list");let o=t.items.filter(i=>i.sessionId===n);if(o.length===0)throw uu("session-summary-unavailable","The session is no longer available from Harness");if(o.length!==1)throw new Error("Harness returned duplicate session summaries for session.list");let[a]=o;if(a.origin==="subagent")throw uu("session-subagent-unsupported","Subagent sessions cannot be adopted as a bot conversation");if(a.origin!==void 0)throw new Error("Harness returned an invalid session origin for session.list");let e=a.projections?.values?.title;if(e!=null&&typeof e!="string")throw new Error("Harness returned an invalid session title for session.list");return{title:typeof e=="string"?e:null}}async function w3(n,t,o={},a=3e4){let e=wBe(t);await n.ensureRunning(o);let i=await n.rpc("workspace.list",{},a,o),{workspace:A,archived:r}=DBe(e,i),s=OBe(e,await n.rpc("session.list",{},a,o)),g=await n.rpc("session.create",{workspaceId:A.workspaceId,sessionId:e},a,o);if(!g||g.sessionId!==e)throw new Error("Harness returned an invalid response for session.create");return{sessionId:e,workspace:A.path,title:s.title,archived:r}}function Cu(n,t,o){try{let a=n?.(t);a&&typeof a.then=="function"&&Promise.resolve(a).catch(o)}catch(a){o(a)}}async function bBe({apiProxy:n,rpcId:t,signal:o,onOpen:a,onEnvelope:e}){let i=new AbortController,A=()=>i.abort(o.reason),r,s,g,c=I=>{i.signal.aborted||(g=I,A())};o.addEventListener("abort",A,{once:!0});try{for(r=n.events.mux({rpcId:t,payload:{}},i.signal)[Symbol.asyncIterator](),s=Promise.resolve(r.next()),i.signal.aborted||Cu(a,A,c);!i.signal.aborted;){let{value:I,done:d}=await s;if(d||i.signal.aborted)break;Cu(e,{type:"server-request",rpcId:I?.rpcId,method:I?.payload?.type,payload:I?.payload},c),i.signal.aborted||(s=Promise.resolve(r.next()))}}catch(I){c(I)}finally{let I=i.signal.aborted;o.removeEventListener("abort",A),A(),await s?.catch(()=>{});try{await r?.return?.()}catch(d){I||(g??=d)}}if(g)throw g}function MBe({baseUrl:n,createWebSocket:t,signal:o,onOpen:a,onEnvelope:e,onMalformed:i}){let A=new URL("/api/events.mux",n);return A.protocol=A.protocol==="https:"?"wss:":"ws:",new Promise((r,s)=>{let g=t(A.toString()),c=!1,I=!1,d=T=>{if(!I){I=!0,g.removeEventListener("open",f),g.removeEventListener("message",Q),g.removeEventListener("close",y),g.removeEventListener("error",m),o.removeEventListener("abort",_);try{(g.readyState===0||g.readyState===1)&&g.close()}catch{}T&&!o.aborted?s(T):r()}},B=()=>d(),f=()=>{I||c||(c=!0,Cu(a,B,d))},Q=T=>{if(I)return;let R;try{if(typeof T.data!="string")throw new Error("binary WebSocket frame");R=JSON.parse(T.data)}catch(L){Cu(i,L,()=>{});return}Cu(e,R,d)},y=()=>d(c?void 0:new Error("Harness event mux WebSocket closed before opening")),m=()=>d(new Error(c?"Harness event mux WebSocket failed":"Harness event mux WebSocket failed before opening")),_=()=>d();g.addEventListener("open",f),g.addEventListener("message",Q),g.addEventListener("close",y,{once:!0}),g.addEventListener("error",m,{once:!0}),o.addEventListener("abort",_,{once:!0}),o.aborted&&_()})}async function D3(n){if(!n.signal.aborted)return n.baseUrl!==void 0&&n.baseUrl!==null?MBe(n):bBe(n)}var NBe=new Map,RBe=new WeakMap,kBe=64;async function vBe(n){let t=n?.body;if(!t||typeof t.getReader!="function")return null;let o=t.getReader(),a=[],e=0;try{for(;;){let{done:r,value:s}=await o.read();if(r)break;if(!(s instanceof Uint8Array)||e+s.byteLength>kBe)return null;a.push(s),e+=s.byteLength}}catch{return null}finally{try{await o.cancel()}catch{}}let i=new Uint8Array(e),A=0;for(let r of a)i.set(r,A),A+=r.byteLength;return new TextDecoder().decode(i)}function PBe(n){if(n==="localhost"||n==="[::1]")return!0;let t=n.split(".");return t.length===4&&t[0]==="127"&&t.every(o=>/^\d{1,3}$/.test(o)&&Number(o)<=255)}async function GBe(n,t){return n.status===401?"harness-auth-required":n.status===407?"harness-proxy-auth-required":n.status===403?(await vBe(n))?.trim()!=="forbidden"?"harness-request-forbidden":PBe(t)?"harness-loopback-forbidden":"harness-host-untrusted":n.status===404?"harness-api-not-found":"harness-http-failed"}function N3(n){let t=typeof n=="string"?NBe:RBe,o=t.get(n);return o||(o={ownerships:new Map,claims:new Map,controls:new WeakMap,nextOrder:0},t.set(n,o)),o}function O3(n,t){return new Promise((o,a)=>{let e=()=>t.removeEventListener("abort",i),i=()=>{e(),a(t.reason)};if(t.aborted){i();return}t.addEventListener("abort",i,{once:!0}),Promise.resolve().then(()=>(t.throwIfAborted(),n())).then(A=>{e(),o(A)},A=>{e(),a(A)})})}function b3(n){let t=typeof n?.owner;return t!=="object"&&t!=="function"||n.owner===null||typeof n.key!="string"||!n.key?null:{owner:n.owner,key:n.key}}function MT(n){return n!==null&&typeof n=="object"&&typeof n.provider=="string"&&!!n.provider&&typeof n.model=="string"&&!!n.model&&(n.reasoningEffort===void 0||typeof n.reasoningEffort=="string"&&!!n.reasoningEffort)}function FBe(n){return n!==null&&typeof n=="object"&&Array.isArray(n.efforts)&&n.efforts.length>0&&n.efforts.every(t=>t!==null&&typeof t=="object"&&typeof t.id=="string"&&!!t.id&&typeof t.name=="string"&&!!t.name&&(t.description===void 0||typeof t.description=="string"))&&(n.defaultEffort===void 0||typeof n.defaultEffort=="string"&&!!n.defaultEffort)}function M3(n,t,{session:o=!1}={}){if(!n||typeof n!="object"||!Array.isArray(n.groups)||!Array.isArray(n.failures))throw new Error(`Harness returned an invalid response for ${t}`);for(let a of n.groups){if(!a||typeof a!="object"||typeof a.id!="string"||!a.id||typeof a.name!="string"||!a.name||!Array.isArray(a.models))throw new Error(`Harness returned an invalid response for ${t}`);for(let e of a.models)if(!e||typeof e!="object"||typeof e.id!="string"||!e.id||typeof e.name!="string"||!e.name||e.description!==void 0&&typeof e.description!="string"||e.reasoning!==void 0&&!FBe(e.reasoning))throw new Error(`Harness returned an invalid response for ${t}`)}for(let a of n.failures)if(!a||typeof a!="object"||typeof a.id!="string"||!a.id||typeof a.name!="string"||!a.name||a.message!==void 0&&typeof a.message!="string")throw new Error(`Harness returned an invalid response for ${t}`);if(o&&(!MT(n.current)||typeof n.routable!="boolean"))throw new Error(`Harness returned an invalid response for ${t}`);return n}function _3(){let n=new Error("Harness turn was stopped before producing a text reply");return n.code="turn-stopped",n}function LBe(n){return Array.isArray(n?.items)?n.items.flatMap(t=>typeof t?.path=="string"&&TBe(t.path)?[t.path]:[]):[]}function UBe(n,t){if(!Array.isArray(t?.items)||!Array.isArray(t?.archivedSessionIds))throw new Error("Harness returned an invalid response for workspace.list");let o=t.items.find(a=>a?.path===n);if(!o)return null;if(!Array.isArray(o.sessionIds)||o.sessionIds.some(a=>typeof a!="string"))throw new Error("Harness returned invalid session IDs for workspace.list");return o}function HBe(n){if(typeof n=="number"&&Number.isFinite(n))return n<1e12?n*1e3:n;if(typeof n=="string"&&n){let t=Date.parse(n);if(!Number.isNaN(t))return t}return null}function KBe(n){if(!n||typeof n!="object")return null;let t=[n?.header?.lastActivityAt,n?.header?.updatedAt,n?.header?.createdAt,n?.projections?.values?.lastActivityAt,n?.projections?.values?.updatedAt,n?.projections?.values?.createdAt,n?.lastActivityAt,n?.updatedAt,n?.createdAt];for(let o of t){let a=HBe(o);if(a!==null)return a}return null}function xBe(n,t,o){if(!Array.isArray(o?.items))throw new Error("Harness returned an invalid response for session.list");let a=new Set(t),e=new Map(o.items.flatMap(i=>typeof i?.sessionId=="string"?[[i.sessionId,i]]:[]));return{workspace:n.path,sessions:n.sessionIds.map(i=>{let A=e.get(i),r=A?.projections?.values?.title,s={sessionId:i,title:typeof r=="string"?r:null,archived:a.has(i),blank:A?.blank===!0,origin:A?.origin==="subagent"?"subagent":null,summaryAvailable:A!==void 0},g=A?.projections?.asOfSeq;Number.isSafeInteger(g)&&g>=-1&&(s.lastSeq=g);let c=KBe(A);return c!==null&&(s.time=c),s})}}function Bu(n,t){return new Promise((o,a)=>{if(t?.aborted){a(t.reason??new DOMException("Aborted","AbortError"));return}let e=setTimeout(()=>{t?.removeEventListener("abort",i),o()},n),i=()=>{clearTimeout(e),a(t.reason??new DOMException("Aborted","AbortError"))};t?.addEventListener("abort",i,{once:!0})})}function YBe(n){return(n?.data?.message?.content??[]).filter(t=>t.type==="text"&&typeof t.text=="string").map(t=>t.text).join(` -`).trim()}function Ua(n){return typeof n=="string"&&n.trim()?n.trim():null}function jBe(n){if(!n||typeof n!="object")return null;let t=Ua(n.message);if(t)return t;let o=Ua(n.name),a=Ua(n.code);return o||a?[o??"Error",a].filter(Boolean).join(": "):null}function R3(n,t){let o=[...t].map(a=>a?.event??a).filter(Boolean).sort((a,e)=>(a.seq??-1)-(e.seq??-1));for(let a of o){let e=a.seq??-1;if(e<=n.lastSeq)continue;if(n.lastSeq=e,a.type==="turn/start"){let A=a.data?.turn??null;n.active&&A!==n.turn&&(n.active=!1),n.turn!==null&&A!==n.turn&&(n.completed=!0),n.openTurn=A;continue}if(a.type==="user/message"&&a.data?.source?.rpcId===n.promptRpcId){n.active=!0,n.started=!0,n.completed=!1,n.turn=a.data?.turn??n.openTurn;continue}if(a.type==="turn/end"&&a.data?.turn===n.turn){n.active=!1,n.completed=!0;continue}let i=null;if(a.type==="tool/call"&&n.active&&a.data?.turn===n.turn&&typeof a.data?.callId=="string"&&a.data.callId)i={callId:a.data.callId,name:a.data?.name,arguments:a.data?.arguments};else if(a.type==="tool/code-dispatch-start"&&n.active&&typeof a.data?.subCallId=="string"&&a.data.subCallId){let A;try{A=JSON.stringify(a.data?.arguments)}catch{A=void 0}i={callId:a.data.subCallId,name:a.data?.name,arguments:A}}i&&n.toolCalls.set(i.callId,Object.freeze(i))}}function k3(n,t,o=[]){if(!n||!["object","function","string"].includes(typeof n)||typeof t!="string"||!t)return!1;let a=N3(n).ownerships.get(t);if(!a||a.size===0)return!1;for(let e of a)R3(e,o);return[...a].some(e=>e.active&&!e.completed&&typeof e.reconnect=="function")}var ip=class{#e;#A;#t=null;#r=null;#I=new Map;#o="";#g=!1;#i=null;#a=new Map;#s=null;constructor({promptRpcId:t,afterSeq:o=-1}){this.#e=t,this.#A=o}get finished(){return this.#g}get lastSeq(){return this.#A}get answer(){return this.#o.trim()}get reason(){return this.#i}get tracking(){return this.#r!==null&&!this.#g}get turn(){return this.#r}consumeAll(t){let o=[],a=i=>{if(i.type==="text"&&o.length>0&&o[o.length-1].type==="text"){o[o.length-1]=i;return}o.push(i)},e=[...t].map(i=>i?.event??i).filter(Boolean).sort((i,A)=>(i.seq??-1)-(A.seq??-1));for(let i of e){let A=i.seq??-1;if(!(A<=this.#A)){if(this.#A=A,i.type==="turn/start"&&(this.#t=i.data?.turn??null),i.type==="user/message"&&i.data?.source?.rpcId===this.#e){this.#r=this.#t;continue}if(this.#r!==null){if(i.type==="turn/end"){if(i.data?.turn!==this.#r)continue;this.#g=!0,this.#i=i.data?.reason??null,this.#t=null;continue}if(i.data?.turn===this.#r){if(i.type==="assistant/chunk"&&i.data?.chunk?.type==="text-delta"){let r=i.data?.step??0,s=i.data.chunk.index??0,g=`${r}:${s}`;this.#I.set(g,(this.#I.get(g)??"")+i.data.chunk.text);let c=`${r}:`,I=[...this.#I.entries()].filter(([d])=>d.startsWith(c)).sort(([d],[B])=>Number(d.split(":")[1])-Number(B.split(":")[1])).map(([,d])=>d).join(` -`).trim();I&&I!==this.#o&&(this.#o=I,a({type:"text",text:I}));continue}if(i.type==="assistant/message"){let r=YBe(i);r&&r!==this.#o&&(this.#o=r,a({type:"text",text:r}));continue}if(i.type==="tool/call"){let r=Ua(i.data?.name)??w("\u5DE5\u5177"),s=Ua(i.data?.callId)??Ua(i.data?.subCallId);s&&this.#a.set(s,r),this.#s=r,a({type:"tool",name:r,...s?{callId:s}:{}})}else if(i.type==="tool/result"){let r=Ua(i.data?.message?.source?.callId)??Ua(i.data?.callId)??Ua(i.data?.subCallId),s=(r?this.#a.get(r):null)??this.#s,g=jBe(i.data?.error);a({type:"status",text:w("\u6B63\u5728\u6574\u7406\u7ED3\u679C\u2026"),...s?{toolName:s}:{},...g?{error:g}:{}})}}}}}return o}consume(t){return this.consumeAll(t).at(-1)??null}},Mn=class extends Error{constructor(t,o){super(`${t}: ${o?.message??"unknown Harness RPC error"}`),this.name="HarnessRpcError",this.method=t,this.code=o?.code??"internal",this.details=o?.details??{}}},us=class extends Error{constructor(t,o,{cause:a,status:e}={}){let i=Number.isInteger(e)?`, HTTP ${e}`:"";super(`Harness ${o} transport failed (${t}${i})`,{cause:a}),this.name="HarnessTransportError",this.code=t,this.method=o,Number.isInteger(e)&&(this.status=e)}},_T=class extends Error{constructor(t){super("Harness health RPC was rejected",{cause:t}),this.name="HarnessHealthError",this.code="harness-rpc-rejected",this.method="host.describe"}},ap=class extends Error{constructor(t,o){super(o),this.name="HarnessInteractionError",this.code=t}},Cs=class extends Error{constructor(t,{reason:o,providerCode:a}={}){super(`Harness turn failed (${t})`),this.name="HarnessTurnError",this.code=t,this.promptAccepted=!0,o&&typeof o=="object"&&(this.reason=o),typeof a=="string"&&a&&(this.providerCode=a)}};function T3(n){let t=Ua(n?.kind)??Ua(n);if(t==="error"){let o=n?.error??n?.failure;return new Cs("harness-turn-failed",{reason:n,providerCode:Ua(o?.code)??void 0})}return t==="max-tokens"?new Cs("model-max-tokens",{reason:n}):t==="blocked"?new Cs("turn-blocked",{reason:n}):["interrupted","stopped","cancelled","canceled"].includes(t)?new Cs("turn-interrupted",{reason:n}):t==="aborted"?new Cs("turn-aborted",{reason:n}):t==="completed"?new Cs("model-empty-response",{reason:n}):new Cs("harness-turn-failed",{reason:n})}function JBe(n){return n==null?!0:(Ua(n?.kind)??Ua(n))==="completed"}var yr=class{#e;#A;#t;#r;#I;#o;#g;#i;#a;#s;#l;#c;#d;#n;#p;#h=null;#u;#C;#B;#f;constructor({baseUrl:t,apiProxy:o,interactionScope:a=o,workspace:e,agentPreset:i,autostart:A=!1,dshBin:r="dsh",fetchImpl:s=fetch,createWebSocket:g=m=>new WebSocket(m),interactionReconnectDelayMs:c=500,rpcIdPrefix:I="im",logPrefix:d="dsh-im",commandExecutor:B,controlExecutor:f,sessionMaintenanceExecutor:Q,fileIngressExecutor:y}){if(typeof g!="function")throw new TypeError("createWebSocket must be a function");if(!Number.isFinite(c)||c<0)throw new TypeError("interactionReconnectDelayMs must be a non-negative number");if(typeof I!="string"||!I.trim())throw new TypeError("rpcIdPrefix must be a non-empty string");if(typeof d!="string"||!d.trim())throw new TypeError("logPrefix must be a non-empty string");if(B!==void 0&&typeof B!="function")throw new TypeError("commandExecutor must be a function");if(f!==void 0&&typeof f!="function")throw new TypeError("controlExecutor must be a function");if(Q!==void 0&&typeof Q!="function")throw new TypeError("sessionMaintenanceExecutor must be a function");if(y!==void 0&&typeof y!="function")throw new TypeError("fileIngressExecutor must be a function");if(this.#e=t===void 0?null:new URL(t),this.#A=this.#e?null:o,!this.#e&&(!this.#A||typeof this.#A!="object"))throw new TypeError("HarnessClient requires the current Host apiProxy or an explicit baseUrl");if(this.#A&&(!a||!["object","function"].includes(typeof a)))throw new TypeError("interactionScope must identify the current Host");this.#t=e,this.#r=i??void 0,this.#I=!!(this.#e&&A),this.#o=r,this.#g=s,this.#i=g,this.#a=c,this.#s=I.trim(),this.#l=d.trim(),this.#c=B,this.#d=f,this.#n=Q,this.#p=y,this.#u=N3(this.#e?.origin??a),this.#C=this.#u.ownerships,this.#B=this.#u.claims,this.#f=this.#u.controls}async rpc(t,o={},a=3e4,e={}){let i=e.rpcId??`${this.#s}-${bT()}`,A=AbortSignal.timeout(a),r=e.signal?AbortSignal.any([e.signal,A]):A,s;try{if(this.#A){let[g,c,I]=t.split("."),d={host:"host",workspace:"workspace",session:"sessions",llm:"llm"}[g],B=d&&this.#A[d];if(I!==void 0||!Object.hasOwn(B??{},c)||typeof B[c]!="function")throw new us("harness-api-not-found",t);s={type:"server-response",...await O3(()=>B[c]({rpcId:i,payload:o},r),r)}}else{let g=await this.#g(new URL(`/api/${t}`,this.#e),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({type:"client-request",rpcId:i,method:t,payload:o}),signal:r});if(!g.ok){let c=await GBe(g,this.#e.hostname);throw new us(c,t,{status:g.status})}try{s=await g.json()}catch(c){throw new us("harness-response-invalid",t,{cause:c})}}}catch(g){throw e.signal?.aborted||g instanceof us?g:new us(A.aborted?"harness-timeout":"harness-connect-failed",t,{cause:g})}if(s?.type!=="server-response"||s?.rpcId!==i)throw new us("harness-response-invalid",t,{cause:new Error(`Harness returned an invalid response for ${t}`)});if(!s.result||typeof s.result!="object"||typeof s.result.ok!="boolean")throw new us("harness-response-invalid",t,{cause:new Error(`Harness returned an invalid result for ${t}`)});if(!s.result?.ok)throw new Mn(t,s.result?.error);return s.result.value}async health(t={}){try{return await this.rpc("host.describe",{},5e3,t),!0}catch(o){throw o instanceof Mn?new _T(o):o}}async ensureRunning(t={}){try{return await this.health(t)}catch(e){if(!this.#I)throw e}if(!this.#h||this.#h.exitCode!==null){let e=this.#e.port||(this.#e.protocol==="https:"?"443":"80");this.#h=_Be(this.#o,["web","--host",this.#e.hostname,"--port",e],{cwd:this.#t,env:process.env,stdio:["ignore","inherit","inherit"]}),this.#h.on("error",i=>{console.error(`[${this.#l}] failed to start Harness:`,i.message)})}let o=Date.now()+6e4,a;for(;Date.now(){let r=A&&a.signal?AbortSignal.any([A,a.signal]):A??a.signal;return this.rpc("session.selectModel",{sessionId:t,provider:o.provider,model:o.model,...o.reasoningEffort===void 0?{}:{reasoningEffort:o.reasoningEffort}},3e4,r?{...a,signal:r}:a)},i=this.#n?await this.#n({sessionId:t,operation:e}):await e();if(!i||typeof i!="object"||!MT(i.selected))throw new Error("Harness returned an invalid response for session.selectModel");return i}async isSessionRunning(t,o={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");await this.ensureRunning(o);let a=await this.rpc("session.list",{},3e4,o);if(!a||typeof a!="object"||!Array.isArray(a.items))throw new Error("Harness returned an invalid response for session.list");for(let e of a.items)if(!e||typeof e!="object"||typeof e.sessionId!="string"||!e.sessionId||typeof e.running!="boolean")throw new Error("Harness returned an invalid response for session.list");return a.items.find(e=>e.sessionId===t)?.running??!1}async adoptWorkspaceSession(t,o={}){return w3(this,t,o)}async workspaceId(t={}){let{workspace:o=this.#t,...a}=t,{items:e}=await this.rpc("workspace.list",{},3e4,a),i=e.find(r=>r.path===o);return i?i.workspaceId:(await this.rpc("workspace.create",{path:o},3e4,a)).workspace.workspaceId}async createSession(t={}){let{agentPreset:o,...a}=t;await this.ensureRunning(a);let i={workspaceId:await this.workspaceId(a)},A=o!==void 0?o:this.#r;return A!=null&&(i.agentPreset=A),(await this.rpc("session.create",i,3e4,a)).sessionId}async renameSession(t,o,a={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");if(typeof o!="string"||!o.trim())throw new TypeError("session title is required");return this.rpc("session.rename",{sessionId:t,title:o},3e4,a)}async executeCommand(t,o,a={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");if(typeof o!="string"||!o)throw new TypeError("command line is required");if(!this.#c){let e=new Error("Harness command execution is unavailable");throw e.code="commands-unavailable",e}try{return await this.#c(t,o,a)}catch(e){throw e?.failure&&typeof e.failure=="object"?new Mn("commands.execute",e.failure):e}}async readSessionHistory(t,{maxMessages:o=50,beforeSeq:a,timeoutMs:e=1e4,...i}={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");if(!Number.isSafeInteger(o)||o<1||a!==void 0&&(!Number.isSafeInteger(a)||a<0))throw new TypeError("Invalid history pagination");return this.rpc("session.history",{sessionId:t,maxMessages:o,...a===void 0?{}:{beforeSeq:a}},e,i)}async sessionExists(t,o={}){try{return await this.rpc("session.history",{sessionId:t,maxMessages:1},3e4,o),!0}catch(a){if(a instanceof Mn&&a.code==="session-not-found")return!1;throw a}}async respondInteraction(t,o,a={}){if(typeof t!="string"||!t)throw new TypeError("rpcId is required");if(!o||typeof o!="object"||typeof o.ok!="boolean")throw new TypeError("A Harness RPC result is required");let e=AbortSignal.timeout(a.timeoutMs??3e4),i=a.signal?AbortSignal.any([a.signal,e]):e,A={type:"client-response",rpcId:t,result:o},r;if(this.#A)r=await O3(()=>this.#A.respond(A),i);else{let g=await this.#g(new URL("/api/respond",this.#e),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(A),signal:i});if(!g.ok)throw new Error(`Harness transport respond failed: HTTP ${g.status}`);r=await g.json()}if(r?.accepted===!0)return r;if(r?.accepted!==!1||r.reason!=="bad-response"&&r.reason!=="not-pending")throw new Error("Harness returned an invalid interaction response receipt");let s=r.reason;throw new ap(`interaction-${s}`,`Harness interaction response was rejected (${s})`)}async watchInteractions(t,{signal:o,onInteraction:a,onResolved:e,onOpen:i,ownership:A}={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");if(!o||typeof o.addEventListener!="function")throw new TypeError("watchInteractions requires an AbortSignal");if(a!==void 0&&typeof a!="function")throw new TypeError("onInteraction must be a function");if(e!==void 0&&typeof e!="function")throw new TypeError("onResolved must be a function");if(i!==void 0&&typeof i!="function")throw new TypeError("onOpen must be a function");for(;!o.aborted;){try{await this.#T(t,{signal:o,onInteraction:a,onResolved:e,onOpen:i,ownership:A})}catch(r){if(o.aborted)return;console.warn(`[${this.#l}] Harness interaction stream disconnected:`,r.message)}if(o.aborted)return;try{await Bu(this.#a,o)}catch{if(o.aborted)return;throw new Error("Harness interaction reconnect wait failed")}}}#y(t,o){let a=this.#C.get(t)??new Set;o.order=this.#u.nextOrder,this.#u.nextOrder+=1,a.add(o),this.#C.set(t,a)}#w(t,o){let a=this.#C.get(t);a?.delete(o),a?.size===0&&this.#C.delete(t);for(let[e,i]of this.#B)i.ownership===o&&this.#B.delete(e)}#m(t){if(!t.control)return;let o=this.#f.get(t.control.owner);o||(o=new Map,this.#f.set(t.control.owner,o));let a=o.get(t.control.key)??new Set;a.add(t),o.set(t.control.key,a)}#Q(t){if(!t.control)return;let o=this.#f.get(t.control.owner),a=o?.get(t.control.key);a?.delete(t),a?.size===0&&o.delete(t.control.key),o?.size===0&&this.#f.delete(t.control.owner)}#D(t,o){let a=b3(o);return a?[...this.#f.get(a.owner)?.get(a.key)??[]].filter(i=>i.sessionId===t).sort((i,A)=>i.order-A.order):[]}#E(t,o){return this.#D(t,o).find(a=>a.started&&a.active&&!a.completed&&a.turn!==null)??null}async#k(t,o,a){let e=this.#D(t,o);if(e.length===0)return null;try{let i=await this.rpc("session.history",{sessionId:t,maxMessages:50},3e4,a);this.#M(t,i.events??[])}catch(i){if(!(i instanceof Mn)||i.code!=="session-not-found")throw i;for(let A of e)A.active=!1,A.completed=!0;return null}return this.#E(t,o)}async hasActiveTurn(t,o,a={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");return!!await this.#k(t,o,a)}async stopActiveTurn(t,o,a={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");let e=await this.#k(t,o,a);if(!e)return!1;if(e.stopRequested)return!0;if(this.#E(t,o)!==e)return!1;e.stopRequested=!0;try{if(this.#d){let i=this.#d({sessionId:t,expectedTurn:e.turn,promptRpcId:e.promptRpcId,action:"stop"});if(i&&typeof i.then=="function")throw new TypeError("controlExecutor must return synchronously");if(i!==void 0){if(typeof i!="boolean")throw new TypeError("controlExecutor must return a boolean or undefined");return i||(e.stopRequested=!1),i}}return await this.rpc("session.cancel",{sessionId:t,keepInbox:!0},3e4,a),!0}catch(i){if(this.#E(t,o)===e&&(e.stopRequested=!1),i instanceof Mn&&i.code==="session-not-found")return!1;throw i}}async steerActiveTurn(t,o,a,e={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");if(typeof o!="string"||!o.trim())throw new TypeError("Steering text is required");let i=await this.#k(t,a,e);if(!i||i.stopRequested||this.#E(t,a)!==i)return!1;if(this.#d){let A=this.#d({sessionId:t,expectedTurn:i.turn,promptRpcId:i.promptRpcId,action:"steer",text:o});if(A&&typeof A.then=="function")throw new TypeError("controlExecutor must return synchronously");if(A!==void 0){if(typeof A!="boolean")throw new TypeError("controlExecutor must return a boolean or undefined");return A}}return await this.rpc("session.prompt",{sessionId:t,mode:"steer",content:[{type:"text",text:o}],clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},3e4,e),!0}#M(t,o){for(let a of this.#C.get(t)??[])R3(a,o)}async#O(t,o){let a=await this.rpc("session.history",{sessionId:t,maxMessages:50},3e4,{signal:o});this.#M(t,a.events??[])}#S(t,o,a){let e=this.#B.get(o);if(e&&this.#C.get(t)?.has(e.ownership))return e;let i=[...this.#C.get(t)??[]],A=i.filter(s=>s.active).sort((s,g)=>s.order-g.order);if(A.length>0)return{ownership:A[0],recovered:!1};let r=i.filter(s=>!s.started&&!s.completed).sort((s,g)=>s.order-g.order)[0]??null;return r?{ownership:r,recovered:!0}:null}async#_(t,o,a){if(!this.#p)throw new Uo("inbound-file-ingress-unavailable","Harness file ingress is unavailable in this Host process.");let i=(await this.rpc("session.list",{},3e4,{signal:a}))?.items?.find(A=>A?.sessionId===t)?.cwd;return this.#p({sessionId:t,workspace:i,files:o,signal:a})}async ask(t,o,a={}){typeof a=="number"&&(a={timeoutMs:a});let e=a.timeoutMs??6e5,i=a.signal,A=typeof a.onUpdate=="function"?a.onUpdate:null,r=a.progressMode==="all"?"all":"latest",s=typeof a.onArtifact=="function"?a.onArtifact:null,g=typeof a.onInteraction=="function"?a.onInteraction:void 0,c=typeof a.onInteractionResolved=="function"?a.onInteractionResolved:void 0,I=b3(a.control),d=Array.isArray(a.files)?a.files.filter(Boolean):[];await this.ensureRunning({signal:i});let B=await this.rpc("session.history",{sessionId:t,maxMessages:1},3e4,{signal:i}),f=Math.max(-1,...(B.events??[]).map(({event:V})=>V.seq??-1)),Q=`${this.#s}-${bT()}`,y=new ip({promptRpcId:Q,afterSeq:f}),m=g||c?new AbortController:null,_=m?i?AbortSignal.any([i,m.signal]):m.signal:null,T=m||I?{sessionId:t,promptRpcId:Q,active:!1,started:!1,completed:!1,stopRequested:!1,turn:null,openTurn:null,lastSeq:f,reconnect:null,order:-1,toolCalls:new Map,control:I}:null,R=null,L=!1,U=0,F=[],z=!1,J=!1,K=async()=>{if(!s||L||y.turn===null)return U;L=!0;let V=el.take(t,y.turn,{signal:i});for(let H of V)try{await s(H),U+=1}catch(N){el.release(H),console.warn(`[${this.#l}] ignored an artifact handoff failure:`,N.message)}return U};T&&(this.#y(t,T),this.#m(T));let G=el.openConsumer(t,Q);try{let V=o;if(d.length>0){let q=await this.#_(t,d,i);F.push(q),o=pT(o,q)}if(_){let q,X=new Promise(ie=>{q=ie});R=this.watchInteractions(t,{signal:_,onInteraction:g,onResolved:c,onOpen:q,ownership:T}),R.catch(()=>{}),await Promise.race([X,Bu(3e4,_).then(()=>{throw new Error("Harness interaction stream did not open within 30 seconds")})])}let H=typeof o=="string"?[{type:"text",text:o}]:o;if(!Array.isArray(H)||H.length===0)throw new TypeError("Harness prompt content is required");let N=Intl.DateTimeFormat().resolvedOptions().timeZone,k=q=>this.rpc("session.prompt",{sessionId:t,mode:"queue",content:q,clientTimeZone:N},3e4,{rpcId:Q,signal:i});try{await k(H)}catch(q){let X=RY(q)?TY(H):[];if(X.length===0)throw q;let ie;try{ie=await this.#_(t,X,i)}catch(Se){throw i?.aborted?i.reason??Se:(console.warn(`[${this.#l}] unable to restage rejected images as workspace files:`,Se?.message??String(Se)),q)}F.push(ie);let oe=pT([...NY(typeof V=="string"?[{type:"text",text:V}]:V),{type:"text",text:w(MY)}],{files:F.flatMap(Se=>Se?.files??[])});await k(oe)}z=!0;try{let q=Date.now(),X=y.lastSeq;for(;;){await Bu(300,i);let ie=await this.rpc("session.history",{sessionId:t,maxMessages:50},3e4,{signal:i}),De=T?.active===!0;T&&(this.#M(t,ie.events??[]),!De&&T.active&&T.reconnect?.());let oe=y.consumeAll(ie.events??[]),Se=y.lastSeq>X;if(X=y.lastSeq,Se&&(q=Date.now()),A){let Re=r==="all"?oe:oe.slice(-1);for(let Ne of Re)try{await A(Ne)}catch(Je){console.warn(`[${this.#l}] ignored a progress update failure:`,Je.message)}}if(y.finished){if(J=!0,!T?.stopRequested&&!JBe(y.reason))throw T3(y.reason);let Re=T?.stopRequested?0:await K();if(y.answer)return y.answer;if(Re>0)return"";throw T?.stopRequested?_3():T3(y.reason)}if(Date.now()-q{})}}async#T(t,{signal:o,onInteraction:a,onResolved:e,onOpen:i,ownership:A}){let r=!1,s=null,g=Promise.resolve(),c=A==null,I=[],d=()=>{},B=m=>{d=m,A&&(A.reconnect=d);try{i?.()}catch(_){console.warn(`[${this.#l}] ignored an interaction open callback failure:`,_.message)}A&&this.#O(t,o).then(()=>{if(!r){c=!0;for(let _ of I.splice(0))Q(_)}}).catch(_=>{s??=_,d()})},f=(m,_)=>{m&&(g=g.then(()=>m(_)).catch(T=>{s??=T,d()}))},Q=m=>{let _=m.payload;if(A&&_.type==="session/event"){this.#M(t,[_.event]);return}if(_.type==="question/requested"||_.type==="approval/requested"){let T=_.type==="question/requested"?"question":"approval",R=T==="question"?m.rpcId:_.approvalId,L=`${T}:${R}`;if(A){let F=this.#S(t,L,T);if(F?.ownership!==A)return;this.#B.set(L,F)}let U=T==="approval"&&A&&typeof _.callId=="string"?this.#B.get(L)?.ownership.toolCalls.get(_.callId):void 0;f(a,Object.freeze({kind:T,interactionId:R,rpcId:m.rpcId,sessionId:t,payload:_,recovered:A?this.#B.get(L)?.recovered===!0:!1,...U?{toolCall:U}:{},reconnect:d,respond:(F,z={})=>this.respondInteraction(m.rpcId,F,{...z,signal:z.signal??o})}));return}if(_.type==="question/resolved"||_.type==="approval/resolved"){let T=_.type==="question/resolved"?"question":"approval",R=T==="question"?_.questionRpcId:_.approvalId,L=`${T}:${R}`;if(A){if(this.#B.get(L)?.ownership!==A)return;this.#B.delete(L)}f(e,Object.freeze({kind:T,interactionId:R,sessionId:t,outcome:_.outcome,payload:_}))}},y=m=>{try{let _=m?.payload;if(m?.type!=="server-request"||typeof m.rpcId!="string"||!_||typeof _!="object"||m.method!==_.type)throw new Error("invalid server-request envelope");if(_.sessionId!==t)return;c?Q(m):I.push(m)}catch(_){console.warn(`[${this.#l}] ignored a malformed Harness interaction frame:`,_.message)}};try{await this.#P({signal:o,onOpen:B,onEnvelope:y})}finally{r=!0,A?.reconnect===d&&(A.reconnect=null),o.aborted||await g}if(!o.aborted&&s)throw s}async watchHarnessEvents({signal:t,onSessionEvent:o,onReconnect:a}={}){if(typeof o!="function")throw new TypeError("watchHarnessEvents requires onSessionEvent");if(!t||typeof t.addEventListener!="function")throw new TypeError("watchHarnessEvents requires an AbortSignal");if(a!==void 0&&typeof a!="function")throw new TypeError("onReconnect must be a function");for(;!t.aborted;){try{await this.#P({signal:t,onOpen:()=>{try{a?.()}catch(e){console.warn(`[${this.#l}] mux reconnect hook failed:`,e.message)}},onEnvelope:e=>{try{let i=e?.payload;if(e?.type!=="server-request"||!i||typeof i!="object"||e.method!==i.type||i.type!=="session/event"||typeof i.sessionId!="string"||!i.event||typeof i.event!="object")return;o({sessionId:i.sessionId,event:i.event})}catch(i){console.warn(`[${this.#l}] ignored a malformed global mux frame:`,i.message)}}})}catch(e){if(t.aborted)return;console.warn(`[${this.#l}] Harness event mux disconnected:`,e.message)}if(t.aborted)return;try{await Bu(this.#a,t)}catch{if(t.aborted)return;throw new Error("Harness event mux reconnect wait failed")}}}#P(t){return D3({apiProxy:this.#A,baseUrl:this.#e,createWebSocket:this.#i,rpcId:`${this.#s}-${bT()}`,...t,onMalformed:o=>{console.warn(`[${this.#l}] ignored a malformed Harness mux frame:`,o.message)}})}stopManagedProcess(){this.#h?.exitCode===null&&this.#h.kill("SIGTERM")}};var ly=class extends yr{constructor(t){super({...t,rpcIdPrefix:"dingtalk",logPrefix:"dsh-dingtalk"})}};import{mkdir as $Be,readFile as efe,realpath as Afe,rename as tfe,stat as rfe,unlink as ife,writeFile as afe}from"node:fs/promises";import{dirname as ofe,isAbsolute as X3,resolve as fu}from"node:path";var VrA=Object.freeze(["chat","user_in_chat"]),op="user_in_chat";function np(n){let t=String(n??"").trim().toLowerCase();return t==="chat"||t==="shared"||t==="shared_chat"?"chat":t==="user_in_chat"||t==="user"||t==="per_user"||t==="member"?"user_in_chat":op}function sp(n){let t=String(n??"").trim().toLowerCase();if(t==="chat"||t==="user_in_chat")return t;let o=new TypeError(`Invalid group session scope: ${String(n)}`);throw o.code="invalid-group-session-scope",o}function v3({kind:n,conversationId:t,senderId:o,groupSessionScope:a=op}){let e=String(t??"").trim(),i=String(o??"").trim();if(!e)throw new TypeError("conversationId is required");if(n==="group"){if(np(a)==="user_in_chat"){if(!i)throw new TypeError("senderId is required for user_in_chat group sessions");return`group:${e}:user:${i}`}return`group:${e}`}return`direct:${e}`}var dy=/^\d{5,32}@g\.us$/,qBe=/^[a-z0-9][a-z0-9-]*$/,zBe=/[\u0000-\u001f\u007f-\u009f\u202a-\u202e\u2066-\u2069]/;function TT(n){if(typeof n!="string")return null;let t=n.trim();return qBe.test(t)?t:null}function Rr(n){let t=new TypeError(n);throw t.code="access-grant-invalid",t}function ua(n){if(typeof n=="number"&&Number.isFinite(n)&&(n=String(n)),typeof n=="bigint"&&(n=String(n)),typeof n!="string")return null;let t=n.trim();if(!t||zBe.test(t))return null;let o=t.indexOf("@");if(o>0){let e=t.slice(0,o).split(":")[0],i=t.slice(o+1).toLowerCase();if(!["s.whatsapp.net","c.us","hosted"].includes(i))return null;t=e}let a=t.replace(/[^\d]/g,"");return a.length<5||a.length>32?null:a}function Oc(n){let t=ua(n);return t||Rr("\u7535\u8BDD\u53F7\u7801\u65E0\u6548\u3002"),t}function Al(n){return ua(n)}function py(n){return(typeof n!="string"||!dy.test(n.trim()))&&Rr("\u7FA4 JID \u65E0\u6548\u3002"),n.trim()}function P3(n){(!n||typeof n!="object"||Array.isArray(n))&&Rr("\u6210\u5458\u6761\u76EE\u65E0\u6548\u3002");let t=Oc(n.phone??n.id),o=n.canExecuteCommands===void 0?!0:!!n.canExecuteCommands,a=G3(n.agentPreset);return Object.freeze({phone:t,canExecuteCommands:o,...a?{agentPreset:a}:{}})}function G3(n){if(n==null||n==="")return;let t=TT(n);return t||Rr("Agent Preset \u65E0\u6548\u3002"),t}function F3(n,{emptyMessage:t,label:o}){Array.isArray(n)||Rr(`${o}\u5FC5\u987B\u662F\u6570\u7EC4\u3002`);let a=n.map(e=>Oc(typeof e=="string"||typeof e=="number"||typeof e=="bigint"?e:e?.phone??e?.id));return new Set(a).size!==a.length&&Rr(`${o}\u4E0D\u80FD\u5305\u542B\u91CD\u590D\u7535\u8BDD\u3002`),a.length===0&&t&&Rr(t),Object.freeze(a)}function L3(n){(!n||typeof n!="object"||Array.isArray(n))&&Rr("\u7FA4\u6388\u6743\u6761\u76EE\u65E0\u6548\u3002");let t=F3(n.admins??[],{label:"\u7FA4\u7BA1\u7406\u5458"}),o=Object.freeze((Array.isArray(n.members)?n.members:[]).map(P3));new Set(o.map(i=>i.phone)).size!==o.length&&Rr("\u7FA4\u6210\u5458\u4E0D\u80FD\u5305\u542B\u91CD\u590D\u7535\u8BDD\u3002");let a=typeof n.title=="string"?n.title.trim().slice(0,128):"",e=G3(n.agentPreset);return Object.freeze({...a?{title:a}:{},...e?{agentPreset:e}:{},admins:t,members:o})}function hy(n){(!n||typeof n!="object"||Array.isArray(n))&&Rr("\u5F85\u6279\u6761\u76EE\u65E0\u6548\u3002");let t=typeof n.id=="string"?n.id.trim():"";/^[A-Za-z0-9_-]{6,64}$/.test(t)||Rr("\u5F85\u6279\u7F16\u53F7\u65E0\u6548\u3002");let o=n.kind==="group"?"group":n.kind==="direct"?"direct":null;o||Rr("\u5F85\u6279\u573A\u666F\u65E0\u6548\u3002");let a=n.phone?Oc(n.phone):"",e=typeof n.lid=="string"?n.lid.trim().slice(0,128):"";!a&&!e&&Rr("\u5F85\u6279\u7F3A\u5C11\u7535\u8BDD\u6216 LID\u3002");let i=o==="group"?py(n.groupJid):void 0,A=typeof n.pushName=="string"?n.pushName.trim().slice(0,128):"",r=typeof n.requestText=="string"?n.requestText.trim().slice(0,500):"",s=typeof n.createdAt=="string"&&n.createdAt?n.createdAt:new Date().toISOString(),g=n.unresolved===!0||!a,c=Array.isArray(n.notifyRefs)?Object.freeze(n.notifyRefs.map(f=>Object.freeze({adminPhone:Oc(f.adminPhone),providerMessageId:String(f.providerMessageId??"").trim().slice(0,128)})).filter(f=>f.providerMessageId)):Object.freeze([]),I=n.resolvedByPhone?Oc(n.resolvedByPhone):void 0,d=typeof n.resolvedAt=="string"?n.resolvedAt:void 0,B=["pending","approved","denied","expired"].includes(n.status)?n.status:"pending";return Object.freeze({id:t,kind:o,...i?{groupJid:i}:{},phone:a||"",...e?{lid:e}:{},...A?{pushName:A}:{},...r?{requestText:r}:{},createdAt:s,unresolved:g,notifyRefs:c,status:B,...I?{resolvedByPhone:I}:{},...d?{resolvedAt:d}:{}})}function NT(n){(!n||typeof n!="object"||Array.isArray(n))&&Rr("\u8054\u7CFB\u4EBA\u6761\u76EE\u65E0\u6548\u3002");let t=n.phone?Oc(n.phone):void 0,o=Object.freeze([...Array.isArray(n.lids)?n.lids:[]].map(r=>String(r??"").trim()).filter(r=>r&&r.length<=128).slice(0,8)),a=typeof n.pushName=="string"?n.pushName.trim().slice(0,128):"",e=typeof n.lastSeenAt=="string"&&n.lastSeenAt?n.lastSeenAt:new Date().toISOString(),i=Object.freeze([...Array.isArray(n.scenes)?n.scenes:[]].filter(r=>r==="direct"||r==="group").slice(0,2)),A=Object.freeze([...Array.isArray(n.groupJids)?n.groupJids:[]].map(r=>String(r??"").trim()).filter(r=>dy.test(r)).slice(0,32));return!t&&o.length===0&&Rr("\u8054\u7CFB\u4EBA\u7F3A\u5C11\u7535\u8BDD\u6216 LID\u3002"),Object.freeze({...t?{phone:t}:{},lids:o,...a?{pushName:a}:{},lastSeenAt:e,scenes:i.length>0?i:Object.freeze(["direct"]),...A.length>0?{groupJids:A}:{}})}function Bs(){return Object.freeze({version:1,globalAdmins:Object.freeze([]),directMembers:Object.freeze([]),groups:Object.freeze({}),pending:Object.freeze([]),contacts:Object.freeze([])})}function Yr(n,{requireGlobalAdmin:t=!0}={}){(!n||typeof n!="object"||Array.isArray(n))&&Rr("\u8BBF\u95EE\u6388\u6743\u6587\u6863\u65E0\u6548\u3002"),(n.version===void 0?1:Number(n.version))!==1&&Rr("\u8BBF\u95EE\u6388\u6743\u7248\u672C\u4E0D\u652F\u6301\u3002");let a=F3(n.globalAdmins??[],{label:"\u5168\u5C40\u7BA1\u7406\u5458",emptyMessage:t?"\u81F3\u5C11\u4FDD\u7559\u4E00\u4F4D\u5168\u5C40\u7BA1\u7406\u5458\u3002":void 0});t&&a.length===0&&Rr("\u81F3\u5C11\u4FDD\u7559\u4E00\u4F4D\u5168\u5C40\u7BA1\u7406\u5458\u3002");let e=Object.freeze((Array.isArray(n.directMembers)?n.directMembers:[]).map(P3));new Set(e.map(s=>s.phone)).size!==e.length&&Rr("\u79C1\u804A\u6388\u6743\u7528\u6237\u4E0D\u80FD\u5305\u542B\u91CD\u590D\u7535\u8BDD\u3002");let i=Object.create(null);if(n.groups&&typeof n.groups=="object"&&!Array.isArray(n.groups))for(let[s,g]of Object.entries(n.groups))i[py(s)]=L3(g);let A=Object.freeze((Array.isArray(n.pending)?n.pending:[]).map(hy).slice(0,200)),r=Object.freeze((Array.isArray(n.contacts)?n.contacts:[]).map(NT).slice(0,500));return Object.freeze({version:1,globalAdmins:a,directMembers:e,groups:Object.freeze(i),pending:A,contacts:r})}function bc(n){try{return Yr(n,{requireGlobalAdmin:!1})}catch{return null}}function U3(n,t={}){let o=bc(n);if(!o)return null;if(t.kind==="group"){let i=typeof t.groupJid=="string"&&t.groupJid.trim()?t.groupJid.trim():typeof t.conversationId=="string"?t.conversationId.trim():"";return!i||!dy.test(i)?null:TT(o.groups[i]?.agentPreset)??null}let a=ua(t.phone??t.senderId);if(!a)return null;let e=o.directMembers.find(i=>i.phone===a);return TT(e?.agentPreset)??null}function RT(n,t){let o=n?Yr(n,{requireGlobalAdmin:!1}):Bs(),a=ua(t);return!a||o.globalAdmins.includes(a)?o:Yr({...o,globalAdmins:[a,...o.globalAdmins]})}function H3(n,t,o){let a=RT(t,o),e=new Set(a.directMembers.map(r=>r.phone)),i=[n?.direct,n?.group];for(let r of i)for(let s of r?.allowlist?.users??[]){let g=ua(s?.id);!g||e.has(g)||e.add(g)}let A=[...a.directMembers,...[...e].filter(r=>!a.directMembers.some(s=>s.phone===r)).map(r=>({phone:r,canExecuteCommands:!0}))];return Yr({...a,directMembers:A})}function K3(n,{scene:t,phone:o,groupJid:a,isCommand:e=!1}={}){let i=bc(n)??Bs(),A=ua(o);if(!A)return{allowed:!1,reason:"phone-unavailable"};if(i.globalAdmins.includes(A))return{allowed:!0,reason:"global-admin",canExecuteCommands:!0,canApprove:!0};if(t==="direct"){let g=i.directMembers.find(c=>c.phone===A);return g?e&&!g.canExecuteCommands?{allowed:!1,reason:"command-not-allowed",canExecuteCommands:!1}:{allowed:!0,reason:"direct-member",canExecuteCommands:g.canExecuteCommands,canApprove:!1}:{allowed:!1,reason:"direct-not-allowed"}}if(t!=="group"||!a||!dy.test(a))return{allowed:!1,reason:"invalid-context"};let r=i.groups[a];if(!r)return{allowed:!1,reason:"group-not-allowed"};if(r.admins.includes(A))return{allowed:!0,reason:"group-admin",canExecuteCommands:!0,canApprove:!0};let s=r.members.find(g=>g.phone===A);return s?e&&!s.canExecuteCommands?{allowed:!1,reason:"command-not-allowed",canExecuteCommands:!1}:{allowed:!0,reason:"group-member",canExecuteCommands:s.canExecuteCommands,canApprove:!1}:{allowed:!1,reason:"group-not-allowed"}}function kT(n,t){let o=bc(n)??Bs();if(t.kind==="group"&&t.groupJid){let a=o.groups[t.groupJid];if(a?.admins?.length)return[...a.admins]}return[...o.globalAdmins]}function VBe(n,t,o){let a=ua(t);return!a||o?.status!=="pending"?!1:kT(n,o).includes(a)}function Ey(n,t=Date.now()){let o=Date.parse(n?.createdAt??"");return Number.isFinite(o)?t-o>6048e5:!0}function WBe(n,t){let o=bc(n)??Bs(),a=ua(t.phone);return o.pending.find(e=>e.status!=="pending"||Ey(e)||e.kind!==t.kind||t.kind==="group"&&e.groupJid!==t.groupJid?!1:!!(a&&e.phone===a||t.lid&&e.lid===t.lid))??null}function x3(n,t){let o=Yr(n,{requireGlobalAdmin:!1}),a=ua(t.phone),e=typeof t.lid=="string"?t.lid.trim():"",i=t.at??new Date().toISOString(),A=typeof t.pushName=="string"?t.pushName.trim():"",r=t.scene==="group"?"group":"direct",s=r==="group"&&t.groupJid?py(t.groupJid):null,g=[...o.contacts],c=g.findIndex(I=>a&&I.phone===a||e&&I.lids.includes(e));if(c<0)g.unshift(NT({phone:a,lids:e?[e]:[],pushName:A,lastSeenAt:i,scenes:[r],groupJids:s?[s]:[]}));else{let I=g[c],d=[...new Set([...I.lids??[],...e?[e]:[]])].slice(0,8),B=[...new Set([...I.scenes??[],r])],f=[...new Set([...I.groupJids??[],...s?[s]:[]])].slice(0,32);g[c]=NT({phone:a??I.phone,lids:d,pushName:A||I.pushName,lastSeenAt:i,scenes:B,groupJids:f})}return Yr({...o,contacts:g.slice(0,500)},{requireGlobalAdmin:!1})}function uy(n,t,o={}){let a=Yr(n,{requireGlobalAdmin:!1}),e=py(t),i=a.groups[e]??{admins:[],members:[]},A=typeof o.title=="string"&&o.title.trim()?o.title.trim().slice(0,128):i.title,r={...a.groups,[e]:L3({...i,...A?{title:A}:{}})};return Yr({...a,groups:r},{requireGlobalAdmin:!1})}function Y3(n,t,{idFactory:o}={}){let a=Yr(n,{requireGlobalAdmin:!1}),e=WBe(a,t);if(e)return{grant:a,pending:e,created:!1};let i=hy({id:o?.()??`p_${Date.now().toString(36)}_${Math.random().toString(36).slice(2,8)}`,kind:t.kind,groupJid:t.groupJid,phone:t.phone??"",lid:t.lid,pushName:t.pushName,requestText:t.requestText,createdAt:new Date().toISOString(),unresolved:!ua(t.phone),status:"pending",notifyRefs:[]}),A=[i,...a.pending.filter(r=>r.status==="pending"&&!Ey(r))].slice(0,200);return{grant:Yr({...a,pending:A},{requireGlobalAdmin:!1}),pending:i,created:!0}}function j3(n,t,o){let a=Yr(n,{requireGlobalAdmin:!1}),e=a.pending.map(i=>i.id!==t?i:hy({...i,notifyRefs:[...i.notifyRefs??[],...o]}));return Yr({...a,pending:e},{requireGlobalAdmin:!1})}function Cy(n,{pendingId:t,action:o,resolvedByPhone:a}){let e=Yr(n,{requireGlobalAdmin:!1}),i=Oc(a),A=e.pending.findIndex(c=>c.id===t);if(A<0){let c=new Error("\u627E\u4E0D\u5230\u5F85\u6279\u7533\u8BF7\u3002");throw c.code="pending-not-found",c}let r=e.pending[A];if(r.status!=="pending"||Ey(r)){let c=new Error("\u8BE5\u7533\u8BF7\u5DF2\u5931\u6548\u3002");throw c.code="pending-expired",c}if(!VBe(e,i,r)){let c=new Error("\u65E0\u6743\u5BA1\u6279\u8BE5\u7533\u8BF7\u3002");throw c.code="pending-forbidden",c}if(o!=="approve"&&o!=="deny"&&Rr("\u5BA1\u6279\u52A8\u4F5C\u65E0\u6548\u3002"),o==="approve"&&r.unresolved){let c=new Error("\u7533\u8BF7\u4EBA\u7535\u8BDD\u5C1A\u672A\u89E3\u6790\uFF0C\u8BF7\u5728\u8BBE\u7F6E\u4E2D\u8865\u5168\u540E\u518D\u6279\u51C6\u3002");throw c.code="pending-unresolved",c}let s={...e};if(o==="approve")if(r.kind==="direct")s.directMembers.some(c=>c.phone===r.phone)||(s.directMembers=[...s.directMembers,{phone:r.phone,canExecuteCommands:!0}]);else{let c=s.groups[r.groupJid]??{admins:[],members:[]};!c.members.some(I=>I.phone===r.phone)&&!c.admins.includes(r.phone)&&(s.groups={...s.groups,[r.groupJid]:{...c,members:[...c.members,{phone:r.phone,canExecuteCommands:!0}]}})}let g=[...e.pending];return g[A]=hy({...r,status:o==="approve"?"approved":"denied",resolvedByPhone:i,resolvedAt:new Date().toISOString()}),s.pending=g,{grant:Yr(s),pending:g[A]}}function J3(n,t){let o=String(t??"").trim();return o?(bc(n)??Bs()).pending.find(e=>e.status==="pending"&&!Ey(e)&&(e.notifyRefs??[]).some(i=>i.providerMessageId===o))??null:null}var ZBe=new Set(["yes","y","approve","allow","add","ok","grant","whitelist","\u540C\u610F","\u53EF\u4EE5","\u662F","\u6DFB\u52A0","\u901A\u8FC7"]),XBe=new Set(["no","n","deny","reject","ignore","\u62D2\u7EDD","\u4E0D","\u5426","\u5FFD\u7565"]);function q3(n){let t=String(n??"").trim();if(!t)return null;let o=t.split(/\s+/u)[0]?.toLowerCase?.()??"";return ZBe.has(o)||/添加白名单|add to whitelist/iu.test(t)?"approve":XBe.has(o)?"deny":null}function z3(n){return String(n??"").match(/(?:请求编号|Request)\s*[::]\s*([A-Za-z0-9_-]{6,64})/u)?.[1]??null}var fs=Object.freeze({pendingAckDirect:"\u5DF2\u63D0\u4EA4\u79C1\u804A\u8BBF\u95EE\u7533\u8BF7\uFF0C\u8BF7\u7B49\u5F85\u5168\u5C40\u7BA1\u7406\u5458\u5BA1\u6279\u3002",pendingAckGroup:"\u5DF2\u63D0\u4EA4\u672C\u7FA4\u8BBF\u95EE\u7533\u8BF7\uFF0C\u8BF7\u7B49\u5F85\u7BA1\u7406\u5458\u5BA1\u6279\u3002",pendingUnresolved:"\u5DF2\u8BB0\u5F55\u8BBF\u95EE\u7533\u8BF7\uFF0C\u4F46\u5C1A\u672A\u89E3\u6790\u5230\u7535\u8BDD\u53F7\u7801\uFF1B\u8BF7\u7BA1\u7406\u5458\u5728\u8BBE\u7F6E\u4E2D\u8865\u5168\u540E\u518D\u6279\u51C6\u3002",notifyTitle:"[dsh-im-ops] \u8BBF\u95EE\u7533\u8BF7",approvedDirect:"\u79C1\u804A\u8BBF\u95EE\u5DF2\u6279\u51C6\uFF0C\u73B0\u5728\u53EF\u4EE5\u76F4\u63A5\u5BF9\u8BDD\u3002",approvedGroup:"\u672C\u7FA4\u8BBF\u95EE\u5DF2\u6279\u51C6\uFF0C\u8BF7\u5728\u672C\u7FA4 @ \u673A\u5668\u4EBA\u7EE7\u7EED\u3002",denied:"\u8BBF\u95EE\u7533\u8BF7\u672A\u901A\u8FC7\u3002",adminApproved:"\u5DF2\u6279\u51C6\u8BE5\u8BBF\u95EE\u7533\u8BF7\u3002",adminDenied:"\u5DF2\u62D2\u7EDD\u8BE5\u8BBF\u95EE\u7533\u8BF7\u3002"});function V3(n){let t=n.kind==="group"?`\u7FA4\u804A ${n.groupJid??""}`:"\u79C1\u804A",o=n.pushName?`${n.pushName} (${n.phone||n.lid||"\u672A\u77E5"})`:n.phone||n.lid||"\u672A\u77E5",a=n.requestText?` +${L}`:J;m&&await y.finish(V)||await this.#L(g,V,this.#F(t))}catch{this.#a.error?.("[dsh-dingtalk] failed to send the safe error reply")}}finally{await this.#J(e),await this.#f.closeRoute(e)}}async#T(t,o,a,e,i,A){this.#d?.throwIfAborted();let r=this.#p.get(e),s=i.claimedReplyMessageId===o;if(!r||r!==i||r.submitting)return s&&(!r||r!==i)?this.#R(t,o):this.#D(t,o,a,e,{releaseMessageId:!1,statusReaction:A});if(this.#I.hasSeen(o))return;if(await this.#I.markSeen(o),xr(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString(),String(t.conversationType)==="2"&&t.isInAtList!==!0){xr(this.#i,"messagesIgnored");return}let g;try{g=wc(t.sessionWebhook)}catch{xr(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString(),this.#i.lastError=w("\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002");return}let c=t?.msgtype==="text"?ZA(t?.text?.content):null;if(!c){try{await this.#L(g,w("\u8BF7\u7528\u6587\u5B57\u56DE\u7B54\u5F53\u524D\u95EE\u9898\u3002"),this.#F(t))}catch{this.#a.error?.("[dsh-dingtalk] failed to reject a non-text interaction reply")}return}let I=this.#p.get(e);if(!I||I!==i||I.submitting){if(s&&(!I||I!==i)){try{await this.#L(g,w(wT),this.#F(t))}catch{this.#a.error?.("[dsh-dingtalk] failed to send an expired interaction notice")}return}return this.#D(t,o,a,e,{releaseMessageId:!1,alreadyRecorded:!0,statusReaction:A})}if(I.sessionWebhook=g,I.needsPresentation){try{await this.#G(I)}catch{this.#Q(A,"error"),this.#i.lastError=w("\u9489\u9489\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002"),this.#a.error?.("[dsh-dingtalk] failed to retry an interaction question"),I.interaction.reconnect?.()}return}let d=I.questions[I.index];if(d){if(I.answers.push(Na(d,c)),I.index+=1,I.indexthis.#L(e,c)})||t?.kind!=="question")return;let A=t?.payload?.questions,r=typeof t?.interactionId=="string"?t.interactionId:t?.rpcId;if(typeof t.rpcId!="string"||typeof r!="string"||typeof t.sessionId!="string"||!Array.isArray(A)||A.length===0||A.some(c=>!Ta(c))){this.#a.warn?.("[dsh-dingtalk] ignored an invalid Harness question interaction");return}if(t.recovered===!0){await t.respond({ok:!1,error:{code:"cancelled",message:"DingTalk safely cancelled an interaction left by an earlier client.",details:{}}});try{await this.#L(e,w("\u68C0\u6D4B\u5230\u8FD9\u4E2A Session \u4E2D\u9057\u7559\u7684\u5F85\u56DE\u7B54\u95EE\u9898\uFF0C\u5DF2\u5B89\u5168\u53D6\u6D88\u5E76\u7EE7\u7EED\u5904\u7406\u4F60\u521A\u624D\u7684\u6D88\u606F\u3002"))}catch{this.#a.error?.("[dsh-dingtalk] failed to send an interaction recovery notice")}return}let s=this.#p.get(o);if(s?.interactionId===r){s.interaction=t,s.needsPresentation&&await this.#G(s);return}if(this.#h.has(r))return;if(s){this.#a.warn?.("[dsh-dingtalk] cancelled a second pending Harness question"),await t.respond({ok:!1,error:{code:"cancelled",message:"DingTalk is already handling another user interaction.",details:{}}});return}let g={kind:"question",interactionId:r,sessionId:t.sessionId,interaction:t,actor:a,requiresMention:i,questions:A,answers:[],index:0,sessionWebhook:e,queue:null,claimedReplyMessageId:null,submitting:!1,needsPresentation:!0};this.#p.set(o,g),this.#h.set(g.interactionId,o),await this.#G(g)}async#N(t){if(await this.#f.handleResolved(t))return;let o=t?.interactionId;if(t?.kind!=="question"||typeof o!="string")return;let a=this.#h.get(o);a&&this.#K(a,o)}async#G(t){let o=t.questions[t.index];o&&(await this.#L(t.sessionWebhook,pa(o,t.index,t.questions.length,{requiresMention:t.requiresMention})),t.needsPresentation=!1)}async#R(t,o){if(this.#I.hasSeen(o))return;await this.#I.markSeen(o),xr(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString();let a;try{a=wc(t.sessionWebhook)}catch{xr(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString();return}try{await this.#L(a,w(wT),this.#F(t))}catch{this.#a.error?.("[dsh-dingtalk] failed to send an expired interaction notice")}}#x(t,o){let a=this.#p.get(t);return!a||o!==void 0&&a.interactionId!==o?null:(this.#p.delete(t),this.#h.delete(a.interactionId),a)}#K(t,o){return this.#x(t,o)!==null}async#J(t){let o=this.#x(t);if(!(!o||o.kind!=="question"))try{await o.interaction.respond({ok:!1,error:{code:"cancelled",message:"The DingTalk interaction ended before the user answered.",details:{}}},{signal:AbortSignal.timeout(5e3)})}catch(a){a?.code!=="interaction-not-pending"&&this.#a.warn?.("[dsh-dingtalk] failed to cancel a pending Harness interaction")}}#U(){typeof this.#I.pendingSenders=="function"&&(this.#i.pendingSenders=this.#I.pendingSenders())}#F(t){let o=C3(t);return String(t?.conversationType)==="2"&&o?{atUserIds:[o]}:void 0}async#L(t,o,a){let e=[];for(let i of UY(o,this.#c)){this.#d?.throwIfAborted();let A=await this.#e.sendText({clientId:this.#A,clientSecret:this.#t,sessionWebhook:t,text:i,at:a,signal:this.#d});e.push(...Hr(A))}return e}async#V(t,o,a,e,i){let A=async(s,g)=>nBe(await this.#e[s]({clientId:this.#A,clientSecret:this.#t,target:t,file:g,signal:this.#d})),r=await Ko({artifacts:e,baseReceipt:i,deliveryId:a,aggregatePresentation:i?"dingtalk-text-and-files":"dingtalk-files",channelKey:"dingtalk",signal:this.#d,sendImage:typeof this.#e.sendImage=="function"?s=>A("sendImage",s):void 0,sendFile:typeof this.#e.sendFile=="function"?s=>A("sendFile",s):void 0,onFailure:(s,g)=>rt(this.#i,g,{userMessage:pBe(s?.fileName,g),reason:g?.code}),sendFailureNotice:(s,g,c)=>this.#L(o,ut(c)),logger:this.#a});return this.#i.artifactsSent=(this.#i.artifactsSent??0)+r.artifactsSent,this.#i.artifactSendErrors=(this.#i.artifactSendErrors??0)+r.artifactSendErrors,{receipt:r.receipt,userVisible:r.userVisible,artifactSendErrors:r.artifactSendErrors}}};function ly(n){return typeof n=="string"&&n.trim()?n.trim():null}function m3(n){let t=Array.isArray(n?.approvedSenders)?n.approvedSenders:n?.approvedSenders instanceof Set?[...n.approvedSenders]:[];return new Set(t.map(o=>ly(typeof o=="string"?o:o?.staffId)).filter(Boolean))}function CBe(n){return m3(n).size}function S3(n){return n?.connected===!0||n?.socket?.readyState===1}function BBe(n,t){return new Promise((o,a)=>{if(t.aborted){a(t.reason);return}let e=()=>a(t.reason);t.addEventListener("abort",e,{once:!0}),Promise.resolve(n).then(i=>{t.removeEventListener("abort",e),o(i)},i=>{t.removeEventListener("abort",e),a(i)})})}async function fBe(n,t,o){for(;;){if(o?.throwIfAborted(),S3(n))return;await new Promise((a,e)=>{let i=setTimeout(()=>{o?.removeEventListener("abort",A),a()},t),A=()=>{clearTimeout(i),e(o.reason??new DOMException("Aborted","AbortError"))};o?.addEventListener("abort",A,{once:!0})})}}async function QBe(n,t,o,a){let e=AbortSignal.timeout(t),i=AbortSignal.any([a,e]),A=!1,r=Promise.resolve().then(()=>n.connect()).finally(()=>{A=!0});try{await BBe(r,i),await fBe(n,o,i)}catch(s){throw i.aborted?(A||r.then(()=>n.disconnect()).catch(()=>{}),a.aborted?a.reason:new Error(`DingTalk Stream handshake timed out after ${t}ms`)):s}}async function yBe({clientId:n,clientSecret:t}){let{DWClient:o,TOPIC_ROBOT:a}=await import("dingtalk-stream");return{client:new o({clientId:n,clientSecret:t,endpoint:"https://api.dingtalk.com",autoReconnect:!1,keepAlive:!0,debug:!1}),topic:a}}function mBe({pendingSenders:n=[],approvedSenders:t=0}={}){return{startedAt:null,ready:!1,dingtalkStreamState:"idle",harnessReachable:!1,lastConnectedAt:null,lastCheckedAt:null,lastCallbackAt:null,authorizationMode:"sender-staff-id-approval",approvedSenderCount:t,...OT({pendingSenders:n})}}var Eu=class{#e;#A;#t;#r;#I;#o;#g;#i;#a;#s;#l;#c;#d;#n;#p=null;#h=null;#u=null;#C=null;#B=null;#f=null;#y=new Set;constructor({config:t,clientSecret:o,harness:a,state:e,contextEnhancement:i,accessPolicy:A,logger:r=console,replyTimeoutMs:s=6e5,maxMessageChars:g=4e3,connectTimeoutMs:c=15e3,connectPollIntervalMs:I=25,api:d=HY(),streamFactory:B=yBe}){if(!t||!ly(t.clientId)||!ly(o))throw new TypeError("DingtalkRuntime requires app credentials");if(!a||!e)throw new TypeError("DingtalkRuntime requires Harness and state");if(typeof B!="function")throw new TypeError("streamFactory must be a function");this.#e=t,this.#A=o.trim(),this.#t=a,this.#r=e,this.#I=i,this.#o=A,this.#g=r,this.#i=s,this.#a=g,this.#s=c,this.#l=I,this.#c=d,this.#d=B,this.#n=mBe({pendingSenders:this.#m(),approvedSenders:CBe(t)})}get status(){if(this.#h){let t=this.#h.status;Object.assign(this.#n,t)}else this.#n.pendingSenders=this.#m();return structuredClone(this.#n)}pendingSender(t){return typeof this.#r.pendingSender=="function"?this.#r.pendingSender(t):null}pendingSenders(){return this.#m()}async start(){return this.#p&&this.#n.ready?this.status:this.#C?this.#C:(this.#C=this.#w().finally(()=>{this.#C=null}),this.#C)}async#w(){await this.stop();let t=new AbortController;this.#f=t;let{signal:o}=t;this.#n.startedAt=new Date().toISOString(),this.#n.dingtalkStreamState="connecting",this.#n.lastError=null;let a="dingtalk-harness-connect-failed";try{if(await this.#t.ensureRunning({signal:o}),this.#n.harnessReachable=!0,a="dingtalk-runtime-prepare-failed",typeof this.#r.removePendingSenderByStaffId=="function"){for(let r of m3(this.#e))await this.#r.removePendingSenderByStaffId(r);this.#n.pendingSenders=this.#m()}this.#h=new Iy({api:this.#c,clientId:this.#e.clientId,clientSecret:this.#A,approvedSenders:this.#e.approvedSenders,harness:this.#t,state:this.#r,contextEnhancement:this.#I,accessPolicy:this.#o,status:this.#n,logger:this.#g,replyTimeoutMs:this.#i,maxMessageChars:this.#a,signal:o}),a="dingtalk-stream-client-load-failed";let e=await this.#d({clientId:this.#e.clientId,clientSecret:this.#A});if(o.throwIfAborted(),this.#p=e?.client??e,this.#u=e?.topic??e?.TOPIC_ROBOT??"/v1.0/im/bot/messages/get",!this.#p||typeof this.#p.registerCallbackListener!="function"||typeof this.#p.connect!="function"||typeof this.#p.disconnect!="function"||typeof this.#p.socketCallBackResponse!="function")throw new TypeError("streamFactory returned an invalid DingTalk Stream client");let i=this.#p,A=this.#h;return a="dingtalk-stream-listener-failed",i.registerCallbackListener(this.#u,r=>{if(this.#p!==i||this.#h!==A)return;let s=ly(r?.headers?.messageId);if(s)try{i.socketCallBackResponse(s,{success:!0})}catch{this.#g.warn?.("[dsh-dingtalk] unable to acknowledge an inbound callback")}let g=this.#I,c;try{c=g?.getSettings?.()}catch{}let I=Promise.resolve().then(async()=>{if(this.#h!==A)return;let d;try{d=typeof r?.data=="string"?JSON.parse(r.data):r?.data}catch{this.#n.lastError=w("\u9489\u9489\u6D88\u606F\u683C\u5F0F\u65E0\u6548\u3002"),this.#g.warn?.("[dsh-dingtalk] ignored an invalid callback payload");return}if(!d||typeof d!="object")return;this.#n.lastCallbackAt=Date.now();let B=ni({getSettings:()=>c,get botId(){return g?.botId}},d.conversationType==="1"||d.conversationType===1?"direct":d.conversationType==="2"||d.conversationType===2?"group":null);await A.accept(d,{contextSnapshot:B})}).catch(()=>{o.aborted||this.#h!==A||(this.#n.lastError=w("\u9489\u9489\u6D88\u606F\u5904\u7406\u5931\u8D25\u3002"),this.#g.error?.("[dsh-dingtalk] callback processing failed"))}).finally(()=>this.#y.delete(I));this.#y.add(I)}),a="dingtalk-stream-connect-failed",await QBe(i,this.#s,this.#l,o),this.#n.ready=!0,this.#n.dingtalkStreamState="connected",this.#n.lastConnectedAt=Date.now(),this.#n.lastCheckedAt=Date.now(),this.#n.lastError=null,this.#B=setInterval(()=>{let r=S3(i);this.#n.ready=r,this.#n.dingtalkStreamState=r?"connected":"reconnecting",this.#n.lastCheckedAt=Date.now(),r&&(this.#n.lastError=null)},1e3),this.#B.unref?.(),this.status}catch(e){let i=o.aborted,A=i?e:Yd(a,e);throw this.#n.ready=!1,this.#n.dingtalkStreamState=i?"idle":"failed",this.#n.lastError=i?null:A?.message??String(A),await this.stop({preserveError:!i}),A}}async stop({preserveError:t=!1}={}){let o=t?this.#n.lastError:null,a=this.#f;this.#f=null,a?.abort(new DOMException("DingTalk runtime stopped","AbortError")),this.#B&&clearInterval(this.#B),this.#B=null,this.#n.ready=!1;let e=this.#p;if(this.#p=null,this.#u=null,e)try{await e.disconnect()}catch{this.#g.warn?.("[dsh-dingtalk] DingTalk Stream disconnect failed")}return await Promise.allSettled([...this.#y]),this.#y.clear(),this.#h&&await this.#h.waitForIdle(),this.#h=null,this.#n.dingtalkStreamState=t?"failed":"idle",this.#n.lastError=o,this.status}async sendConnectionTest(t){return mc({state:this.#r,text:t,channelLabel:w("\u9489\u9489\u673A\u5668\u4EBA"),send:async({sessionWebhook:o},a)=>{if(!this.#n.ready||!this.#f)throw new Error("DingTalk runtime is not connected");await this.#c.sendText({clientId:this.#e.clientId,clientSecret:this.#A,sessionWebhook:o,text:a,signal:this.#f.signal})}})}async sendProactiveText(t,o,{signal:a}={}){let e=typeof t?.route?.userId=="string"?t.route.userId.trim():"",i=typeof t?.route?.openConversationId=="string"?t.route.openConversationId.trim():"";if(t?.kind==="user"&&(!e||i)||t?.kind==="group"&&(!i||e)||t?.kind!=="user"&&t?.kind!=="group"){let A=new TypeError("Invalid DingTalk proactive delivery target");throw A.code="invalid-target",A}if(!this.#n.ready||!this.#f){let A=new Error("DingTalk runtime is not connected");throw A.code="bot-not-connected",A}a?.throwIfAborted();try{await this.#c.sendRobotText({clientId:this.#e.clientId,clientSecret:this.#A,target:{type:t.kind,robotCode:this.#e.clientId,...t.kind==="user"?{userId:e}:{openConversationId:i}},text:o,signal:a??this.#f.signal})}catch(A){if(A?.code!=="send-rejected")throw A;let r=new Error("DingTalk rejected the proactive delivery target",{cause:A});throw r.code="target-rejected",r}return{sent:!0}}#m(){return typeof this.#r.pendingSenders=="function"?this.#r.pendingSenders():[]}};import{spawn as RBe}from"node:child_process";import{randomUUID as bT}from"node:crypto";import{isAbsolute as kBe}from"node:path";import{isAbsolute as SBe}from"node:path";var wBe=256,DBe=/[\p{White_Space}\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u,OBe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u;function uu(n,t){let o=new Error(t);return o.code=n,o}function bBe(n){if(typeof n!="string"||!n||n.length>wBe||DBe.test(n))throw uu("session-id-invalid","A non-empty, safe session id is required");return n}function MBe(n,t){if(!Array.isArray(t?.items)||!Array.isArray(t?.archivedSessionIds)||t.archivedSessionIds.some(a=>typeof a!="string"||!a))throw new Error("Harness returned an invalid response for workspace.list");let o=[];for(let a of t.items){if(typeof a?.workspaceId!="string"||!a.workspaceId||typeof a.path!="string"||!SBe(a.path)||!Array.isArray(a.sessionIds)||a.sessionIds.some(e=>typeof e!="string"||!e))throw new Error("Harness returned an invalid response for workspace.list");for(let e of a.sessionIds)e===n&&o.push(a)}if(o.length===0)throw uu("session-not-registered","The session is not registered to a Harness workspace");if(o.length!==1)throw uu("session-workspace-ambiguous","The session is registered to more than one Harness workspace");if(OBe.test(o[0].path))throw new Error("Harness returned an unsafe workspace path for the session");return{workspace:o[0],archived:t.archivedSessionIds.includes(n)}}function _Be(n,t){if(!Array.isArray(t?.items)||t.items.some(i=>typeof i?.sessionId!="string"||!i.sessionId))throw new Error("Harness returned an invalid response for session.list");let o=t.items.filter(i=>i.sessionId===n);if(o.length===0)throw uu("session-summary-unavailable","The session is no longer available from Harness");if(o.length!==1)throw new Error("Harness returned duplicate session summaries for session.list");let[a]=o;if(a.origin==="subagent")throw uu("session-subagent-unsupported","Subagent sessions cannot be adopted as a bot conversation");if(a.origin!==void 0)throw new Error("Harness returned an invalid session origin for session.list");let e=a.projections?.values?.title;if(e!=null&&typeof e!="string")throw new Error("Harness returned an invalid session title for session.list");return{title:typeof e=="string"?e:null}}async function w3(n,t,o={},a=3e4){let e=bBe(t);await n.ensureRunning(o);let i=await n.rpc("workspace.list",{},a,o),{workspace:A,archived:r}=MBe(e,i),s=_Be(e,await n.rpc("session.list",{},a,o)),g=await n.rpc("session.create",{workspaceId:A.workspaceId,sessionId:e},a,o);if(!g||g.sessionId!==e)throw new Error("Harness returned an invalid response for session.create");return{sessionId:e,workspace:A.path,title:s.title,archived:r}}function Cu(n,t,o){try{let a=n?.(t);a&&typeof a.then=="function"&&Promise.resolve(a).catch(o)}catch(a){o(a)}}async function TBe({apiProxy:n,rpcId:t,signal:o,onOpen:a,onEnvelope:e}){let i=new AbortController,A=()=>i.abort(o.reason),r,s,g,c=I=>{i.signal.aborted||(g=I,A())};o.addEventListener("abort",A,{once:!0});try{for(r=n.events.mux({rpcId:t,payload:{}},i.signal)[Symbol.asyncIterator](),s=Promise.resolve(r.next()),i.signal.aborted||Cu(a,A,c);!i.signal.aborted;){let{value:I,done:d}=await s;if(d||i.signal.aborted)break;Cu(e,{type:"server-request",rpcId:I?.rpcId,method:I?.payload?.type,payload:I?.payload},c),i.signal.aborted||(s=Promise.resolve(r.next()))}}catch(I){c(I)}finally{let I=i.signal.aborted;o.removeEventListener("abort",A),A(),await s?.catch(()=>{});try{await r?.return?.()}catch(d){I||(g??=d)}}if(g)throw g}function NBe({baseUrl:n,createWebSocket:t,signal:o,onOpen:a,onEnvelope:e,onMalformed:i}){let A=new URL("/api/events.mux",n);return A.protocol=A.protocol==="https:"?"wss:":"ws:",new Promise((r,s)=>{let g=t(A.toString()),c=!1,I=!1,d=T=>{if(!I){I=!0,g.removeEventListener("open",f),g.removeEventListener("message",Q),g.removeEventListener("close",y),g.removeEventListener("error",m),o.removeEventListener("abort",_);try{(g.readyState===0||g.readyState===1)&&g.close()}catch{}T&&!o.aborted?s(T):r()}},B=()=>d(),f=()=>{I||c||(c=!0,Cu(a,B,d))},Q=T=>{if(I)return;let R;try{if(typeof T.data!="string")throw new Error("binary WebSocket frame");R=JSON.parse(T.data)}catch(L){Cu(i,L,()=>{});return}Cu(e,R,d)},y=()=>d(c?void 0:new Error("Harness event mux WebSocket closed before opening")),m=()=>d(new Error(c?"Harness event mux WebSocket failed":"Harness event mux WebSocket failed before opening")),_=()=>d();g.addEventListener("open",f),g.addEventListener("message",Q),g.addEventListener("close",y,{once:!0}),g.addEventListener("error",m,{once:!0}),o.addEventListener("abort",_,{once:!0}),o.aborted&&_()})}async function D3(n){if(!n.signal.aborted)return n.baseUrl!==void 0&&n.baseUrl!==null?NBe(n):TBe(n)}var vBe=new Map,PBe=new WeakMap,GBe=64;async function FBe(n){let t=n?.body;if(!t||typeof t.getReader!="function")return null;let o=t.getReader(),a=[],e=0;try{for(;;){let{done:r,value:s}=await o.read();if(r)break;if(!(s instanceof Uint8Array)||e+s.byteLength>GBe)return null;a.push(s),e+=s.byteLength}}catch{return null}finally{try{await o.cancel()}catch{}}let i=new Uint8Array(e),A=0;for(let r of a)i.set(r,A),A+=r.byteLength;return new TextDecoder().decode(i)}function LBe(n){if(n==="localhost"||n==="[::1]")return!0;let t=n.split(".");return t.length===4&&t[0]==="127"&&t.every(o=>/^\d{1,3}$/.test(o)&&Number(o)<=255)}async function UBe(n,t){return n.status===401?"harness-auth-required":n.status===407?"harness-proxy-auth-required":n.status===403?(await FBe(n))?.trim()!=="forbidden"?"harness-request-forbidden":LBe(t)?"harness-loopback-forbidden":"harness-host-untrusted":n.status===404?"harness-api-not-found":"harness-http-failed"}function N3(n){let t=typeof n=="string"?vBe:PBe,o=t.get(n);return o||(o={ownerships:new Map,claims:new Map,controls:new WeakMap,nextOrder:0},t.set(n,o)),o}function O3(n,t){return new Promise((o,a)=>{let e=()=>t.removeEventListener("abort",i),i=()=>{e(),a(t.reason)};if(t.aborted){i();return}t.addEventListener("abort",i,{once:!0}),Promise.resolve().then(()=>(t.throwIfAborted(),n())).then(A=>{e(),o(A)},A=>{e(),a(A)})})}function b3(n){let t=typeof n?.owner;return t!=="object"&&t!=="function"||n.owner===null||typeof n.key!="string"||!n.key?null:{owner:n.owner,key:n.key}}function MT(n){return n!==null&&typeof n=="object"&&typeof n.provider=="string"&&!!n.provider&&typeof n.model=="string"&&!!n.model&&(n.reasoningEffort===void 0||typeof n.reasoningEffort=="string"&&!!n.reasoningEffort)}function HBe(n){return n!==null&&typeof n=="object"&&Array.isArray(n.efforts)&&n.efforts.length>0&&n.efforts.every(t=>t!==null&&typeof t=="object"&&typeof t.id=="string"&&!!t.id&&typeof t.name=="string"&&!!t.name&&(t.description===void 0||typeof t.description=="string"))&&(n.defaultEffort===void 0||typeof n.defaultEffort=="string"&&!!n.defaultEffort)}function M3(n,t,{session:o=!1}={}){if(!n||typeof n!="object"||!Array.isArray(n.groups)||!Array.isArray(n.failures))throw new Error(`Harness returned an invalid response for ${t}`);for(let a of n.groups){if(!a||typeof a!="object"||typeof a.id!="string"||!a.id||typeof a.name!="string"||!a.name||!Array.isArray(a.models))throw new Error(`Harness returned an invalid response for ${t}`);for(let e of a.models)if(!e||typeof e!="object"||typeof e.id!="string"||!e.id||typeof e.name!="string"||!e.name||e.description!==void 0&&typeof e.description!="string"||e.reasoning!==void 0&&!HBe(e.reasoning))throw new Error(`Harness returned an invalid response for ${t}`)}for(let a of n.failures)if(!a||typeof a!="object"||typeof a.id!="string"||!a.id||typeof a.name!="string"||!a.name||a.message!==void 0&&typeof a.message!="string")throw new Error(`Harness returned an invalid response for ${t}`);if(o&&(!MT(n.current)||typeof n.routable!="boolean"))throw new Error(`Harness returned an invalid response for ${t}`);return n}function _3(){let n=new Error("Harness turn was stopped before producing a text reply");return n.code="turn-stopped",n}function KBe(n){return Array.isArray(n?.items)?n.items.flatMap(t=>typeof t?.path=="string"&&kBe(t.path)?[t.path]:[]):[]}function xBe(n,t){if(!Array.isArray(t?.items)||!Array.isArray(t?.archivedSessionIds))throw new Error("Harness returned an invalid response for workspace.list");let o=t.items.find(a=>a?.path===n);if(!o)return null;if(!Array.isArray(o.sessionIds)||o.sessionIds.some(a=>typeof a!="string"))throw new Error("Harness returned invalid session IDs for workspace.list");return o}function YBe(n){if(typeof n=="number"&&Number.isFinite(n))return n<1e12?n*1e3:n;if(typeof n=="string"&&n){let t=Date.parse(n);if(!Number.isNaN(t))return t}return null}function jBe(n){if(!n||typeof n!="object")return null;let t=[n?.header?.lastActivityAt,n?.header?.updatedAt,n?.header?.createdAt,n?.projections?.values?.lastActivityAt,n?.projections?.values?.updatedAt,n?.projections?.values?.createdAt,n?.lastActivityAt,n?.updatedAt,n?.createdAt];for(let o of t){let a=YBe(o);if(a!==null)return a}return null}function JBe(n,t,o){if(!Array.isArray(o?.items))throw new Error("Harness returned an invalid response for session.list");let a=new Set(t),e=new Map(o.items.flatMap(i=>typeof i?.sessionId=="string"?[[i.sessionId,i]]:[]));return{workspace:n.path,sessions:n.sessionIds.map(i=>{let A=e.get(i),r=A?.projections?.values?.title,s={sessionId:i,title:typeof r=="string"?r:null,archived:a.has(i),blank:A?.blank===!0,origin:A?.origin==="subagent"?"subagent":null,summaryAvailable:A!==void 0},g=A?.projections?.asOfSeq;Number.isSafeInteger(g)&&g>=-1&&(s.lastSeq=g);let c=jBe(A);return c!==null&&(s.time=c),s})}}function Bu(n,t){return new Promise((o,a)=>{if(t?.aborted){a(t.reason??new DOMException("Aborted","AbortError"));return}let e=setTimeout(()=>{t?.removeEventListener("abort",i),o()},n),i=()=>{clearTimeout(e),a(t.reason??new DOMException("Aborted","AbortError"))};t?.addEventListener("abort",i,{once:!0})})}function qBe(n){return(n?.data?.message?.content??[]).filter(t=>t.type==="text"&&typeof t.text=="string").map(t=>t.text).join(` +`).trim()}function Ua(n){return typeof n=="string"&&n.trim()?n.trim():null}function zBe(n){if(!n||typeof n!="object")return null;let t=Ua(n.message);if(t)return t;let o=Ua(n.name),a=Ua(n.code);return o||a?[o??"Error",a].filter(Boolean).join(": "):null}function R3(n,t){let o=[...t].map(a=>a?.event??a).filter(Boolean).sort((a,e)=>(a.seq??-1)-(e.seq??-1));for(let a of o){let e=a.seq??-1;if(e<=n.lastSeq)continue;if(n.lastSeq=e,a.type==="turn/start"){let A=a.data?.turn??null;n.active&&A!==n.turn&&(n.active=!1),n.turn!==null&&A!==n.turn&&(n.completed=!0),n.openTurn=A;continue}if(a.type==="user/message"&&a.data?.source?.rpcId===n.promptRpcId){n.active=!0,n.started=!0,n.completed=!1,n.turn=a.data?.turn??n.openTurn;continue}if(a.type==="turn/end"&&a.data?.turn===n.turn){n.active=!1,n.completed=!0;continue}let i=null;if(a.type==="tool/call"&&n.active&&a.data?.turn===n.turn&&typeof a.data?.callId=="string"&&a.data.callId)i={callId:a.data.callId,name:a.data?.name,arguments:a.data?.arguments};else if(a.type==="tool/code-dispatch-start"&&n.active&&typeof a.data?.subCallId=="string"&&a.data.subCallId){let A;try{A=JSON.stringify(a.data?.arguments)}catch{A=void 0}i={callId:a.data.subCallId,name:a.data?.name,arguments:A}}i&&n.toolCalls.set(i.callId,Object.freeze(i))}}function k3(n,t,o=[]){if(!n||!["object","function","string"].includes(typeof n)||typeof t!="string"||!t)return!1;let a=N3(n).ownerships.get(t);if(!a||a.size===0)return!1;for(let e of a)R3(e,o);return[...a].some(e=>e.active&&!e.completed&&typeof e.reconnect=="function")}var ip=class{#e;#A;#t=null;#r=null;#I=new Map;#o="";#g=!1;#i=null;#a=new Map;#s=null;constructor({promptRpcId:t,afterSeq:o=-1}){this.#e=t,this.#A=o}get finished(){return this.#g}get lastSeq(){return this.#A}get answer(){return this.#o.trim()}get reason(){return this.#i}get tracking(){return this.#r!==null&&!this.#g}get turn(){return this.#r}consumeAll(t){let o=[],a=i=>{if(i.type==="text"&&o.length>0&&o[o.length-1].type==="text"){o[o.length-1]=i;return}o.push(i)},e=[...t].map(i=>i?.event??i).filter(Boolean).sort((i,A)=>(i.seq??-1)-(A.seq??-1));for(let i of e){let A=i.seq??-1;if(!(A<=this.#A)){if(this.#A=A,i.type==="turn/start"&&(this.#t=i.data?.turn??null),i.type==="user/message"&&i.data?.source?.rpcId===this.#e){this.#r=this.#t;continue}if(this.#r!==null){if(i.type==="turn/end"){if(i.data?.turn!==this.#r)continue;this.#g=!0,this.#i=i.data?.reason??null,this.#t=null;continue}if(i.data?.turn===this.#r){if(i.type==="assistant/chunk"&&i.data?.chunk?.type==="text-delta"){let r=i.data?.step??0,s=i.data.chunk.index??0,g=`${r}:${s}`;this.#I.set(g,(this.#I.get(g)??"")+i.data.chunk.text);let c=`${r}:`,I=[...this.#I.entries()].filter(([d])=>d.startsWith(c)).sort(([d],[B])=>Number(d.split(":")[1])-Number(B.split(":")[1])).map(([,d])=>d).join(` +`).trim();I&&I!==this.#o&&(this.#o=I,a({type:"text",text:I}));continue}if(i.type==="assistant/message"){let r=qBe(i);r&&r!==this.#o&&(this.#o=r,a({type:"text",text:r}));continue}if(i.type==="tool/call"){let r=Ua(i.data?.name)??w("\u5DE5\u5177"),s=Ua(i.data?.callId)??Ua(i.data?.subCallId);s&&this.#a.set(s,r),this.#s=r,a({type:"tool",name:r,...s?{callId:s}:{}})}else if(i.type==="tool/result"){let r=Ua(i.data?.message?.source?.callId)??Ua(i.data?.callId)??Ua(i.data?.subCallId),s=(r?this.#a.get(r):null)??this.#s,g=zBe(i.data?.error);a({type:"status",text:w("\u6B63\u5728\u6574\u7406\u7ED3\u679C\u2026"),...s?{toolName:s}:{},...g?{error:g}:{}})}}}}}return o}consume(t){return this.consumeAll(t).at(-1)??null}},Mn=class extends Error{constructor(t,o){super(`${t}: ${o?.message??"unknown Harness RPC error"}`),this.name="HarnessRpcError",this.method=t,this.code=o?.code??"internal",this.details=o?.details??{}}},us=class extends Error{constructor(t,o,{cause:a,status:e}={}){let i=Number.isInteger(e)?`, HTTP ${e}`:"";super(`Harness ${o} transport failed (${t}${i})`,{cause:a}),this.name="HarnessTransportError",this.code=t,this.method=o,Number.isInteger(e)&&(this.status=e)}},_T=class extends Error{constructor(t){super("Harness health RPC was rejected",{cause:t}),this.name="HarnessHealthError",this.code="harness-rpc-rejected",this.method="host.describe"}},ap=class extends Error{constructor(t,o){super(o),this.name="HarnessInteractionError",this.code=t}},Cs=class extends Error{constructor(t,{reason:o,providerCode:a}={}){super(`Harness turn failed (${t})`),this.name="HarnessTurnError",this.code=t,this.promptAccepted=!0,o&&typeof o=="object"&&(this.reason=o),typeof a=="string"&&a&&(this.providerCode=a)}};function T3(n){let t=Ua(n?.kind)??Ua(n);if(t==="error"){let o=n?.error??n?.failure;return new Cs("harness-turn-failed",{reason:n,providerCode:Ua(o?.code)??void 0})}return t==="max-tokens"?new Cs("model-max-tokens",{reason:n}):t==="blocked"?new Cs("turn-blocked",{reason:n}):["interrupted","stopped","cancelled","canceled"].includes(t)?new Cs("turn-interrupted",{reason:n}):t==="aborted"?new Cs("turn-aborted",{reason:n}):t==="completed"?new Cs("model-empty-response",{reason:n}):new Cs("harness-turn-failed",{reason:n})}function VBe(n){return n==null?!0:(Ua(n?.kind)??Ua(n))==="completed"}var yr=class{#e;#A;#t;#r;#I;#o;#g;#i;#a;#s;#l;#c;#d;#n;#p;#h=null;#u;#C;#B;#f;constructor({baseUrl:t,apiProxy:o,interactionScope:a=o,workspace:e,agentPreset:i,autostart:A=!1,dshBin:r="dsh",fetchImpl:s=fetch,createWebSocket:g=m=>new WebSocket(m),interactionReconnectDelayMs:c=500,rpcIdPrefix:I="im",logPrefix:d="dsh-im",commandExecutor:B,controlExecutor:f,sessionMaintenanceExecutor:Q,fileIngressExecutor:y}){if(typeof g!="function")throw new TypeError("createWebSocket must be a function");if(!Number.isFinite(c)||c<0)throw new TypeError("interactionReconnectDelayMs must be a non-negative number");if(typeof I!="string"||!I.trim())throw new TypeError("rpcIdPrefix must be a non-empty string");if(typeof d!="string"||!d.trim())throw new TypeError("logPrefix must be a non-empty string");if(B!==void 0&&typeof B!="function")throw new TypeError("commandExecutor must be a function");if(f!==void 0&&typeof f!="function")throw new TypeError("controlExecutor must be a function");if(Q!==void 0&&typeof Q!="function")throw new TypeError("sessionMaintenanceExecutor must be a function");if(y!==void 0&&typeof y!="function")throw new TypeError("fileIngressExecutor must be a function");if(this.#e=t===void 0?null:new URL(t),this.#A=this.#e?null:o,!this.#e&&(!this.#A||typeof this.#A!="object"))throw new TypeError("HarnessClient requires the current Host apiProxy or an explicit baseUrl");if(this.#A&&(!a||!["object","function"].includes(typeof a)))throw new TypeError("interactionScope must identify the current Host");this.#t=e,this.#r=i??void 0,this.#I=!!(this.#e&&A),this.#o=r,this.#g=s,this.#i=g,this.#a=c,this.#s=I.trim(),this.#l=d.trim(),this.#c=B,this.#d=f,this.#n=Q,this.#p=y,this.#u=N3(this.#e?.origin??a),this.#C=this.#u.ownerships,this.#B=this.#u.claims,this.#f=this.#u.controls}async rpc(t,o={},a=3e4,e={}){let i=e.rpcId??`${this.#s}-${bT()}`,A=AbortSignal.timeout(a),r=e.signal?AbortSignal.any([e.signal,A]):A,s;try{if(this.#A){let[g,c,I]=t.split("."),d={host:"host",workspace:"workspace",session:"sessions",llm:"llm"}[g],B=d&&this.#A[d];if(I!==void 0||!Object.hasOwn(B??{},c)||typeof B[c]!="function")throw new us("harness-api-not-found",t);s={type:"server-response",...await O3(()=>B[c]({rpcId:i,payload:o},r),r)}}else{let g=await this.#g(new URL(`/api/${t}`,this.#e),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({type:"client-request",rpcId:i,method:t,payload:o}),signal:r});if(!g.ok){let c=await UBe(g,this.#e.hostname);throw new us(c,t,{status:g.status})}try{s=await g.json()}catch(c){throw new us("harness-response-invalid",t,{cause:c})}}}catch(g){throw e.signal?.aborted||g instanceof us?g:new us(A.aborted?"harness-timeout":"harness-connect-failed",t,{cause:g})}if(s?.type!=="server-response"||s?.rpcId!==i)throw new us("harness-response-invalid",t,{cause:new Error(`Harness returned an invalid response for ${t}`)});if(!s.result||typeof s.result!="object"||typeof s.result.ok!="boolean")throw new us("harness-response-invalid",t,{cause:new Error(`Harness returned an invalid result for ${t}`)});if(!s.result?.ok)throw new Mn(t,s.result?.error);return s.result.value}async health(t={}){try{return await this.rpc("host.describe",{},5e3,t),!0}catch(o){throw o instanceof Mn?new _T(o):o}}async ensureRunning(t={}){try{return await this.health(t)}catch(e){if(!this.#I)throw e}if(!this.#h||this.#h.exitCode!==null){let e=this.#e.port||(this.#e.protocol==="https:"?"443":"80");this.#h=RBe(this.#o,["web","--host",this.#e.hostname,"--port",e],{cwd:this.#t,env:process.env,stdio:["ignore","inherit","inherit"]}),this.#h.on("error",i=>{console.error(`[${this.#l}] failed to start Harness:`,i.message)})}let o=Date.now()+6e4,a;for(;Date.now(){let r=A&&a.signal?AbortSignal.any([A,a.signal]):A??a.signal;return this.rpc("session.selectModel",{sessionId:t,provider:o.provider,model:o.model,...o.reasoningEffort===void 0?{}:{reasoningEffort:o.reasoningEffort}},3e4,r?{...a,signal:r}:a)},i=this.#n?await this.#n({sessionId:t,operation:e}):await e();if(!i||typeof i!="object"||!MT(i.selected))throw new Error("Harness returned an invalid response for session.selectModel");return i}async isSessionRunning(t,o={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");await this.ensureRunning(o);let a=await this.rpc("session.list",{},3e4,o);if(!a||typeof a!="object"||!Array.isArray(a.items))throw new Error("Harness returned an invalid response for session.list");for(let e of a.items)if(!e||typeof e!="object"||typeof e.sessionId!="string"||!e.sessionId||typeof e.running!="boolean")throw new Error("Harness returned an invalid response for session.list");return a.items.find(e=>e.sessionId===t)?.running??!1}async adoptWorkspaceSession(t,o={}){return w3(this,t,o)}async workspaceId(t={}){let{workspace:o=this.#t,...a}=t,{items:e}=await this.rpc("workspace.list",{},3e4,a),i=e.find(r=>r.path===o);return i?i.workspaceId:(await this.rpc("workspace.create",{path:o},3e4,a)).workspace.workspaceId}async createSession(t={}){let{agentPreset:o,...a}=t;await this.ensureRunning(a);let i={workspaceId:await this.workspaceId(a)},A=o!==void 0?o:this.#r;return A!=null&&(i.agentPreset=A),(await this.rpc("session.create",i,3e4,a)).sessionId}async renameSession(t,o,a={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");if(typeof o!="string"||!o.trim())throw new TypeError("session title is required");return this.rpc("session.rename",{sessionId:t,title:o},3e4,a)}async executeCommand(t,o,a={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");if(typeof o!="string"||!o)throw new TypeError("command line is required");if(!this.#c){let e=new Error("Harness command execution is unavailable");throw e.code="commands-unavailable",e}try{return await this.#c(t,o,a)}catch(e){throw e?.failure&&typeof e.failure=="object"?new Mn("commands.execute",e.failure):e}}async readSessionHistory(t,{maxMessages:o=50,beforeSeq:a,timeoutMs:e=1e4,...i}={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");if(!Number.isSafeInteger(o)||o<1||a!==void 0&&(!Number.isSafeInteger(a)||a<0))throw new TypeError("Invalid history pagination");return this.rpc("session.history",{sessionId:t,maxMessages:o,...a===void 0?{}:{beforeSeq:a}},e,i)}async sessionExists(t,o={}){try{return await this.rpc("session.history",{sessionId:t,maxMessages:1},3e4,o),!0}catch(a){if(a instanceof Mn&&a.code==="session-not-found")return!1;throw a}}async respondInteraction(t,o,a={}){if(typeof t!="string"||!t)throw new TypeError("rpcId is required");if(!o||typeof o!="object"||typeof o.ok!="boolean")throw new TypeError("A Harness RPC result is required");let e=AbortSignal.timeout(a.timeoutMs??3e4),i=a.signal?AbortSignal.any([a.signal,e]):e,A={type:"client-response",rpcId:t,result:o},r;if(this.#A)r=await O3(()=>this.#A.respond(A),i);else{let g=await this.#g(new URL("/api/respond",this.#e),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(A),signal:i});if(!g.ok)throw new Error(`Harness transport respond failed: HTTP ${g.status}`);r=await g.json()}if(r?.accepted===!0)return r;if(r?.accepted!==!1||r.reason!=="bad-response"&&r.reason!=="not-pending")throw new Error("Harness returned an invalid interaction response receipt");let s=r.reason;throw new ap(`interaction-${s}`,`Harness interaction response was rejected (${s})`)}async watchInteractions(t,{signal:o,onInteraction:a,onResolved:e,onOpen:i,ownership:A}={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");if(!o||typeof o.addEventListener!="function")throw new TypeError("watchInteractions requires an AbortSignal");if(a!==void 0&&typeof a!="function")throw new TypeError("onInteraction must be a function");if(e!==void 0&&typeof e!="function")throw new TypeError("onResolved must be a function");if(i!==void 0&&typeof i!="function")throw new TypeError("onOpen must be a function");for(;!o.aborted;){try{await this.#T(t,{signal:o,onInteraction:a,onResolved:e,onOpen:i,ownership:A})}catch(r){if(o.aborted)return;console.warn(`[${this.#l}] Harness interaction stream disconnected:`,r.message)}if(o.aborted)return;try{await Bu(this.#a,o)}catch{if(o.aborted)return;throw new Error("Harness interaction reconnect wait failed")}}}#y(t,o){let a=this.#C.get(t)??new Set;o.order=this.#u.nextOrder,this.#u.nextOrder+=1,a.add(o),this.#C.set(t,a)}#w(t,o){let a=this.#C.get(t);a?.delete(o),a?.size===0&&this.#C.delete(t);for(let[e,i]of this.#B)i.ownership===o&&this.#B.delete(e)}#m(t){if(!t.control)return;let o=this.#f.get(t.control.owner);o||(o=new Map,this.#f.set(t.control.owner,o));let a=o.get(t.control.key)??new Set;a.add(t),o.set(t.control.key,a)}#Q(t){if(!t.control)return;let o=this.#f.get(t.control.owner),a=o?.get(t.control.key);a?.delete(t),a?.size===0&&o.delete(t.control.key),o?.size===0&&this.#f.delete(t.control.owner)}#D(t,o){let a=b3(o);return a?[...this.#f.get(a.owner)?.get(a.key)??[]].filter(i=>i.sessionId===t).sort((i,A)=>i.order-A.order):[]}#E(t,o){return this.#D(t,o).find(a=>a.started&&a.active&&!a.completed&&a.turn!==null)??null}async#k(t,o,a){let e=this.#D(t,o);if(e.length===0)return null;try{let i=await this.rpc("session.history",{sessionId:t,maxMessages:50},3e4,a);this.#M(t,i.events??[])}catch(i){if(!(i instanceof Mn)||i.code!=="session-not-found")throw i;for(let A of e)A.active=!1,A.completed=!0;return null}return this.#E(t,o)}async hasActiveTurn(t,o,a={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");return!!await this.#k(t,o,a)}async stopActiveTurn(t,o,a={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");let e=await this.#k(t,o,a);if(!e)return!1;if(e.stopRequested)return!0;if(this.#E(t,o)!==e)return!1;e.stopRequested=!0;try{if(this.#d){let i=this.#d({sessionId:t,expectedTurn:e.turn,promptRpcId:e.promptRpcId,action:"stop"});if(i&&typeof i.then=="function")throw new TypeError("controlExecutor must return synchronously");if(i!==void 0){if(typeof i!="boolean")throw new TypeError("controlExecutor must return a boolean or undefined");return i||(e.stopRequested=!1),i}}return await this.rpc("session.cancel",{sessionId:t,keepInbox:!0},3e4,a),!0}catch(i){if(this.#E(t,o)===e&&(e.stopRequested=!1),i instanceof Mn&&i.code==="session-not-found")return!1;throw i}}async steerActiveTurn(t,o,a,e={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");if(typeof o!="string"||!o.trim())throw new TypeError("Steering text is required");let i=await this.#k(t,a,e);if(!i||i.stopRequested||this.#E(t,a)!==i)return!1;if(this.#d){let A=this.#d({sessionId:t,expectedTurn:i.turn,promptRpcId:i.promptRpcId,action:"steer",text:o});if(A&&typeof A.then=="function")throw new TypeError("controlExecutor must return synchronously");if(A!==void 0){if(typeof A!="boolean")throw new TypeError("controlExecutor must return a boolean or undefined");return A}}return await this.rpc("session.prompt",{sessionId:t,mode:"steer",content:[{type:"text",text:o}],clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},3e4,e),!0}#M(t,o){for(let a of this.#C.get(t)??[])R3(a,o)}async#O(t,o){let a=await this.rpc("session.history",{sessionId:t,maxMessages:50},3e4,{signal:o});this.#M(t,a.events??[])}#S(t,o,a){let e=this.#B.get(o);if(e&&this.#C.get(t)?.has(e.ownership))return e;let i=[...this.#C.get(t)??[]],A=i.filter(s=>s.active).sort((s,g)=>s.order-g.order);if(A.length>0)return{ownership:A[0],recovered:!1};let r=i.filter(s=>!s.started&&!s.completed).sort((s,g)=>s.order-g.order)[0]??null;return r?{ownership:r,recovered:!0}:null}async#_(t,o,a){if(!this.#p)throw new Uo("inbound-file-ingress-unavailable","Harness file ingress is unavailable in this Host process.");let i=(await this.rpc("session.list",{},3e4,{signal:a}))?.items?.find(A=>A?.sessionId===t)?.cwd;return this.#p({sessionId:t,workspace:i,files:o,signal:a})}async ask(t,o,a={}){typeof a=="number"&&(a={timeoutMs:a});let e=a.timeoutMs??6e5,i=a.signal,A=typeof a.onUpdate=="function"?a.onUpdate:null,r=a.progressMode==="all"?"all":"latest",s=typeof a.onArtifact=="function"?a.onArtifact:null,g=typeof a.onInteraction=="function"?a.onInteraction:void 0,c=typeof a.onInteractionResolved=="function"?a.onInteractionResolved:void 0,I=b3(a.control),d=Array.isArray(a.files)?a.files.filter(Boolean):[];await this.ensureRunning({signal:i});let B=await this.rpc("session.history",{sessionId:t,maxMessages:1},3e4,{signal:i}),f=Math.max(-1,...(B.events??[]).map(({event:q})=>q.seq??-1)),Q=`${this.#s}-${bT()}`,y=new ip({promptRpcId:Q,afterSeq:f}),m=g||c?new AbortController:null,_=m?i?AbortSignal.any([i,m.signal]):m.signal:null,T=m||I?{sessionId:t,promptRpcId:Q,active:!1,started:!1,completed:!1,stopRequested:!1,turn:null,openTurn:null,lastSeq:f,reconnect:null,order:-1,toolCalls:new Map,control:I}:null,R=null,L=!1,U=0,F=[],J=!1,V=!1,H=async()=>{if(!s||L||y.turn===null)return U;L=!0;let q=Al.take(t,y.turn,{signal:i});for(let K of q)try{await s(K),U+=1}catch(N){Al.release(K),console.warn(`[${this.#l}] ignored an artifact handoff failure:`,N.message)}return U};T&&(this.#y(t,T),this.#m(T));let G=Al.openConsumer(t,Q);try{let q=o;if(d.length>0){let z=await this.#_(t,d,i);F.push(z),o=pT(o,z)}if(_){let z,X=new Promise(ie=>{z=ie});R=this.watchInteractions(t,{signal:_,onInteraction:g,onResolved:c,onOpen:z,ownership:T}),R.catch(()=>{}),await Promise.race([X,Bu(3e4,_).then(()=>{throw new Error("Harness interaction stream did not open within 30 seconds")})])}let K=typeof o=="string"?[{type:"text",text:o}]:o;if(!Array.isArray(K)||K.length===0)throw new TypeError("Harness prompt content is required");let N=Intl.DateTimeFormat().resolvedOptions().timeZone,k=z=>this.rpc("session.prompt",{sessionId:t,mode:"queue",content:z,clientTimeZone:N},3e4,{rpcId:Q,signal:i});try{await k(K)}catch(z){let X=RY(z)?TY(K):[];if(X.length===0)throw z;let ie;try{ie=await this.#_(t,X,i)}catch(Se){throw i?.aborted?i.reason??Se:(console.warn(`[${this.#l}] unable to restage rejected images as workspace files:`,Se?.message??String(Se)),z)}F.push(ie);let oe=pT([...NY(typeof q=="string"?[{type:"text",text:q}]:q),{type:"text",text:w(MY)}],{files:F.flatMap(Se=>Se?.files??[])});await k(oe)}J=!0;try{let z=Date.now(),X=y.lastSeq;for(;;){await Bu(300,i);let ie=await this.rpc("session.history",{sessionId:t,maxMessages:50},3e4,{signal:i}),De=T?.active===!0;T&&(this.#M(t,ie.events??[]),!De&&T.active&&T.reconnect?.());let oe=y.consumeAll(ie.events??[]),Se=y.lastSeq>X;if(X=y.lastSeq,Se&&(z=Date.now()),A){let Re=r==="all"?oe:oe.slice(-1);for(let Ne of Re)try{await A(Ne)}catch(Je){console.warn(`[${this.#l}] ignored a progress update failure:`,Je.message)}}if(y.finished){if(V=!0,!T?.stopRequested&&!VBe(y.reason))throw T3(y.reason);let Re=T?.stopRequested?0:await H();if(y.answer)return y.answer;if(Re>0)return"";throw T?.stopRequested?_3():T3(y.reason)}if(Date.now()-z{})}}async#T(t,{signal:o,onInteraction:a,onResolved:e,onOpen:i,ownership:A}){let r=!1,s=null,g=Promise.resolve(),c=A==null,I=[],d=()=>{},B=m=>{d=m,A&&(A.reconnect=d);try{i?.()}catch(_){console.warn(`[${this.#l}] ignored an interaction open callback failure:`,_.message)}A&&this.#O(t,o).then(()=>{if(!r){c=!0;for(let _ of I.splice(0))Q(_)}}).catch(_=>{s??=_,d()})},f=(m,_)=>{m&&(g=g.then(()=>m(_)).catch(T=>{s??=T,d()}))},Q=m=>{let _=m.payload;if(A&&_.type==="session/event"){this.#M(t,[_.event]);return}if(_.type==="question/requested"||_.type==="approval/requested"){let T=_.type==="question/requested"?"question":"approval",R=T==="question"?m.rpcId:_.approvalId,L=`${T}:${R}`;if(A){let F=this.#S(t,L,T);if(F?.ownership!==A)return;this.#B.set(L,F)}let U=T==="approval"&&A&&typeof _.callId=="string"?this.#B.get(L)?.ownership.toolCalls.get(_.callId):void 0;f(a,Object.freeze({kind:T,interactionId:R,rpcId:m.rpcId,sessionId:t,payload:_,recovered:A?this.#B.get(L)?.recovered===!0:!1,...U?{toolCall:U}:{},reconnect:d,respond:(F,J={})=>this.respondInteraction(m.rpcId,F,{...J,signal:J.signal??o})}));return}if(_.type==="question/resolved"||_.type==="approval/resolved"){let T=_.type==="question/resolved"?"question":"approval",R=T==="question"?_.questionRpcId:_.approvalId,L=`${T}:${R}`;if(A){if(this.#B.get(L)?.ownership!==A)return;this.#B.delete(L)}f(e,Object.freeze({kind:T,interactionId:R,sessionId:t,outcome:_.outcome,payload:_}))}},y=m=>{try{let _=m?.payload;if(m?.type!=="server-request"||typeof m.rpcId!="string"||!_||typeof _!="object"||m.method!==_.type)throw new Error("invalid server-request envelope");if(_.sessionId!==t)return;c?Q(m):I.push(m)}catch(_){console.warn(`[${this.#l}] ignored a malformed Harness interaction frame:`,_.message)}};try{await this.#P({signal:o,onOpen:B,onEnvelope:y})}finally{r=!0,A?.reconnect===d&&(A.reconnect=null),o.aborted||await g}if(!o.aborted&&s)throw s}async watchHarnessEvents({signal:t,onSessionEvent:o,onReconnect:a}={}){if(typeof o!="function")throw new TypeError("watchHarnessEvents requires onSessionEvent");if(!t||typeof t.addEventListener!="function")throw new TypeError("watchHarnessEvents requires an AbortSignal");if(a!==void 0&&typeof a!="function")throw new TypeError("onReconnect must be a function");for(;!t.aborted;){try{await this.#P({signal:t,onOpen:()=>{try{a?.()}catch(e){console.warn(`[${this.#l}] mux reconnect hook failed:`,e.message)}},onEnvelope:e=>{try{let i=e?.payload;if(e?.type!=="server-request"||!i||typeof i!="object"||e.method!==i.type||i.type!=="session/event"||typeof i.sessionId!="string"||!i.event||typeof i.event!="object")return;o({sessionId:i.sessionId,event:i.event})}catch(i){console.warn(`[${this.#l}] ignored a malformed global mux frame:`,i.message)}}})}catch(e){if(t.aborted)return;console.warn(`[${this.#l}] Harness event mux disconnected:`,e.message)}if(t.aborted)return;try{await Bu(this.#a,t)}catch{if(t.aborted)return;throw new Error("Harness event mux reconnect wait failed")}}}#P(t){return D3({apiProxy:this.#A,baseUrl:this.#e,createWebSocket:this.#i,rpcId:`${this.#s}-${bT()}`,...t,onMalformed:o=>{console.warn(`[${this.#l}] ignored a malformed Harness mux frame:`,o.message)}})}stopManagedProcess(){this.#h?.exitCode===null&&this.#h.kill("SIGTERM")}};var dy=class extends yr{constructor(t){super({...t,rpcIdPrefix:"dingtalk",logPrefix:"dsh-dingtalk"})}};import{mkdir as ife,readFile as afe,realpath as ofe,rename as nfe,stat as sfe,unlink as gfe,writeFile as cfe}from"node:fs/promises";import{dirname as Ife,isAbsolute as Aj,resolve as fu}from"node:path";var eiA=Object.freeze(["chat","user_in_chat"]),op="user_in_chat";function np(n){let t=String(n??"").trim().toLowerCase();return t==="chat"||t==="shared"||t==="shared_chat"?"chat":t==="user_in_chat"||t==="user"||t==="per_user"||t==="member"?"user_in_chat":op}function sp(n){let t=String(n??"").trim().toLowerCase();if(t==="chat"||t==="user_in_chat")return t;let o=new TypeError(`Invalid group session scope: ${String(n)}`);throw o.code="invalid-group-session-scope",o}function v3({kind:n,conversationId:t,senderId:o,groupSessionScope:a=op}){let e=String(t??"").trim(),i=String(o??"").trim();if(!e)throw new TypeError("conversationId is required");if(n==="group"){if(np(a)==="user_in_chat"){if(!i)throw new TypeError("senderId is required for user_in_chat group sessions");return`group:${e}:user:${i}`}return`group:${e}`}return`direct:${e}`}var py=/^\d{5,32}@g\.us$/,WBe=/^[a-z0-9][a-z0-9-]*$/,ZBe=/[\u0000-\u001f\u007f-\u009f\u202a-\u202e\u2066-\u2069]/;function TT(n){if(typeof n!="string")return null;let t=n.trim();return WBe.test(t)?t:null}function Rr(n){let t=new TypeError(n);throw t.code="access-grant-invalid",t}function Ni(n){if(typeof n=="number"&&Number.isFinite(n)&&(n=String(n)),typeof n=="bigint"&&(n=String(n)),typeof n!="string")return null;let t=n.trim();if(!t||ZBe.test(t))return null;let o=t.indexOf("@");if(o>0){let e=t.slice(0,o).split(":")[0],i=t.slice(o+1).toLowerCase();if(!["s.whatsapp.net","c.us","hosted"].includes(i))return null;t=e}let a=t.replace(/[^\d]/g,"");return a.length<5||a.length>32?null:a}function bc(n){let t=Ni(n);return t||Rr("\u7535\u8BDD\u53F7\u7801\u65E0\u6548\u3002"),t}function wg(n){return Ni(n)}function hy(n){return(typeof n!="string"||!py.test(n.trim()))&&Rr("\u7FA4 JID \u65E0\u6548\u3002"),n.trim()}function P3(n){(!n||typeof n!="object"||Array.isArray(n))&&Rr("\u6210\u5458\u6761\u76EE\u65E0\u6548\u3002");let t=bc(n.phone??n.id),o=n.canExecuteCommands===void 0?!0:!!n.canExecuteCommands,a=G3(n.agentPreset);return Object.freeze({phone:t,canExecuteCommands:o,...a?{agentPreset:a}:{}})}function G3(n){if(n==null||n==="")return;let t=TT(n);return t||Rr("Agent Preset \u65E0\u6548\u3002"),t}function F3(n,{emptyMessage:t,label:o}){Array.isArray(n)||Rr(`${o}\u5FC5\u987B\u662F\u6570\u7EC4\u3002`);let a=n.map(e=>bc(typeof e=="string"||typeof e=="number"||typeof e=="bigint"?e:e?.phone??e?.id));return new Set(a).size!==a.length&&Rr(`${o}\u4E0D\u80FD\u5305\u542B\u91CD\u590D\u7535\u8BDD\u3002`),a.length===0&&t&&Rr(t),Object.freeze(a)}function L3(n){(!n||typeof n!="object"||Array.isArray(n))&&Rr("\u7FA4\u6388\u6743\u6761\u76EE\u65E0\u6548\u3002");let t=F3(n.admins??[],{label:"\u7FA4\u7BA1\u7406\u5458"}),o=Object.freeze((Array.isArray(n.members)?n.members:[]).map(P3));new Set(o.map(i=>i.phone)).size!==o.length&&Rr("\u7FA4\u6210\u5458\u4E0D\u80FD\u5305\u542B\u91CD\u590D\u7535\u8BDD\u3002");let a=typeof n.title=="string"?n.title.trim().slice(0,128):"",e=G3(n.agentPreset);return Object.freeze({...a?{title:a}:{},...e?{agentPreset:e}:{},admins:t,members:o})}function Ey(n){(!n||typeof n!="object"||Array.isArray(n))&&Rr("\u5F85\u6279\u6761\u76EE\u65E0\u6548\u3002");let t=typeof n.id=="string"?n.id.trim():"";/^[A-Za-z0-9_-]{6,64}$/.test(t)||Rr("\u5F85\u6279\u7F16\u53F7\u65E0\u6548\u3002");let o=n.kind==="group"?"group":n.kind==="direct"?"direct":null;o||Rr("\u5F85\u6279\u573A\u666F\u65E0\u6548\u3002");let a=n.phone?bc(n.phone):"",e=typeof n.lid=="string"?n.lid.trim().slice(0,128):"";!a&&!e&&Rr("\u5F85\u6279\u7F3A\u5C11\u7535\u8BDD\u6216 LID\u3002");let i=o==="group"?hy(n.groupJid):void 0,A=typeof n.pushName=="string"?n.pushName.trim().slice(0,128):"",r=typeof n.requestText=="string"?n.requestText.trim().slice(0,500):"",s=typeof n.createdAt=="string"&&n.createdAt?n.createdAt:new Date().toISOString(),g=n.unresolved===!0||!a,c=Array.isArray(n.notifyRefs)?Object.freeze(n.notifyRefs.map(f=>Object.freeze({adminPhone:bc(f.adminPhone),providerMessageId:String(f.providerMessageId??"").trim().slice(0,128)})).filter(f=>f.providerMessageId)):Object.freeze([]),I=n.resolvedByPhone?bc(n.resolvedByPhone):void 0,d=typeof n.resolvedAt=="string"?n.resolvedAt:void 0,B=["pending","approved","denied","expired"].includes(n.status)?n.status:"pending";return Object.freeze({id:t,kind:o,...i?{groupJid:i}:{},phone:a||"",...e?{lid:e}:{},...A?{pushName:A}:{},...r?{requestText:r}:{},createdAt:s,unresolved:g,notifyRefs:c,status:B,...I?{resolvedByPhone:I}:{},...d?{resolvedAt:d}:{}})}function NT(n){(!n||typeof n!="object"||Array.isArray(n))&&Rr("\u8054\u7CFB\u4EBA\u6761\u76EE\u65E0\u6548\u3002");let t=n.phone?bc(n.phone):void 0,o=Object.freeze([...Array.isArray(n.lids)?n.lids:[]].map(r=>String(r??"").trim()).filter(r=>r&&r.length<=128).slice(0,8)),a=typeof n.pushName=="string"?n.pushName.trim().slice(0,128):"",e=typeof n.lastSeenAt=="string"&&n.lastSeenAt?n.lastSeenAt:new Date().toISOString(),i=Object.freeze([...Array.isArray(n.scenes)?n.scenes:[]].filter(r=>r==="direct"||r==="group").slice(0,2)),A=Object.freeze([...Array.isArray(n.groupJids)?n.groupJids:[]].map(r=>String(r??"").trim()).filter(r=>py.test(r)).slice(0,32));return!t&&o.length===0&&Rr("\u8054\u7CFB\u4EBA\u7F3A\u5C11\u7535\u8BDD\u6216 LID\u3002"),Object.freeze({...t?{phone:t}:{},lids:o,...a?{pushName:a}:{},lastSeenAt:e,scenes:i.length>0?i:Object.freeze(["direct"]),...A.length>0?{groupJids:A}:{}})}function Bs(){return Object.freeze({version:1,globalAdmins:Object.freeze([]),directMembers:Object.freeze([]),groups:Object.freeze({}),pending:Object.freeze([]),contacts:Object.freeze([])})}function Yr(n,{requireGlobalAdmin:t=!0}={}){(!n||typeof n!="object"||Array.isArray(n))&&Rr("\u8BBF\u95EE\u6388\u6743\u6587\u6863\u65E0\u6548\u3002"),(n.version===void 0?1:Number(n.version))!==1&&Rr("\u8BBF\u95EE\u6388\u6743\u7248\u672C\u4E0D\u652F\u6301\u3002");let a=F3(n.globalAdmins??[],{label:"\u5168\u5C40\u7BA1\u7406\u5458",emptyMessage:t?"\u81F3\u5C11\u4FDD\u7559\u4E00\u4F4D\u5168\u5C40\u7BA1\u7406\u5458\u3002":void 0});t&&a.length===0&&Rr("\u81F3\u5C11\u4FDD\u7559\u4E00\u4F4D\u5168\u5C40\u7BA1\u7406\u5458\u3002");let e=Object.freeze((Array.isArray(n.directMembers)?n.directMembers:[]).map(P3));new Set(e.map(s=>s.phone)).size!==e.length&&Rr("\u79C1\u804A\u6388\u6743\u7528\u6237\u4E0D\u80FD\u5305\u542B\u91CD\u590D\u7535\u8BDD\u3002");let i=Object.create(null);if(n.groups&&typeof n.groups=="object"&&!Array.isArray(n.groups))for(let[s,g]of Object.entries(n.groups))i[hy(s)]=L3(g);let A=Object.freeze((Array.isArray(n.pending)?n.pending:[]).map(Ey).slice(0,200)),r=Object.freeze((Array.isArray(n.contacts)?n.contacts:[]).map(NT).slice(0,500));return Object.freeze({version:1,globalAdmins:a,directMembers:e,groups:Object.freeze(i),pending:A,contacts:r})}function Mc(n){try{return Yr(n,{requireGlobalAdmin:!1})}catch{return null}}function U3(n,t={}){let o=Mc(n);if(!o)return null;if(t.kind==="group"){let i=typeof t.groupJid=="string"&&t.groupJid.trim()?t.groupJid.trim():typeof t.conversationId=="string"?t.conversationId.trim():"";return!i||!py.test(i)?null:TT(o.groups[i]?.agentPreset)??null}let a=Ni(t.phone??t.senderId);if(!a)return null;let e=o.directMembers.find(i=>i.phone===a);return TT(e?.agentPreset)??null}function RT(n,t){let o=n?Yr(n,{requireGlobalAdmin:!1}):Bs(),a=Ni(t);return!a||o.globalAdmins.includes(a)?o:Yr({...o,globalAdmins:[a,...o.globalAdmins]})}function H3(n,t,o){let a=RT(t,o),e=new Set(a.directMembers.map(r=>r.phone)),i=[n?.direct,n?.group];for(let r of i)for(let s of r?.allowlist?.users??[]){let g=Ni(s?.id);!g||e.has(g)||e.add(g)}let A=[...a.directMembers,...[...e].filter(r=>!a.directMembers.some(s=>s.phone===r)).map(r=>({phone:r,canExecuteCommands:!0}))];return Yr({...a,directMembers:A})}function K3(n,{scene:t,phone:o,groupJid:a,isCommand:e=!1}={}){let i=Mc(n)??Bs(),A=Ni(o);if(!A)return{allowed:!1,reason:"phone-unavailable"};if(i.globalAdmins.includes(A))return{allowed:!0,reason:"global-admin",canExecuteCommands:!0,canApprove:!0};if(t==="direct"){let g=i.directMembers.find(c=>c.phone===A);return g?e&&!g.canExecuteCommands?{allowed:!1,reason:"command-not-allowed",canExecuteCommands:!1}:{allowed:!0,reason:"direct-member",canExecuteCommands:g.canExecuteCommands,canApprove:!1}:{allowed:!1,reason:"direct-not-allowed"}}if(t!=="group"||!a||!py.test(a))return{allowed:!1,reason:"invalid-context"};let r=i.groups[a];if(!r)return{allowed:!1,reason:"group-not-allowed"};if(r.admins.includes(A))return{allowed:!0,reason:"group-admin",canExecuteCommands:!0,canApprove:!0};let s=r.members.find(g=>g.phone===A);return s?e&&!s.canExecuteCommands?{allowed:!1,reason:"command-not-allowed",canExecuteCommands:!1}:{allowed:!0,reason:"group-member",canExecuteCommands:s.canExecuteCommands,canApprove:!1}:{allowed:!1,reason:"group-not-allowed"}}function kT(n,t){let o=Mc(n)??Bs();if(t.kind==="group"&&t.groupJid){let a=o.groups[t.groupJid];if(a?.admins?.length)return[...a.admins]}return[...o.globalAdmins]}function XBe(n,t,o){let a=Ni(t);return!a||o?.status!=="pending"?!1:kT(n,o).includes(a)}function uy(n,t=Date.now()){let o=Date.parse(n?.createdAt??"");return Number.isFinite(o)?t-o>6048e5:!0}function $Be(n,t){let o=Mc(n)??Bs(),a=Ni(t.phone);return o.pending.find(e=>e.status!=="pending"||uy(e)||e.kind!==t.kind||t.kind==="group"&&e.groupJid!==t.groupJid?!1:!!(a&&e.phone===a||t.lid&&e.lid===t.lid))??null}function x3(n,t){let o=Yr(n,{requireGlobalAdmin:!1}),a=Ni(t.phone),e=typeof t.lid=="string"?t.lid.trim():"",i=t.at??new Date().toISOString(),A=typeof t.pushName=="string"?t.pushName.trim():"",r=t.scene==="group"?"group":"direct",s=r==="group"&&t.groupJid?hy(t.groupJid):null,g=[...o.contacts],c=g.findIndex(I=>a&&I.phone===a||e&&I.lids.includes(e));if(c<0)g.unshift(NT({phone:a,lids:e?[e]:[],pushName:A,lastSeenAt:i,scenes:[r],groupJids:s?[s]:[]}));else{let I=g[c],d=[...new Set([...I.lids??[],...e?[e]:[]])].slice(0,8),B=[...new Set([...I.scenes??[],r])],f=[...new Set([...I.groupJids??[],...s?[s]:[]])].slice(0,32);g[c]=NT({phone:a??I.phone,lids:d,pushName:A||I.pushName,lastSeenAt:i,scenes:B,groupJids:f})}return Yr({...o,contacts:g.slice(0,500)},{requireGlobalAdmin:!1})}function Cy(n,t,o={}){let a=Yr(n,{requireGlobalAdmin:!1}),e=hy(t),i=a.groups[e]??{admins:[],members:[]},A=typeof o.title=="string"&&o.title.trim()?o.title.trim().slice(0,128):i.title,r={...a.groups,[e]:L3({...i,...A?{title:A}:{}})};return Yr({...a,groups:r},{requireGlobalAdmin:!1})}function Y3(n,t,{idFactory:o}={}){let a=Yr(n,{requireGlobalAdmin:!1}),e=$Be(a,t);if(e)return{grant:a,pending:e,created:!1};let i=Ey({id:o?.()??`p_${Date.now().toString(36)}_${Math.random().toString(36).slice(2,8)}`,kind:t.kind,groupJid:t.groupJid,phone:t.phone??"",lid:t.lid,pushName:t.pushName,requestText:t.requestText,createdAt:new Date().toISOString(),unresolved:!Ni(t.phone),status:"pending",notifyRefs:[]}),A=[i,...a.pending.filter(r=>r.status==="pending"&&!uy(r))].slice(0,200);return{grant:Yr({...a,pending:A},{requireGlobalAdmin:!1}),pending:i,created:!0}}function j3(n,t,o){let a=Yr(n,{requireGlobalAdmin:!1}),e=a.pending.map(i=>i.id!==t?i:Ey({...i,notifyRefs:[...i.notifyRefs??[],...o]}));return Yr({...a,pending:e},{requireGlobalAdmin:!1})}function By(n,{pendingId:t,action:o,resolvedByPhone:a}){let e=Yr(n,{requireGlobalAdmin:!1}),i=bc(a),A=e.pending.findIndex(c=>c.id===t);if(A<0){let c=new Error("\u627E\u4E0D\u5230\u5F85\u6279\u7533\u8BF7\u3002");throw c.code="pending-not-found",c}let r=e.pending[A];if(r.status!=="pending"||uy(r)){let c=new Error("\u8BE5\u7533\u8BF7\u5DF2\u5931\u6548\u3002");throw c.code="pending-expired",c}if(!XBe(e,i,r)){let c=new Error("\u65E0\u6743\u5BA1\u6279\u8BE5\u7533\u8BF7\u3002");throw c.code="pending-forbidden",c}if(o!=="approve"&&o!=="deny"&&Rr("\u5BA1\u6279\u52A8\u4F5C\u65E0\u6548\u3002"),o==="approve"&&r.unresolved){let c=new Error("\u7533\u8BF7\u4EBA\u7535\u8BDD\u5C1A\u672A\u89E3\u6790\uFF0C\u8BF7\u5728\u8BBE\u7F6E\u4E2D\u8865\u5168\u540E\u518D\u6279\u51C6\u3002");throw c.code="pending-unresolved",c}let s={...e};if(o==="approve")if(r.kind==="direct")s.directMembers.some(c=>c.phone===r.phone)||(s.directMembers=[...s.directMembers,{phone:r.phone,canExecuteCommands:!0}]);else{let c=s.groups[r.groupJid]??{admins:[],members:[]};!c.members.some(I=>I.phone===r.phone)&&!c.admins.includes(r.phone)&&(s.groups={...s.groups,[r.groupJid]:{...c,members:[...c.members,{phone:r.phone,canExecuteCommands:!0}]}})}let g=[...e.pending];return g[A]=Ey({...r,status:o==="approve"?"approved":"denied",resolvedByPhone:i,resolvedAt:new Date().toISOString()}),s.pending=g,{grant:Yr(s),pending:g[A]}}function J3(n,t){let o=String(t??"").trim();return o?(Mc(n)??Bs()).pending.find(e=>e.status==="pending"&&!uy(e)&&(e.notifyRefs??[]).some(i=>i.providerMessageId===o))??null:null}var efe=new Set(["yes","y","approve","allow","add","ok","grant","whitelist","\u540C\u610F","\u53EF\u4EE5","\u662F","\u6DFB\u52A0","\u901A\u8FC7"]),Afe=new Set(["no","n","deny","reject","ignore","\u62D2\u7EDD","\u4E0D","\u5426","\u5FFD\u7565"]);function q3(n){let t=String(n??"").trim();if(!t)return null;let o=t.split(/\s+/u)[0]?.toLowerCase?.()??"";return efe.has(o)||/添加白名单|add to whitelist/iu.test(t)?"approve":Afe.has(o)?"deny":null}function z3(n){return String(n??"").match(/(?:请求编号|Request)\s*[::]\s*([A-Za-z0-9_-]{6,64})/u)?.[1]??null}var fs=Object.freeze({pendingAckDirect:"\u5DF2\u63D0\u4EA4\u79C1\u804A\u8BBF\u95EE\u7533\u8BF7\uFF0C\u8BF7\u7B49\u5F85\u5168\u5C40\u7BA1\u7406\u5458\u5BA1\u6279\u3002",pendingAckGroup:"\u5DF2\u63D0\u4EA4\u672C\u7FA4\u8BBF\u95EE\u7533\u8BF7\uFF0C\u8BF7\u7B49\u5F85\u7BA1\u7406\u5458\u5BA1\u6279\u3002",pendingUnresolved:"\u5DF2\u8BB0\u5F55\u8BBF\u95EE\u7533\u8BF7\uFF0C\u4F46\u5C1A\u672A\u89E3\u6790\u5230\u7535\u8BDD\u53F7\u7801\uFF1B\u8BF7\u7BA1\u7406\u5458\u5728\u8BBE\u7F6E\u4E2D\u8865\u5168\u540E\u518D\u6279\u51C6\u3002",notifyTitle:"[dsh-im-ops] \u8BBF\u95EE\u7533\u8BF7",approvedDirect:"\u79C1\u804A\u8BBF\u95EE\u5DF2\u6279\u51C6\uFF0C\u73B0\u5728\u53EF\u4EE5\u76F4\u63A5\u5BF9\u8BDD\u3002",approvedGroup:"\u672C\u7FA4\u8BBF\u95EE\u5DF2\u6279\u51C6\uFF0C\u8BF7\u5728\u672C\u7FA4 @ \u673A\u5668\u4EBA\u7EE7\u7EED\u3002",denied:"\u8BBF\u95EE\u7533\u8BF7\u672A\u901A\u8FC7\u3002",adminApproved:"\u5DF2\u6279\u51C6\u8BE5\u8BBF\u95EE\u7533\u8BF7\u3002",adminDenied:"\u5DF2\u62D2\u7EDD\u8BE5\u8BBF\u95EE\u7533\u8BF7\u3002"});function V3(n){let t=n.kind==="group"?`\u7FA4\u804A ${n.groupJid??""}`:"\u79C1\u804A",o=n.pushName?`${n.pushName} (${n.phone||n.lid||"\u672A\u77E5"})`:n.phone||n.lid||"\u672A\u77E5",a=n.requestText?` \u539F\u6587\uFF1A${n.requestText.slice(0,200)}`:"";return[fs.notifyTitle,`\u573A\u666F\uFF1A${t}`,`\u7533\u8BF7\u4EBA\uFF1A${o}`,`\u8BF7\u6C42\u7F16\u53F7\uFF1A${n.id}`,"\u8BF7\u5F15\u7528\u672C\u6761\u6D88\u606F\u56DE\u590D\u300C\u540C\u610F\u300D\u6216\u300C\u62D2\u7EDD\u300D\u3002",a].filter(Boolean).join(` -`)}var niA=Object.freeze({version:1,workspaces:Object.freeze({})});function tl(n){let t=new Error(n);return t.code=Mi,t}async function vT(n){return fu(await Afe(n))}async function nfe(n,t){if(n===t)return!0;try{return await vT(n)===await vT(t)}catch{return!1}}function Nt(n){if(typeof n!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(n))throw new TypeError("Invalid bot id");return n}function Ca(n,t,o){let a=new Error(t,o);return a.code=n,a}function By(n){if(typeof n!="string"||!/^[A-Za-z0-9._:@-]{1,128}$/.test(n))throw Ca("invalid-target","Invalid target id");return n}function sfe(n){if(!n||typeof n!="object"||Array.isArray(n))throw Ca("invalid-target","Invalid target route");try{let t=JSON.stringify(n);if(t===void 0)throw new TypeError("route is not JSON");let o=JSON.parse(t);if(!o||typeof o!="object"||Array.isArray(o))throw new TypeError("route is not an object");return o}catch(t){throw Ca("invalid-target","Invalid target route",{cause:t})}}function rl(n,{targetId:t}={}){if(!n||typeof n!="object"||Array.isArray(n))throw Ca("invalid-target","Invalid delivery target");let o=t===void 0?new Set(["targetId","name","kind","route"]):new Set(["name","kind","route"]);if(Object.keys(n).some(i=>!o.has(i)))throw Ca("invalid-target","Invalid delivery target");let a=By(t??n.targetId);if(typeof n.kind!="string"||!/^[a-z][a-z0-9-]{0,31}$/.test(n.kind))throw Ca("invalid-target","Invalid target kind");let e;if(n.name!==void 0){if(typeof n.name!="string"||!n.name.trim()||n.name.trim().length>80)throw Ca("invalid-target","Invalid target name");e=n.name.trim()}return{targetId:a,...e===void 0?{}:{name:e},kind:n.kind,route:sfe(n.route)}}function gfe(n){let t=Object.create(null);if(n===void 0)return t;if(!n||typeof n!="object"||Array.isArray(n))return null;try{for(let[o,a]of Object.entries(n)){if(Nt(o),!a||typeof a!="object"||Array.isArray(a))return null;let e=Object.create(null);for(let[i,A]of Object.entries(a)){let r=rl(A,{targetId:i}),{targetId:s,...g}=r;e[i]=g}t[o]=e}}catch{return null}return t}function cfe(n,t){let o=Object.create(null);if(n===void 0)return o;if(!n||typeof n!="object"||Array.isArray(n)){for(let a of Object.keys(t))o[a]=null;return o}for(let[a,e]of Object.entries(n))try{Nt(a),o[a]=tp(e)}catch{}return o}function Ife(n){if(!n||![1,2].includes(n.version)||!n.workspaces||typeof n.workspaces!="object"||Array.isArray(n.workspaces))return null;let t={};for(let[g,c]of Object.entries(n.workspaces)){if(!/^[A-Za-z0-9_-]{1,128}$/.test(g)||typeof c!="string"||!X3(c))return null;t[g]=fu(c)}let o={};if(n.agentPresets!==void 0){if(!n.agentPresets||typeof n.agentPresets!="object"||Array.isArray(n.agentPresets))return null;for(let[g,c]of Object.entries(n.agentPresets)){if(!/^[A-Za-z0-9_-]{1,128}$/.test(g))return null;try{let I=Wd(c);if(!I)return null;o[g]=I}catch{return null}}}let a={};if(n.groupSessionScopes!==void 0){if(!n.groupSessionScopes||typeof n.groupSessionScopes!="object"||Array.isArray(n.groupSessionScopes))return null;for(let[g,c]of Object.entries(n.groupSessionScopes)){if(!/^[A-Za-z0-9_-]{1,128}$/.test(g))return null;try{a[g]=sp(c)}catch{return null}}}let e=Object.create(null);if(n.contextEnhancement&&typeof n.contextEnhancement=="object"&&!Array.isArray(n.contextEnhancement))for(let[g,c]of Object.entries(n.contextEnhancement))/^[A-Za-z0-9_-]{1,128}$/.test(g)&&(e[g]=Xd(c));if(n.version===1&&n.deliveryTargets!==void 0)return null;let i=gfe(n.deliveryTargets);if(!i)return null;let A=cfe(n.accessPolicies,t),r=Object.create(null);if(n.accessGrants&&typeof n.accessGrants=="object"&&!Array.isArray(n.accessGrants))for(let[g,c]of Object.entries(n.accessGrants)){if(!/^[A-Za-z0-9_-]{1,128}$/.test(g))continue;let I=bc(c);I&&(r[g]=I)}return{version:n.accessPolicies===void 0&&n.accessGrants===void 0?n.version:2,workspaces:t,agentPresets:o,groupSessionScopes:a,contextEnhancement:e,deliveryTargets:i,accessPolicies:A,accessGrants:r}}function lfe({version:n,workspaces:t,agentPresets:o,groupSessionScopes:a,contextEnhancement:e,deliveryTargets:i,accessPolicies:A,accessGrants:r}){let s={version:n,workspaces:t};return Object.keys(o).length>0&&(s.agentPresets=o),Object.keys(a).length>0&&(s.groupSessionScopes=a),Object.keys(e).length>0&&(s.contextEnhancement=e),n>=2&&Object.keys(i).length>0&&(s.deliveryTargets=i),n>=2&&Object.keys(A).length>0&&(s.accessPolicies=A),n>=2&&Object.keys(r).length>0&&(s.accessGrants=r),s}async function dfe(n,t){await $Be(ofe(n),{recursive:!0,mode:448});let o=`${n}.tmp`;await afe(o,`${JSON.stringify(t,null,2)} -`,{encoding:"utf8",mode:384}),await tfe(o,n)}async function W3(n){if(typeof n!="string"||!n.trim()||!X3(n.trim())){let a=new Error("\u5DE5\u4F5C\u533A\u5FC5\u987B\u662F\u7EDD\u5BF9\u8DEF\u5F84\u3002");throw a.code="workspace-not-absolute",a}let t=fu(n.trim()),o;try{o=await rfe(t)}catch(a){let e=new Error("\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002",{cause:a});throw e.code="workspace-not-found",e}if(!o.isDirectory()){let a=new Error("\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5FC5\u987B\u6307\u5411\u4E00\u4E2A\u76EE\u5F55\u3002");throw a.code="workspace-not-directory",a}return t}var gi=class{#e;#A;#t=1;#r={};#I={};#o={};#g={};#i=Object.create(null);#a=Object.create(null);#s=Object.create(null);#l=new Map;#c=1;#d=new Map;#n=1;#p=new Map;#h=new WeakMap;#u=new Set;#C=Promise.resolve();#B=new Map;constructor(t,{defaultWorkspace:o=process.cwd()}={}){if(typeof t!="string"||!t)throw new TypeError("workspace store path is required");this.#e=t,this.#A=fu(o)}async load(){try{let t=Ife(JSON.parse(await efe(this.#e,"utf8")));if(!t)throw new Error("dsh-im workspace config is invalid");this.#t=t.version,this.#r=t.workspaces,this.#I=t.agentPresets,this.#o=t.groupSessionScopes,this.#g=t.contextEnhancement,this.#i=t.deliveryTargets,this.#a=t.accessPolicies,this.#s=t.accessGrants}catch(t){if(t?.code!=="ENOENT")throw t;this.#t=1,this.#r={},this.#I={},this.#o={},this.#g={},this.#i=Object.create(null),this.#a=Object.create(null),this.#s=Object.create(null)}this.#l.clear(),this.#c=1,this.#d.clear(),this.#n=1,this.#p.clear(),this.#u.clear();for(let t of Object.keys(this.#r))this.#l.set(t,this.#f()),this.#d.set(t,this.#y());return this}has(t){let o=Nt(t);return Object.hasOwn(this.#r,o)&&!this.#p.has(o)}incarnationFor(t){return this.#d.get(Nt(t))??null}workspaceFor(t){return this.#r[Nt(t)]??this.#A}agentPresetFor(t){return this.#I[Nt(t)]??null}groupSessionScopeFor(t){let o=Nt(t);return this.has(o)&&Object.hasOwn(this.#o,o)?np(this.#o[o]):op}contextEnhancementFor(t){let o=Nt(t);return this.has(o)&&Object.hasOwn(this.#g,o)?this.#g[o]:cT}accessPolicyFor(t){let o=Nt(t);return this.has(o)&&Object.hasOwn(this.#a,o)?this.#a[o]:null}accessGrantFor(t){let o=Nt(t);return this.has(o)&&Object.hasOwn(this.#s,o)?this.#s[o]:null}listDeliveryTargets(t){let o=Nt(t);if(!this.has(o))throw Ca("unknown-bot","Unknown bot");return Object.entries(this.#i[o]??{}).map(([a,e])=>rl(e,{targetId:a})).sort((a,e)=>a.targetId.localeCompare(e.targetId))}deliveryTargetFor(t,o){let a=Nt(t),e=By(o);if(!this.has(a))throw Ca("unknown-bot","Unknown bot");let i=this.#i[a]?.[e];return i?rl(i,{targetId:e}):null}async createDeliveryTarget(t,o){let a=Nt(t),e=rl(o);return this.#Q(a,async()=>{if(!this.has(a))throw Ca("unknown-bot","Unknown bot");if(Object.hasOwn(this.#i[a]??{},e.targetId))throw Ca("target-conflict","Target already exists");let{targetId:i,...A}=e,r={...this.#i,[a]:{...this.#i[a]??{},[i]:A}};return await this.#D(this.#g,r,2),this.#i=r,this.#t=2,rl(A,{targetId:i})})}async updateDeliveryTarget(t,o,a){let e=Nt(t),i=By(o),A=rl(a,{targetId:i});return this.#Q(e,async()=>{if(!this.has(e))throw Ca("unknown-bot","Unknown bot");if(!Object.hasOwn(this.#i[e]??{},i))throw Ca("unknown-target","Unknown target");let{targetId:r,...s}=A,g={...this.#i,[e]:{...this.#i[e],[i]:s}};return await this.#D(this.#g,g,2),this.#i=g,this.#t=2,rl(s,{targetId:i})})}async deleteDeliveryTarget(t,o){let a=Nt(t),e=By(o);return this.#Q(a,async()=>{if(!this.has(a))throw Ca("unknown-bot","Unknown bot");if(!Object.hasOwn(this.#i[a]??{},e))throw Ca("unknown-target","Unknown target");let i={...this.#i[a]};delete i[e];let A={...this.#i};return Object.keys(i).length>0?A[a]=i:delete A[a],await this.#D(this.#g,A,2),this.#i=A,this.#t=2,!0})}generationFor(t){return this.#l.get(Nt(t))??null}async whenIdle(){await this.#C}async whenBotIdle(t){let o=Nt(t);for(;;){let a=this.#B.get(o);if(!a||(await a,this.#B.get(o)===a))return}}async ensure(t,{workspace:o=this.#A,defaultAgentPreset:a,initialAccessPolicy:e}={}){let i=Nt(t),A=fu(o);return this.#Q(i,async()=>{let r=!this.#r[i],s=e!==void 0&&!Object.hasOwn(this.#a,i);if(r||s){let g=s?Dc(e):void 0,c=r?Wd(a):null,I=Object.hasOwn(this.#I,i),d=this.#I[i],B=s?{...this.#a,[i]:g}:this.#a;r&&(this.#r[i]=A,c&&(this.#I[i]=c),this.#l.set(i,this.#f()),this.#d.set(i,this.#y()));let f=s?2:this.#t;try{await this.#D(this.#g,this.#i,f,B)}catch(Q){throw r&&(delete this.#r[i],I?this.#I[i]=d:delete this.#I[i],this.#l.delete(i),this.#d.delete(i)),Q}this.#a=B,this.#t=f}else this.#l.has(i)||this.#l.set(i,this.#f());return this.#r[i]})}async setWorkspace(t,o,{clearSessions:a,incarnation:e}={}){let i=Nt(t);if(!this.has(i)||e!==void 0&&e!==this.incarnationFor(i)){let r=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw r.code="workspace-bot-not-found",r}let A=await W3(o);return this.#Q(i,async()=>{if(!this.has(i)||e!==void 0&&e!==this.incarnationFor(i)){let s=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw s.code="workspace-bot-not-found",s}if(A===this.workspaceFor(i))return A;let r=this.#r[i];this.#l.set(i,this.#f()),await a?.(),this.#r[i]=A;try{await this.#D()}catch(s){throw this.#r[i]=r,s}return A})}async setAgentPreset(t,o,{incarnation:a}={}){let e=Nt(t);if(!this.has(e)||a!==void 0&&a!==this.incarnationFor(e)){let A=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw A.code="workspace-bot-not-found",A}let i=Wd(o);return this.#Q(e,async()=>{if(!this.has(e)||a!==void 0&&a!==this.incarnationFor(e)){let r=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw r.code="workspace-bot-not-found",r}let A=this.#I[e]??null;if(A===i)return i;i?this.#I[e]=i:delete this.#I[e];try{await this.#D()}catch(r){throw A?this.#I[e]=A:delete this.#I[e],r}return i})}async setGroupSessionScope(t,o,{incarnation:a}={}){let e=Nt(t);if(!this.has(e)||a!==void 0&&a!==this.incarnationFor(e)){let A=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw A.code="workspace-bot-not-found",A}let i=sp(o);return this.#Q(e,async()=>{if(!this.has(e)||a!==void 0&&a!==this.incarnationFor(e)){let r=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw r.code="workspace-bot-not-found",r}let A=Object.hasOwn(this.#o,e)?this.#o[e]:void 0;if(A===i)return i;this.#o[e]=i;try{await this.#D()}catch(r){throw A===void 0?delete this.#o[e]:this.#o[e]=A,r}return i})}async setContextEnhancement(t,o,{incarnation:a}={}){let e=Nt(t),i=a===void 0?this.incarnationFor(e):a,A=$I(o);return this.#Q(e,async()=>{if(!this.has(e)||i!==this.incarnationFor(e)){let s=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw s.code="workspace-bot-not-found",s}let r={...this.#g,[e]:A};return await this.#D(r),this.#g=r,A})}async setAccessPolicy(t,o,{incarnation:a}={}){let e=Nt(t),i=a===void 0?this.incarnationFor(e):a,A=Dc(o);return this.#Q(e,async()=>{if(!this.has(e)||i!==this.incarnationFor(e)){let s=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw s.code="workspace-bot-not-found",s}let r={...this.#a,[e]:A};return await this.#D(this.#g,this.#i,2,r),this.#a=r,this.#t=2,A})}async setAccessGrant(t,o,{incarnation:a}={}){let e=Nt(t);if(!this.has(e)||a!==void 0&&a!==this.incarnationFor(e)){let A=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw A.code="workspace-bot-not-found",A}let i=Yr(o);return this.#Q(e,async()=>{if(!this.has(e)||a!==void 0&&a!==this.incarnationFor(e)){let r=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw r.code="workspace-bot-not-found",r}let A=this.#s[e]??null;this.#s[e]=i;try{await this.#D()}catch(r){throw A?this.#s[e]=A:delete this.#s[e],r}return i})}async bindWorkspaceSession(t,o,{conversationKey:a,sessionId:e,clearSessions:i,setSession:A,incarnation:r,expectedGeneration:s}={}){let g=Nt(t);if(typeof a!="string"||!a||typeof e!="string"||!e)throw new TypeError("conversationKey and sessionId are required");if(typeof i!="function"||typeof A!="function")throw new TypeError("session state callbacks are required");if(!this.has(g)||r!==void 0&&r!==this.incarnationFor(g)){let I=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw I.code="workspace-bot-not-found",I}let c=await vT(await W3(o));return this.#Q(g,async()=>{if(!this.has(g)||r!==void 0&&r!==this.incarnationFor(g)){let I=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw I.code="workspace-bot-not-found",I}if(s!==void 0&&s!==this.generationFor(g))throw tl("The bot workspace changed before the session binding could be committed.");if(!await nfe(c,this.workspaceFor(g))){let I=this.#r[g];this.#l.set(g,this.#f()),await i(),this.#r[g]=c;try{await this.#D()}catch(d){throw this.#r[g]=I,d}}return await A(a,e),{workspace:c,sessionId:e,generation:this.#l.get(g)}})}async invalidateSessions(t,{clearSessions:o}={}){let a=Nt(t);return this.#Q(a,async()=>{this.#l.set(a,this.#f()),await o?.()})}async beginRemoval(t,{clearSessions:o}={}){let a=Nt(t);return this.#Q(a,async()=>{let e=this.#p.get(a);if(e)return e;let i=Object.freeze({});this.#p.set(a,i),this.#h.set(i,{botId:a,incarnation:this.incarnationFor(a)}),this.#l.set(a,this.#f());try{await o?.()}catch(A){throw this.#p.get(a)===i&&this.#p.delete(a),A}return i})}async abortRemoval(t){let{botId:o}=this.#w(t);return this.#Q(o,async()=>this.#p.get(o)!==t?!1:(this.#p.delete(o),Object.hasOwn(this.#r,o)&&(this.#l.set(o,this.#f()),this.#d.has(o)||this.#d.set(o,this.#y())),!0))}async finishRemoval(t){let{botId:o,incarnation:a}=this.#w(t);return this.#Q(o,async()=>this.#p.get(o)!==t?{removed:!1,persisted:!0,error:null,stale:!0}:this.incarnationFor(o)!==a?(this.#p.delete(o),{removed:!1,persisted:!0,error:null,stale:!0}):(this.#p.delete(o),this.#m(o)))}async retireAfterConfigCommit(t){let o=Nt(t);return this.#Q(o,async()=>(this.#p.delete(o),this.#m(o)))}flushPendingRemoval(t){if(this.#u.has(t))return this.#Q(t,async()=>{this.#u.has(t)&&await this.#E()})}async remove(t){let o=await this.retireAfterConfigCommit(t);if(o.error)throw o.error;return o.removed}async reconcile(t){let o=new Set([...t].map(Nt)),a=new Set([...Object.keys(this.#r),...Object.keys(this.#I),...Object.keys(this.#o),...Object.keys(this.#g),...Object.keys(this.#i),...Object.keys(this.#a),...Object.keys(this.#s),...this.#u]);for(let e of a)o.has(e)||await this.remove(e)}decorateStatus(t){return!t||typeof t!="object"||!Array.isArray(t.bots)?t:{...t,bots:t.bots.map(o=>o?.botId?{...o,workspace:this.workspaceFor(o.botId),agentPreset:this.agentPresetFor(o.botId),groupSessionScope:this.groupSessionScopeFor(o.botId),contextEnhancement:this.contextEnhancementFor(o.botId),accessPolicy:this.accessPolicyFor(o.botId),accessGrant:this.accessGrantFor(o.botId)}:o)}}#f(){let t=this.#c;return this.#c+=1,t}#y(){let t=this.#n;return this.#n+=1,t}#w(t){if(!t||typeof t!="object")throw new TypeError("Invalid workspace removal transaction");let o=this.#h.get(t);if(!o)throw new TypeError("Invalid workspace removal transaction");return o}async#m(t){let o=Object.hasOwn(this.#r,t),a=Object.hasOwn(this.#I,t),e=Object.hasOwn(this.#o,t),i=Object.hasOwn(this.#g,t),A=Object.hasOwn(this.#i,t),r=Object.hasOwn(this.#a,t),s=Object.hasOwn(this.#s,t),g=o||a||e||i||A||r||s||this.#u.has(t);if(delete this.#r[t],delete this.#I[t],delete this.#o[t],delete this.#g[t],delete this.#i[t],delete this.#a[t],delete this.#s[t],this.#l.delete(t),this.#d.delete(t),!g)return{removed:!1,persisted:!0,error:null,stale:!1};try{return await this.#E(),{removed:o,persisted:!0,error:null,stale:!1}}catch(c){return this.#u.add(t),{removed:o,persisted:!1,error:c,stale:!1}}}async#Q(t,o){let a=this.#C.then(o,o),e=a.then(()=>{},()=>{});return this.#C=e,this.#B.set(t,e),e.finally(()=>{this.#B.get(t)===e&&this.#B.delete(t)}),a}async#D(t=this.#g,o=this.#i,a=this.#t,e=this.#a){await dfe(this.#e,lfe({version:a,workspaces:this.#r,agentPresets:this.#I,groupSessionScopes:this.#o,contextEnhancement:t,deliveryTargets:o,accessPolicies:e,accessGrants:this.#s})),this.#u.clear()}async#E(){if(Object.keys(this.#r).length>0||Object.keys(this.#I).length>0||Object.keys(this.#o).length>0||Object.keys(this.#g).length>0||Object.keys(this.#i).length>0||Object.keys(this.#a).length>0||Object.keys(this.#s).length>0){await this.#D();return}try{await ife(this.#e),this.#u.clear()}catch(t){if(t?.code!=="ENOENT")throw t;this.#u.clear()}}};function Mc(n){if(!n)return null;let t=typeof n=="function"?n():n;return t&&typeof t.then=="function"?t.then(ds):ds(t)}function $3(){let n=new Error("Agent Preset \u4E0D\u5B58\u5728\u6216\u4E0D\u53EF\u7528\u3002");return n.code="agent-preset-unavailable",n}function gp(n){if(n())return;let t=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw t.code="workspace-bot-not-found",t}function Z3(n,t,o){let a=e=>{let i=n.decorateStatus(e);if(!o||!i||typeof i!="object")return i;let A=s=>s?{...i,agentPresetCatalog:s}:i,r=Mc(o);return r&&typeof r.then=="function"?r.then(A):A(r)};return t&&typeof t.then=="function"?t.then(a):a(t)}function pfe(n){return Promise.resolve(n.status())}function Ji(n,{workspaces:t,method:o="remove",botIdFromRemoved:a=A=>A?.botId,saveMethod:e="save",botIdFromSave:i=A=>A?.botId}){if(!n||!t||typeof n[o]!="function")throw new TypeError("configStore removal observer dependencies are required");return new Proxy(n,{get(A,r){let s=Reflect.get(A,r,A);return r===o?async(...g)=>{let c=await s.apply(A,g),I=c?a(c,g):null;return I&&await t.retireAfterConfigCommit(I),c}:r===e&&typeof s=="function"?(...g)=>{let c=t.flushPendingRemoval(i(g[0],g));return c?c.then(()=>s.apply(A,g)):s.apply(A,g)}:typeof s=="function"?s.bind(A):s}})}function qi(n,{botId:t,workspaces:o,state:a,agentPresetCatalog:e}={}){if(!n||!o||!a)throw new TypeError("harness, workspaces, and state are required");let i=o.incarnationFor(t),A=()=>o.has(t)&&o.incarnationFor(t)===i,r=async(I=e)=>{let d;try{d=await Mc(I)??ds(null)}catch(B){throw gp(A),B}return gp(A),{agentPreset:o.agentPresetFor(t),agentPresetCatalog:d}},s=new Map,g=new Proxy(n,{get(I,d){if(d==="agentPresetSettings")return async(f={})=>{f?.signal?.throwIfAborted(),gp(A);let Q=await r();return f?.signal?.throwIfAborted(),Q};if(d==="updateAgentPreset")return async(f,Q={})=>{Q?.signal?.throwIfAborted(),gp(A);let y=f==="--default"?null:Wd(f),m=null;if(y&&({agentPresetCatalog:m}=await r(),Q?.signal?.throwIfAborted(),!m.items.some(_=>_.id===y)))throw $3();if(await o.setAgentPreset(t,y,{incarnation:i}),gp(A),m)return{agentPreset:o.agentPresetFor(t),agentPresetCatalog:m};try{return await r()}catch(_){if(_?.code==="workspace-bot-not-found")throw _;return gp(A),{agentPreset:o.agentPresetFor(t),agentPresetCatalog:ds(null)}}};if(d==="currentWorkspace")return()=>{if(!A()){let f=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw f.code="workspace-bot-not-found",f}return o.workspaceFor(t)};if(d==="assertWorkspaceScope")return()=>{if(!A()){let f=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw f.code="workspace-bot-not-found",f}};if((d==="listWorkspaces"||d==="listWorkspaceSessions"||d==="listModels")&&typeof I[d]=="function")return async(...f)=>{if(!A()){let y=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw y.code="workspace-bot-not-found",y}let Q=await I[d](...f);if(!A()){let y=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw y.code="workspace-bot-not-found",y}return Q};if(d==="switchWorkspace")return f=>{if(!A()){let Q=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");return Q.code="workspace-bot-not-found",Promise.reject(Q)}return o.setWorkspace(t,f,{clearSessions:()=>a.clearSessions(),incarnation:i})};if(d==="bindWorkspaceSession")return async(f,Q)=>{if(typeof f!="string"||!f||typeof Q!="string"||!Q)throw new TypeError("conversationKey and sessionId are required");if(!A()){let T=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw T.code="workspace-bot-not-found",T}if(typeof I.adoptWorkspaceSession!="function")throw new TypeError("Harness does not support adopting workspace sessions");let y=o.generationFor(t),m=await I.adoptWorkspaceSession(Q);if(!A()){let T=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw T.code="workspace-bot-not-found",T}if(y!==o.generationFor(t))throw tl("The bot workspace changed while the session was being adopted.");if(!m||typeof m!="object"||m.sessionId!==Q||typeof m.workspace!="string")throw new TypeError("Harness returned an invalid adopted workspace session");let _=await o.bindWorkspaceSession(t,m.workspace,{conversationKey:f,sessionId:Q,clearSessions:()=>a.clearSessions(),setSession:(T,R)=>a.setSession(T,R),incarnation:i,expectedGeneration:y});if(!A()){let T=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw T.code="workspace-bot-not-found",T}if(_.generation!==o.generationFor(t))throw tl("The bot workspace changed before the session binding completed.");return s.set(Q,_.generation),{...m,workspace:_.workspace,sessionId:_.sessionId}};if(d==="createSession")return async(f={})=>{if(await o.whenBotIdle(t),!A()){let R=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw R.code="workspace-bot-not-found",R}let Q=o.generationFor(t),{agentPreset:y,...m}=f??{},_=y!==void 0?y:o.agentPresetFor(t),T=await I.createSession({...m,workspace:o.workspaceFor(t),..._==null?{}:{agentPreset:_}});return s.set(T,Q),T};if(d==="workspaceSession")return f=>{if(typeof f!="string"||!f)throw new TypeError("sessionId is required");let Q=s.get(f)??o.generationFor(t);s.delete(f);let y=()=>A()&&Q===o.generationFor(t),m=async(T,R,L)=>{if(!y())throw tl(`The bot workspace changed before this ${L} started.`);let U=await I[T](f,...R);if(!y())throw tl(`The bot workspace changed while this ${L} was running.`);return U},_=async(T,R,L)=>{if(!y())throw tl(`The bot workspace changed before this ${L} started.`);return I[T](f,...R)};return Object.freeze({sessionId:f,async sessionExists(...T){if(!y())return!1;let R=await I.sessionExists(f,...T);return y()&&R},models(...T){return m("getSessionModels",T,"model listing")},readHistory(...T){return m("readSessionHistory",T,"history read")},...typeof I.renameSession=="function"?{renameTitle(...T){return _("renameSession",T,"title rename")}}:{},selectModel(...T){return m("selectSessionModel",T,"model selection")},isRunning(...T){return m("isSessionRunning",T,"run-state check")},hasActiveTurn(...T){return m("hasActiveTurn",T,"turn ownership check")},stopActiveTurn(...T){return _("stopActiveTurn",T,"turn stop")},steerActiveTurn(...T){return _("steerActiveTurn",T,"turn steering")},ask(...T){if(!y())throw tl("The bot workspace changed before this prompt started.");return I.ask(f,...T)}})};if(d==="sessionExists")return(f,...Q)=>{if(!A())return!1;let y=s.get(f);return y!==void 0&&y!==o.generationFor(t)?(s.delete(f),!1):I.sessionExists(f,...Q)};if(d==="ask")return(f,...Q)=>{let y=s.get(f);if(s.delete(f),!A()||y!==void 0&&y!==o.generationFor(t)){let m=new Error("The bot workspace changed before this prompt started.");throw m.code=Mi,m}return I.ask(f,...Q)};if(d==="executeCommand"&&typeof I.executeCommand=="function")return(f,...Q)=>{let y=s.get(f);if(s.delete(f),!A()||y!==void 0&&y!==o.generationFor(t)){let m=new Error("The bot workspace changed before this command started.");throw m.code=Mi,m}return I.executeCommand(f,...Q)};let B=Reflect.get(I,d,I);return typeof B=="function"?B.bind(I):B}}),c=new Proxy(a,{get(I,d){if(d===__)return I;if(d==="sessionFor")return(f,...Q)=>{if(!A())return null;let y=I.sessionFor(f,...Q);return y&&!s.has(y)&&s.set(y,o.generationFor(t)),y};if(d==="setSession")return(f,Q,...y)=>{let m=s.get(Q);return!A()||m!==void 0&&m!==o.generationFor(t)?(s.delete(Q),!1):I.setSession(f,Q,...y)};let B=Reflect.get(I,d,I);return typeof B=="function"?B.bind(I):B}});return Object.freeze({harness:g,state:c})}function zi(n,{workspaces:t,stateFor:o,agentPresetCatalog:a}={}){if(!n||!t||typeof o!="function")throw new TypeError("controller, workspaces, and stateFor are required");let e=new Map,i=(Q,y)=>{let _=(e.get(Q)??Promise.resolve()).catch(()=>{}).then(y);return e.set(Q,_),_.finally(()=>{e.get(Q)===_&&e.delete(Q)})},A=Q=>Z3(t,Q,a),r=(Q,y)=>{let m=t.incarnationFor(Q);return i(Q,async()=>{if(!(await n.status())?.bots?.some(R=>R?.botId===Q)){let R=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw R.code="workspace-bot-not-found",R}let T=await o(Q);return await t.setWorkspace(Q,y,{clearSessions:()=>T.clearSessions(),incarnation:m}),A(await n.status())})},s=(Q,y)=>{let m=t.incarnationFor(Q),_=Wd(y);return i(Q,async()=>{if(!(await n.status())?.bots?.some(L=>L?.botId===Q)){let L=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw L.code="workspace-bot-not-found",L}let R=_&&a?await Mc(a):null;if(_&&a&&!R?.items.some(L=>L.id===_))throw $3();return await t.setAgentPreset(Q,_,{incarnation:m}),Z3(t,await n.status(),R??a)})},g=(Q,y,m)=>{let _=t.incarnationFor(Q),T=$I(y);return i(Q,async()=>{let R=await n.status();if(!R?.bots?.some(J=>J?.botId===Q)){let J=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw J.code="workspace-bot-not-found",J}let L=await Mc(a),U=t.decorateStatus(R),F={...U,bots:U.bots.map(J=>J?.botId===Q?{...J,contextEnhancement:T}:J),...L?{agentPresetCatalog:L}:{}},z=m?await m(F):F;return await t.setContextEnhancement(Q,T,{incarnation:_}),z})},c=(Q,y,m)=>{let _=t.incarnationFor(Q),T=Dc(y);return i(Q,async()=>{let R=await n.status();if(!R?.bots?.some(J=>J?.botId===Q)){let J=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw J.code="workspace-bot-not-found",J}let L=await Mc(a),U=t.decorateStatus(R),F={...U,bots:U.bots.map(J=>J?.botId===Q?{...J,accessPolicy:T}:J),...L?{agentPresetCatalog:L}:{}},z=m?await m(F):F;return await t.setAccessPolicy(Q,T,{incarnation:_}),z})},I=(Q,y,m)=>{let _=t.incarnationFor(Q),T=sp(y);return i(Q,async()=>{let R=await n.status();if(!R?.bots?.some(J=>J?.botId===Q)){let J=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw J.code="workspace-bot-not-found",J}let L=await Mc(a),U=t.decorateStatus(R),F={...U,bots:U.bots.map(J=>J?.botId===Q?{...J,groupSessionScope:T}:J),...L?{agentPresetCatalog:L}:{}},z=m?await m(F):F;return await t.setGroupSessionScope(Q,T,{incarnation:_}),z})},d=(Q,y,m)=>{let _=t.incarnationFor(Q),T=Yr(y);return i(Q,async()=>{let R=await n.status();if(!R?.bots?.some(J=>J?.botId===Q)){let J=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw J.code="workspace-bot-not-found",J}let L=await Mc(a),U=t.decorateStatus(R),F={...U,bots:U.bots.map(J=>J?.botId===Q?{...J,accessGrant:T}:J),...L?{agentPresetCatalog:L}:{}},z=m?await m(F):F;return await t.setAccessGrant(Q,T,{incarnation:_}),z})},B=(Q,y,m)=>{let _=t.incarnationFor(Q);return i(Q,async()=>{let T=t.accessGrantFor(Q)??Bs(),{grant:R,pending:L}=Cy(T,y),U=await n.status();if(!U?.bots?.some(G=>G?.botId===Q)){let G=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw G.code="workspace-bot-not-found",G}let F=await Mc(a),z=t.decorateStatus(U),J={...z,bots:z.bots.map(G=>G?.botId===Q?{...G,accessGrant:R}:G),...F?{agentPresetCatalog:F}:{},resolvedPending:L},K=m?await m(J):J;return await t.setAccessGrant(Q,R,{incarnation:_}),K})},f=(Q,y)=>i(Q,async()=>{let m=await t.beginRemoval(Q,{clearSessions:async()=>{try{let _=await o(Q);if(!_||typeof _.clearSessions!="function")throw new TypeError("bot state does not support session cleanup");await _.clearSessions()}catch(_){console.warn(`[dsh-im] ignored session cleanup failure while deleting bot ${Q}:`,_?.message??_)}}});try{let _=await y();return await t.finishRemoval(m),A(_)}catch(_){let T=await pfe(n).catch(()=>null);throw Array.isArray(T?.bots)&&!T.bots.some(L=>L?.botId===Q)?await t.finishRemoval(m):await t.abortRemoval(m),_}});return new Proxy(n,{get(Q,y){if(y==="updateWorkspace")return r;if(y==="updateAgentPreset")return s;if(y==="updateContextEnhancement")return g;if(y==="updateAccessPolicy")return c;if(y==="updateGroupSessionScope")return I;if(y==="updateAccessGrant")return d;if(y==="resolveAccessPending")return B;let m=Reflect.get(Q,y,Q);return typeof m!="function"?m:y==="deleteBot"?(_,...T)=>f(_,()=>m.call(Q,_,...T)):y==="disconnect"?async(..._)=>{let R=(await Q.status())?.bots?.[0]?.botId;return R?f(R,()=>m.apply(Q,_)):A(m.apply(Q,_))}:(..._)=>A(m.apply(Q,_))}})}var ej=new Set(["weixin","feishu","dingtalk","wecom","qq","slack","telegram","discord","whatsapp"]);function hfe(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function Efe(n){return typeof n=="string"&&n.length>0&&n.length<=512&&n.trim()===n&&!/[\s:\u0000-\u001f\u007f]/u.test(n)}function PT(n,t){let o=`${t}:`;if(!n.startsWith(o))return null;let a=n.slice(o.length);return Efe(a)?a:null}function Qu(n,t){for(let[o,a,e]of t){let i=PT(n,o);if(i)return{kind:a,route:{[e]:i}}}return null}function ufe(n){let t=PT(n,"p2p");return t?.startsWith("ou_")?{kind:"user",route:{openId:t}}:Qu(n,[["group","group","chatId"]])}function Cfe(n){let t=PT(n,"direct");if(t&&/^[A-Za-z0-9_-]{1,128}$/.test(t))return{kind:"conversation",route:{channelId:t}};let o=/^group:([^:]+):(\d{1,20}(?:\.\d{1,20})?)$/.exec(n);return!o||!/^[A-Za-z0-9_-]{1,128}$/.test(o[1])?null:{kind:"thread",route:{channelId:o[1],threadTs:o[2]}}}function Bfe(n){let t=/^(direct|group):(-?\d+)(?::([1-9]\d*))?$/.exec(n);if(!t)return null;let o=Number(t[2]);if(!Number.isSafeInteger(o)||t[1]==="direct"&&t[3]!==void 0)return null;if(t[3]===void 0)return{kind:"chat",route:{chatId:t[2]}};let a=Number(t[3]);return!Number.isSafeInteger(a)||a<=0?null:{kind:"topic",route:{chatId:t[2],messageThreadId:a}}}function ffe(n){let t=/^(?:direct|group):(\d{1,32})$/.exec(n);return t?{kind:"channel",route:{channelId:t[1]}}:null}function Qfe(n){let t=/^direct:(\d{5,32}@(s\.whatsapp\.net|lid))$/.exec(n);if(t)return{kind:"user",route:{jid:t[1]}};let o=/^group:(\d{5,32}(?:-\d{1,32})?@g\.us)$/.exec(n);return o?{kind:"group",route:{jid:o[1]}}:null}function yfe(n,t){if(!ej.has(n)||typeof t!="string")return null;switch(n){case"weixin":return Qu(t,[["p2p","user","toUserId"]]);case"feishu":return ufe(t);case"dingtalk":return Qu(t,[["p2p","user","userId"],["group","group","openConversationId"]]);case"wecom":return Qu(t,[["direct","user","chatId"],["group","group","chatId"]]);case"qq":return Qu(t,[["c2c","user","userOpenId"],["group","group","groupOpenId"]]);case"slack":return Cfe(t);case"telegram":return Bfe(t);case"discord":return ffe(t);case"whatsapp":return Qfe(t);default:return null}}function Aj(n,t){if(!ej.has(n)||!hfe(t))return[];let o=[],a=new Set;for(let e of Object.keys(t)){let i=yfe(n,e);if(!i)continue;let A=JSON.stringify(i);a.has(A)||(a.add(A),o.push(i))}return o}var mfe=new Set(["weixin","feishu","dingtalk","wecom","qq","slack","telegram","discord","whatsapp"]);function Qy(n){return mfe.has(n)}function Tc(n){let t=new Error(n);return t.code="invalid-target",t}function Sfe(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function GT(n,t,o){if(!Sfe(n))throw Tc(`${o} must be an object`);if(Object.keys(n).find(e=>!t.includes(e))!==void 0)throw Tc(`${o} contains an unknown field`)}function fy(n,t){if(typeof n!="string"||!n||n.trim()!==n)throw Tc(`${t} must be a non-empty string without surrounding whitespace`);return n}function wfe(n){if(typeof n!="string"||!n.trim()||n.trim().length>80)throw Tc("target.name must contain 1 to 80 characters");return n.trim()}function _c(n,t){GT(n,t,"route");let o={};for(let a of t)o[a]=fy(n[a],`route.${a}`);return o}function wg(n,t){if(!t.includes(n))throw Tc("target kind is not supported by this channel");return n}function Dfe(n,t,o){switch(n){case"weixin":return wg(t,["user"]),_c(o,["toUserId"]);case"feishu":return wg(t,["user","group"]),_c(o,t==="user"?["openId"]:["chatId"]);case"dingtalk":return wg(t,["user","group"]),_c(o,t==="user"?["userId"]:["openConversationId"]);case"wecom":return wg(t,["user","group"]),_c(o,["chatId"]);case"qq":return wg(t,["user","group"]),_c(o,t==="user"?["userOpenId"]:["groupOpenId"]);case"slack":return wg(t,["conversation","thread"]),_c(o,t==="conversation"?["channelId"]:["channelId","threadTs"]);case"telegram":{wg(t,["chat","topic"]),GT(o,t==="chat"?["chatId"]:["chatId","messageThreadId"],"route");let a=fy(o.chatId,"route.chatId");if(!/^-?\d+$/.test(a))throw Tc("route.chatId must be a decimal string");if(t==="chat")return{chatId:a};if(!Number.isSafeInteger(o.messageThreadId)||o.messageThreadId<=0)throw Tc("route.messageThreadId must be a positive integer");return{chatId:a,messageThreadId:o.messageThreadId}}case"discord":return wg(t,["channel"]),_c(o,["channelId"]);case"whatsapp":{wg(t,["user","group"]);let a=_c(o,["jid"]);if(!(t==="user"?/^\d{5,32}@(s\.whatsapp\.net|lid)$/.test(a.jid):/^\d{5,32}(?:-\d{1,32})?@g\.us$/.test(a.jid)))throw Tc(`route.jid must be a ${t} WhatsApp JID`);return a}default:throw new TypeError(`Unsupported delivery channel: ${n}`)}}function cp(n,t,{targetIdRequired:o=!0}={}){if(!Qy(n))throw new TypeError(`Unsupported delivery channel: ${n}`);GT(t,o?["targetId","name","kind","route"]:["name","kind","route"],"target");let a={};return o&&(a.targetId=fy(t.targetId,"target.targetId")),t.name!==void 0&&(a.name=wfe(t.name)),a.kind=fy(t.kind,"target.kind"),a.route=Dfe(n,a.kind,t.route),a}function Vi({channel:n,workspaces:t,coreController:o,stateFor:a}){if(!Qy(n))throw new TypeError(`Unsupported delivery channel: ${n}`);if(!t||typeof t!="object")throw new TypeError("delivery adapter requires a workspace store");if(!o||typeof o!="object")throw new TypeError("delivery adapter requires a proactive text controller");if(typeof a!="function")throw new TypeError("delivery adapter requires a bot state getter");return Object.freeze({channel:n,ownsBot:e=>t.has(e),listTargets:e=>t.listDeliveryTargets(e),async listSuggestions(e){let i=await a(e);if(!i||typeof i.snapshot!="function")throw new TypeError("delivery suggestion state cannot be inspected");return Aj(n,i.snapshot()?.sessions).map(r=>cp(n,r,{targetIdRequired:!1}))},createTarget:(e,i)=>t.createDeliveryTarget(e,cp(n,i)),updateTarget:(e,i,A)=>t.updateDeliveryTarget(e,i,cp(n,A,{targetIdRequired:!1})),deleteTarget:(e,i)=>t.deleteDeliveryTarget(e,i),async sendText(e,i,A,r={}){let s=cp(n,i);if(typeof o.sendProactiveText!="function")throw new TypeError("delivery controller cannot send proactive text");return await o.sendProactiveText(e,s,A,r),{sent:!0}}})}var tj=Object.freeze([250,1e3,3e3,5e3,1e4,3e4]);function Ofe(n){if(!Array.isArray(n)||n.length===0)return[...tj];let t=n.filter(o=>Number.isFinite(o)&&o>=0);return t.length>0?t:[...tj]}var yy=class{#e;#A;#t;#r;#I;#o;#g;#i=null;#a=null;#s=0;#l=!1;#c=!1;#d;#n;constructor({controller:t,harness:o,logger:a=console,retryDelaysMs:e,healthyIntervalMs:i=15e3,setTimeoutImpl:A=setTimeout,clearTimeoutImpl:r=clearTimeout}){if(!t||typeof t.initialize!="function"||typeof t.status!="function")throw new TypeError("ConnectionSupervisor requires a controller");if(!o||typeof o.ensureRunning!="function")throw new TypeError("ConnectionSupervisor requires a Harness client");this.#e=t,this.#A=o,this.#t=a,this.#r=Ofe(e),this.#I=Number.isFinite(i)&&i>=0?i:15e3,this.#o=A,this.#g=r,this.#d=new Promise(s=>{this.#n=s})}get ready(){return this.#d}start(){return this.#c||this.#l?this:(this.#c=!0,this.#p(0),this)}async close(){this.#l||(this.#l=!0,this.#i!==null&&this.#g(this.#i),this.#i=null,await this.#a?.catch(()=>{}),this.#n?.(null),this.#n=null)}#p(t){this.#l||(this.#i=this.#o(()=>{this.#i=null,this.#h()},t),this.#i?.unref?.())}async#h(){if(this.#l||this.#a)return;let t=this.#u();this.#a=t;try{await t}finally{this.#a===t&&(this.#a=null)}}async#u(){try{if(await this.#A.ensureRunning(),this.#l)return;let t=await this.#e.initialize();if(this.#l)return;this.#n?.(t),this.#n=null;let{configured:o,connected:a}=t.totals;if(a{let A={namespace:"commands",method:"execute",args:{agentId:a,line:e,images:[]},signal:i.signal};try{return await o.invoke(A)}catch(r){if(r?.name!=="TypertGatewayError"||r.code!=="arguments-invalid"||r.endpoint!=="commands/execute"||r.message!=='typert gateway: commands/execute: args fields do not match the descriptor: unexpected "images"')throw r;return i.signal?.throwIfAborted(),o.invoke({...A,args:{agentId:a,line:e}})}}}}import{randomUUID as LT}from"node:crypto";var my=new WeakMap;function bfe(n){let t=n?.failure;return t&&typeof t=="object"&&typeof t.code=="string"&&typeof t.message=="string"?{code:t.code,message:t.message,details:t.details&&typeof t.details=="object"?t.details:{}}:n?.name==="AbortError"||n?.name==="RemoteInvocationCancelled"?{code:"cancelled",message:n instanceof Error?n.message:"Harness request was cancelled",details:{}}:{code:"internal",message:n instanceof Error?n.message:String(n),details:{}}}function Yo(n,t){return Promise.resolve().then(t).then(o=>({rpcId:n.rpcId,result:{ok:!0,value:o}}),o=>({rpcId:n.rpcId,result:{ok:!1,error:bfe(o)}}))}function rj(n,t,o,a){return{namespace:n,method:t,args:o,...a===void 0?{}:{signal:a}}}function Sy(n,t){let o=new Error(n);return o.name="UserQuestionError",o.code=t,o}function Mfe(n){if(typeof n?.snapshotEvents=="function"){let o=n.snapshotEvents();if(Array.isArray(o))return o}let t=n?.events;return Array.isArray(t)?t:null}function _fe(n,t){return!n||typeof n!="object"||n.sessionId!==t.sessionId||!n.answer||typeof n.answer!="object"||!Array.isArray(n.answer.answers)||n.answer.answers.length!==t.questions.length?!1:n.answer.answers.every((o,a)=>{let e=t.questions[a];if(!o||typeof o!="object"||o.id!==e.id||!Array.isArray(o.selected)||o.selected.some(r=>typeof r!="string")||new Set(o.selected).size!==o.selected.length||o.custom!==void 0&&typeof o.custom!="string")return!1;let i=o.custom?.trim();if(i!==void 0&&!i||e.multiSelect!==!0&&(i!==void 0&&o.selected.length>0||o.selected.length>1))return!1;let A=new Set(e.options?.map(r=>r.label)??[]);return o.selected.every(r=>A.has(r))})}function Tfe(n){if(n?.type==="event"&&n.event&&typeof n.event=="object")return[{event:n.event}];let t=n?.type==="chunks"?n.event:null;if(!t||typeof t!="object")throw new Error("Harness returned an invalid session history record");let{data:o}=t,a=t.type,e=a==="chunkrow/tool-call-chunks"?o?.args:o?.texts;if(!o||!Array.isArray(e)||e.length===0||e.some(A=>typeof A!="string")||!Array.isArray(o.dt)||o.dt.length!==e.length-1)throw new Error("Harness returned an invalid packed session chunk");let i=t.time;return e.map((A,r)=>{r>0&&(i+=o.dt[r-1]);let s;if(a==="chunkrow/text-chunks")s={type:"text-delta",index:o.index,text:A};else if(a==="chunkrow/reasoning-chunks")s={type:"reasoning-delta",index:o.index,text:A};else if(a==="chunkrow/tool-call-chunks")s={type:"tool-call-delta",index:o.index,id:o.id,...Object.hasOwn(o,"name")?{name:o.name}:{},argumentsDelta:A};else throw new Error(`Harness returned an unsupported packed session chunk: ${String(a)}`);return{event:{type:"assistant/chunk",seq:t.seq+r,time:i,data:{turn:o.turn,step:o.step,chunk:s}}}})}function ij(n){if(!Array.isArray(n))throw new Error("Harness returned invalid session history records");return n.flatMap(Tfe)}var UT=class{#e=[];#A=null;#t=!1;#r;#I;#o;constructor(t,o){this.#r=t,this.#o=o,this.#I=()=>this.close(),t?.addEventListener("abort",this.#I,{once:!0}),t?.aborted&&this.close()}push(t){if(!this.#t)if(this.#A){let o=this.#A;this.#A=null,o({value:t,done:!1})}else this.#e.push(t)}next(){return this.#e.length>0?Promise.resolve({value:this.#e.shift(),done:!1}):this.#t?Promise.resolve({value:void 0,done:!0}):new Promise(t=>{this.#A=t})}return(){return this.close(),Promise.resolve({value:void 0,done:!0})}close(){if(!this.#t&&(this.#t=!0,this.#r?.removeEventListener("abort",this.#I),this.#o?.(),this.#o=null,this.#A)){let t=this.#A;this.#A=null,t({value:void 0,done:!0})}}[Symbol.asyncIterator](){return this}},HT=class{#e;#A;#t=new Set;#r=new Map;#I=new Map;#o=new Map;#g=[];#i=!1;constructor(t,o,a){this.#e=o,this.#A=a,this.host=Object.freeze({describe:e=>Yo(e,()=>({ready:!0,transport:"typert"}))}),this.workspace=Object.freeze({list:(e,i)=>Yo(e,()=>this.#l(i)),create:(e,i)=>Yo(e,()=>this.#a("workspace","create",{request:e.payload},i))}),this.sessions=Object.freeze({list:(e,i)=>Yo(e,()=>this.#a("session","list",{_request:e.payload},i)),create:(e,i)=>Yo(e,()=>this.#a("session","create",{request:e.payload},i)),history:(e,i)=>Yo(e,()=>this.#d(e.payload,i)),prompt:(e,i)=>Yo(e,()=>this.#a("session","prompt",{request:{requestId:e.rpcId,...e.payload}},i)),rename:(e,i)=>Yo(e,()=>this.#a("session","rename",{request:e.payload},i)),cancel:(e,i)=>Yo(e,()=>this.#a("session","cancel",{request:{sessionId:e.payload.sessionId}},i)),models:(e,i)=>Yo(e,()=>this.#h(e.payload.sessionId,i)),selectModel:(e,i)=>Yo(e,()=>this.#a("session","selectModel",{request:e.payload},i))}),this.llm=Object.freeze({models:(e,i)=>Yo(e,async()=>{let A=await this.#p(i);return{groups:A.groups,failures:A.failures}})}),this.events=Object.freeze({mux:(e,i)=>this.#u(i)}),this.respond=e=>Promise.resolve(this.#Q(e)),typeof t?.on=="function"&&(this.#g.push(t.on("session/event",(e,i)=>{let A=e?.id;typeof A!="string"||!i||typeof i!="object"||(Number.isSafeInteger(i.seq)&&this.#n(A,i.seq),this.#C({type:"session/event",sessionId:A,event:i}))},{global:!0})),this.#g.push(t.on("approval/request",(e,i)=>this.#m(e,i),{global:!0,prepend:!0})),this.#g.push(t.on("user-questions/request",(e,i)=>this.#y(e,i),{global:!0,prepend:!0})))}async#a(t,o,a,e){return this.#e.invoke(rj(t,o,a,e))}async#s(t,o,a,e){let i=new AbortController,A=e?AbortSignal.any([e,i.signal]):i.signal,r;try{r=(await this.#e.stream(rj(t,o,a,A)))[Symbol.asyncIterator]();let g=await r.next();if(g.done)throw new Error(`Harness ${t}.${o} stream ended before its baseline`);return g.value}finally{i.abort(new DOMException("Baseline received","AbortError")),await Promise.resolve(r?.return?.()).catch(()=>{})}}async#l(t){let o=await this.#s("workspace","follow",{},t);if(o?.type!=="baseline"||!o.value||typeof o.value!="object")throw new Error("Harness workspace.follow returned no baseline");return o.value}async#c(t,o,a){let e=await this.#s("session","follow",{request:{address:{kind:"session",sessionId:t},maxMessages:o}},a);if(e?.type!=="snapshot"||!Number.isSafeInteger(e.cursor))throw new Error("Harness session.follow returned no snapshot");return this.#n(t,e.cursor),e}async#d(t,o){let{sessionId:a,maxMessages:e=50,beforeSeq:i}=t,A=this.#o.get(a);if(A===void 0){let s=await this.#c(a,e,o);if(A=this.#o.get(a)??s.cursor,i===void 0&&A===s.cursor)return{events:ij(s.records),hasMore:s.hasMore===!0,...s.projections===void 0?{}:{projections:s.projections}}}let r=await this.#a("session","page",{request:{address:{kind:"session",sessionId:a},throughSeq:A,maxMessages:e,...i===void 0?{}:{beforeSeq:i}}},o);return{events:ij(r.records),hasMore:r.hasMore===!0}}#n(t,o){let a=this.#o.get(t);(a===void 0||o>a)&&this.#o.set(t,o)}#p(t){return this.#a("session","modelCatalog",{},t)}async#h(t,o){let[a,e]=await Promise.all([this.#p(o),this.#a("session","list",{_request:{}},o)]),i=e?.items?.find(s=>s?.sessionId===t);if(!i){let s=new Error(`session "${t}" not found`);throw s.failure={code:"session-not-found",message:s.message,details:{sessionId:t}},s}let A=i.projections?.values?.modelSelection,r=A?.next??A?.lastUsed??a.default;return{current:r,routable:a.routableProviders.includes(r.provider),groups:a.groups,failures:a.failures}}#u(t){let o;o=new UT(t,()=>this.#t.delete(o)),this.#t.add(o);for(let a of this.#r.values())o.push(this.#f(a));for(let a of this.#I.values())o.push(this.#w(a));return o}#C(t,o=LT()){let a={rpcId:o,payload:t};for(let e of this.#t)e.push(a)}#B(t){let o=t?.session,a=o?.id??t?.id,e=Mfe(o);return typeof a!="string"||!e?null:k3(this.#A,a,e)?{sessionId:a,events:e}:null}#f(t){return{rpcId:t.rpcId,payload:{type:"question/requested",sessionId:t.sessionId,questions:t.questions}}}#y(t,o){let a=this.#B(t?.agent);return a?t.signal?.aborted?Promise.reject(Sy("ask_user_question was aborted before the user answered","ASK_ABORTED")):new Promise((e,i)=>{let A={rpcId:LT(),sessionId:a.sessionId,questions:t.questions,signal:t.signal,settle:(s,g)=>{this.#r.delete(A.rpcId)&&(t.signal?.removeEventListener("abort",r),this.#C({type:"question/resolved",sessionId:A.sessionId,questionRpcId:A.rpcId,outcome:s}),s==="answered"?e(g):i(g))}},r=()=>A.settle("cancelled",Sy("ask_user_question was aborted before the user answered","ASK_ABORTED"));this.#r.set(A.rpcId,A),t.signal?.addEventListener("abort",r,{once:!0}),this.#C(this.#f(A).payload,A.rpcId)}):o()}#w(t){return{rpcId:t.rpcId,payload:{type:"approval/requested",sessionId:t.sessionId,approvalId:t.approvalId,toolName:t.toolName,...t.callId===void 0?{}:{callId:t.callId},...t.reason===void 0?{}:{reason:t.reason}}}}#m(t,o){let a=this.#B(t?.agent);if(!a)return o();if(t.signal?.aborted)return Promise.resolve("cancelled");let e=new Set([...this.#I.values()].map(r=>r.approvalId)),i=new Set,A;for(let r=a.events.length-1;r>=0;r-=1){let s=a.events[r];if(s.type==="approval/decided")i.add(s.data?.id);else if(s.type==="approval/asked"){let g=s.data?.id;if(!g||i.has(g)||e.has(g)||(t.callId??null)!==(s.data?.callId??null))continue;A=g;break}}return A===void 0?o():new Promise(r=>{let s={rpcId:LT(),sessionId:a.sessionId,approvalId:A,toolName:t.toolName,callId:t.callId,reason:t.reason,settle:c=>{this.#I.delete(s.rpcId)&&(t.signal?.removeEventListener("abort",g),this.#C({type:"approval/resolved",sessionId:s.sessionId,approvalId:s.approvalId,outcome:c}),r(c))}},g=()=>s.settle("cancelled");this.#I.set(s.rpcId,s),t.signal?.addEventListener("abort",g,{once:!0}),this.#C(this.#w(s).payload,s.rpcId)})}#Q(t){let o=this.#I.get(t?.rpcId);if(o){let i=t?.result?.value;return t?.result?.ok!==!0||!i||typeof i!="object"||i.sessionId!==o.sessionId||i.approvalId!==o.approvalId||i.outcome!=="allowed-once"&&i.outcome!=="rejected"?{accepted:!1,reason:"bad-response"}:(o.settle(i.outcome),{accepted:!0})}let a=this.#r.get(t?.rpcId);if(!a)return{accepted:!1,reason:"not-pending"};if(t?.result?.ok!==!0)return t?.result?.error?.code!=="cancelled"?{accepted:!1,reason:"bad-response"}:(a.settle("cancelled",Sy("the user cancelled ask_user_question","ASK_CANCELLED")),{accepted:!0});if(!_fe(t.result.value,a))return{accepted:!1,reason:"bad-response"};let e={answers:t.result.value.answer.answers.map(i=>({id:i.id,selected:[...i.selected],...i.custom===void 0?{}:{custom:i.custom}}))};return a.settle("answered",e),{accepted:!0}}dispose(){if(!this.#i){this.#i=!0;for(let t of[...this.#t])t.close();for(let t of[...this.#I.values()])t.settle("cancelled");for(let t of[...this.#r.values()])t.settle("cancelled",Sy("dsh-im interaction adapter was disposed","ASK_ABORTED"));for(let t of this.#g.splice(0).reverse())t?.()}}};function aj(n){let t=n?.root??n;if(!t||!["object","function"].includes(typeof t))throw new TypeError("dsh-im requires a Cordis Host context");let o=my.get(t);if(o)return o;let a=n?.typertGateway;if(!a||typeof a.invoke!="function"||typeof a.stream!="function")throw new TypeError("dsh-im requires the modern Host Typert gateway");let e=new HT(n,a,t);return my.set(t,e),typeof n.effect=="function"&&n.effect(()=>()=>{my.get(t)===e&&my.delete(t),e.dispose()},"dsh-im: modern Harness compatibility API"),e}function Nfe(n,t){return n&&Object.hasOwn(n,t)?n[t]:typeof n?.get=="function"?n.get(t):void 0}function ci(n,t={}){return t.harnessBaseUrl!==void 0?{baseUrl:new URL(t.harnessBaseUrl)}:{apiProxy:Nfe(n,"apiProxy")??aj(n),interactionScope:n.root??n}}import{randomUUID as Rfe}from"node:crypto";function kfe(n){if(typeof n?.get!="function")return;let t;try{t=n.get("agents")}catch{return}if(t!=null){if(typeof t.get!="function")throw new TypeError('dsh-im requires a callable AgentRegistry when ctx.get("agents") is present');return t}}function vfe(n,t,o){if(n?.status!=="running")return!1;let a=n?.session?.events;if(!Array.isArray(a))return!1;let e=null,i=!1;for(let A of a){if(A?.type==="turn/start"){e=A.data?.turn??null,i=!1;continue}if(A?.type==="turn/end"&&A.data?.turn===e){e=null,i=!1;continue}e===t&&A?.type==="user/message"&&A.data?.source?.rpcId===o&&(i=!0)}return e===t&&i}function oj(n){if(!n||typeof n!="object"||Object.isFrozen(n))return n;for(let t of Object.values(n))oj(t);return Object.freeze(n)}function Pfe(n){return oj({id:Rfe(),role:"user",content:[{type:"text",text:n}],source:{kind:"user"}})}function Gfe(n){let t=new Error("Session is busy with an active turn or maintenance task",{cause:n});return t.code="agent-busy",t}function Ffe(n){return({sessionId:t,expectedTurn:o,promptRpcId:a,action:e,text:i})=>{let A=n.get(t);if(A){if(!vfe(A,o,a))return!1;if(e==="stop")return A.cancel({kind:"user"},{keepInbox:!0}),!0;if(e==="steer")return typeof i!="string"||!i.trim()?!1:(A.inject(Pfe(i)),!0);throw new TypeError(`Unsupported Harness control action: ${String(e)}`)}}}function Lfe(n){return({sessionId:t,operation:o})=>{if(typeof o!="function")throw new TypeError("maintenance operation is required");let a=n.get(t);if(!a)return o();try{return a.runMaintenance(e=>{if(n.get(t)!==a){let i=new Error("Session agent changed before maintenance started");throw i.code="agent-unavailable",i}return o(e)})}catch(e){throw Gfe(e)}}}function Ufe(n){return({sessionId:t,workspace:o,files:a,signal:e})=>{let A=n.get(t)?.session?.header?.cwd,r=typeof A=="string"&&A?A:o;if(typeof r!="string"||!r)throw new Uo("inbound-file-workspace-unavailable","The Harness Session workspace is unavailable for inbound files.");return Y1({files:a},{workspace:r,signal:e})}}function Zi(n,t={}){let{controlExecutor:o,sessionMaintenanceExecutor:a,fileIngressExecutor:e}=t;if(o!==void 0&&typeof o!="function")throw new TypeError("controlExecutor must be a function");if(a!==void 0&&typeof a!="function")throw new TypeError("sessionMaintenanceExecutor must be a function");if(e!==void 0&&typeof e!="function")throw new TypeError("fileIngressExecutor must be a function");let i=o&&a&&e?void 0:kfe(n);return{controlExecutor:o??(i?Ffe(i):void 0),sessionMaintenanceExecutor:a??(i?Lfe(i):void 0),fileIngressExecutor:e??Ufe(i??{get:()=>{}})}}function nj(n){return n.map(t=>({id:t,canExecuteCommands:!0}))}function Dg(n=[]){return ny({mode:"open",open:{defaultCanExecuteCommands:!0,commandPermissionOverrides:[]},allowlist:{users:nj(n)}})}function Nc(n=[]){return ny({mode:"allowlist",open:{defaultCanExecuteCommands:!1,commandPermissionOverrides:[]},allowlist:{users:nj(n)}})}function Og(n){return[...new Set((Array.isArray(n)?n:[n]).filter(t=>typeof t=="string"||typeof t=="number"||typeof t=="bigint").map(t=>String(t).trim()).filter(Boolean))]}function Hfe(n){return Og(n).map(t=>`${t.replace(/^\+/,"")}@s.whatsapp.net`)}function pr(n,t={}){let o=String(n??"").trim().toLowerCase();if(o==="weixin")return Sg({direct:Nc(),group:Nc()});if(o==="feishu"){let e=Og(t.ownerOpenIds??t.ownerOpenId).includes("*")?Dg():Nc();return Sg({direct:e,group:e})}if(o==="qq"){let a=Og(t.ownerUserOpenid);return Sg({direct:a.includes("*")?Dg():Nc(),group:Dg()})}if(o==="telegram"){let a=Og(t.allowedUsers);return(t.accessMode??"compatible")==="private-allowlist"?Sg({direct:Nc(a),group:Nc()}):Sg({direct:Dg(a),group:Dg()})}if(o==="whatsapp"){let a=t.accessMode??"self-only",e=Hfe(t.allowedNumbers);return a==="open"?Sg({direct:Dg(e),group:Dg()}):Sg({direct:Nc(a==="private-allowlist"?e:[]),group:Nc()})}if(["dingtalk","wecom","slack","discord"].includes(o))return Sg({direct:Dg(),group:Dg()});throw new TypeError(`Unsupported access-policy channel: ${n}`)}function Kfe(n,t={}){let o=String(n??"").trim().toLowerCase();if(o==="weixin")return Og(t.ownerUserId);if(o==="feishu")return Og(t.ownerOpenIds??t.ownerOpenId).filter(a=>a!=="*");if(o==="dingtalk"){let a=Array.isArray(t.approvedSenders)?t.approvedSenders:[];return Og(a.map(e=>e?.staffId))}return o==="qq"?Og(t.ownerUserOpenid).filter(a=>a!=="*"):o==="whatsapp"?Og(t.accountJid):[]}function Xi(n,t,{channel:o,config:a,equals:e}={}){if(!n||typeof n.accessPolicyFor!="function")throw new TypeError("A workspace store with access policies is required");let i=new Set(Kfe(o,a)),A=typeof e=="function"?e:(r,s)=>r===s;return Object.freeze({botId:t,getSettings:()=>n.accessPolicyFor(t),isPrivileged(r,s){if(!["direct","group"].includes(s))return!1;let g=Array.isArray(r)?r:[r];try{return g.some(c=>typeof c=="string"&&[...i].some(I=>A(c.trim(),I)===!0))}catch{return!1}}})}function jfe(n){let t=il(n.dshHome??process.env.DSH_HOME??yu(Yfe(),".dsh")),o=il(n.dataDir??yu(t,"integrations","dsh-dingtalk"));return{root:o,config:il(n.configPath??yu(o,"config.json")),bots:il(n.botsDir??yu(o,"bots")),workspaces:il(n.workspacesPath??yu(o,"workspaces.json"))}}async function KT(n,t={},o={}){if(!n?.credentials)throw new TypeError("dsh-dingtalk requires ctx.credentials");let a=ci(n,t),e=o.ConfigStore??HQ,i=o.DeviceAuth??xQ,A=o.StateStore??oy,r=o.HarnessClient??ly,s=o.Controller??nu,g=o.Runtime??Eu,c=o.createConnectionSupervisor??FT,I=typeof n.logger=="function"?n.logger("dsh-dingtalk"):n.logger??console,d=()=>ji(n),B=jfe(t),f=await new e(B.config).load(),Q=il(t.workspace??process.cwd()),y=o.WorkspaceStore??gi,m=o.workspaces??await new y(B.workspaces,{defaultWorkspace:Q}).load(),_=typeof f.list=="function",T=_?f.list():[];_&&await m.reconcile(T.map(X=>X.botId)),await Promise.all(T.map(X=>m.ensure(X.botId,{defaultAgentPreset:t.agentPreset,initialAccessPolicy:pr("dingtalk",X)})));let R=typeof f.remove=="function"?Ji(f,{workspaces:m}):f,L=o.deviceAuth??new i({baseUrl:t.registrationBaseUrl}),U=new Map,F=X=>il(B.bots,X,"state.json"),z=async X=>{let ie=U.get(X);return ie||(ie=await new A(F(X)).load(),U.set(X,ie)),ie},J=Wi(n,o.commandExecutor),{controlExecutor:K,sessionMaintenanceExecutor:G,fileIngressExecutor:V}=Zi(n,{controlExecutor:o.controlExecutor,sessionMaintenanceExecutor:o.sessionMaintenanceExecutor,fileIngressExecutor:o.fileIngressExecutor}),H=new r({...a,workspace:Q,autostart:!1,dshBin:t.dshBin??"dsh",...J?{commandExecutor:J}:{},...K?{controlExecutor:K}:{},...G?{sessionMaintenanceExecutor:G}:{},...V?{fileIngressExecutor:V}:{}}),N=new s({deviceAuth:L,credentials:n.credentials,configStore:R,logger:I,createRuntime:async({botId:X,config:ie,clientSecret:De})=>{let oe=await z(X);await m.ensure(X,{defaultAgentPreset:t.agentPreset,initialAccessPolicy:pr("dingtalk",ie)});let Se=qi(H,{botId:X,workspaces:m,state:oe,agentPresetCatalog:d});return new g({config:ie,clientSecret:De,harness:Se.harness,state:Se.state,contextEnhancement:{botId:X,getSettings:()=>m.contextEnhancementFor(X)},accessPolicy:Xi(m,X,{channel:"dingtalk",config:ie}),groupSessionScope:{getScope:()=>m.groupSessionScopeFor(X)},replyTimeoutMs:t.replyTimeoutMs??6e5,maxMessageChars:t.maxMessageChars??4e3,connectTimeoutMs:t.connectTimeoutMs??15e3,logger:{error:(...Be)=>I.error?.(`[${X}]`,...Be),warn:(...Be)=>I.warn?.(`[${X}]`,...Be),info:(...Be)=>I.info?.(`[${X}]`,...Be),debug:(...Be)=>I.debug?.(`[${X}]`,...Be)}})},deleteState:async({botId:X})=>{let ie=U.get(X);if(U.delete(X),ie&&typeof ie.remove=="function")await ie.remove();else try{await xfe(F(X))}catch(De){if(De?.code!=="ENOENT")throw De}}}),k=zi(N,{workspaces:m,stateFor:z,agentPresetCatalog:d}),q=c({controller:k,harness:H,logger:I,retryDelaysMs:t.retryDelaysMs,healthyIntervalMs:t.healthyIntervalMs}).start();return{controller:k,deliveryAdapter:Vi({channel:"dingtalk",workspaces:m,coreController:N,stateFor:z}),ready:q.ready,async close(){await q.close(),await k.close(),H.stopManagedProcess()}}}import Vfe from"qrcode";var Ha="bot.context-enhancement.set";function $i(n){try{return!n||typeof n!="object"||Array.isArray(n)||Reflect.ownKeys(n).length!==2||!Object.hasOwn(n,"botId")||!Object.hasOwn(n,"config")||typeof n.botId!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)?!1:($I(n.config),!0)}catch{return!1}}var ea="bot.access-policy.set";function Aa(n){try{return!n||typeof n!="object"||Array.isArray(n)||Reflect.ownKeys(n).length!==2||!Object.hasOwn(n,"botId")||!Object.hasOwn(n,"policy")||typeof n.botId!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)?!1:(Dc(n.policy),!0)}catch{return!1}}var ta="bot.group-session-scope.set";function ra(n){try{return!n||typeof n!="object"||Array.isArray(n)||Reflect.ownKeys(n).length!==2||!Object.hasOwn(n,"botId")||!Object.hasOwn(n,"groupSessionScope")||typeof n.botId!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)?!1:(sp(n.groupSessionScope),!0)}catch{return!1}}var Jfe=new Set(["loopback","trusted-host"]);function mr(n){if(n===void 0)return"loopback";if(Jfe.has(n))return n;throw new TypeError('dsh-im rpcAuthority must be "loopback" or "trusted-host"')}import{isAbsolute as qfe}from"node:path";var Ka="bot.workspace.set";function ia(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)&&Object.keys(n).every(t=>["botId","workspace"].includes(t))&&typeof n.botId=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)&&typeof n.workspace=="string"&&n.workspace.length<=4096&&qfe(n.workspace.trim())}function aa(n){return["workspace-not-absolute","workspace-not-found","workspace-not-directory","workspace-bot-not-found","agent-preset-invalid","agent-preset-unavailable","context-enhancement-invalid"].includes(n?.code)?{code:n.code,message:n.message}:null}var xa="bot.preset.set";function zfe(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function oa(n){return zfe(n)&&Object.keys(n).every(t=>["botId","agentPreset"].includes(t))&&typeof n.botId=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)&&(n.agentPreset===null||typeof n.agentPreset=="string"&&aT.test(n.agentPreset))}var gj="/dingtalk",Rt=Object.freeze({status:"connection.status",beginProvisioning:"provision.begin",pollProvisioning:"provision.poll",cancelProvisioning:"provision.cancel",bindCredentials:"bot.bind-credentials",reconnectBot:"bot.reconnect",deleteBot:"bot.delete",setWorkspace:Ka,setAgentPreset:xa,setContextEnhancement:Ha,setAccessPolicy:ea,setGroupSessionScope:ta,approveSender:"bot.sender.approve",revokeSender:"bot.sender.revoke"}),cj=Object.freeze(Object.values(Rt)),Wfe=new Set(["clientSecret","client_secret","deviceCode","device_code","secretRef","staffId","senderStaffId","verificationUrl","verificationUri","userCode"]);function Dy(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function Rc(n,t){return Dy(n)&&Object.keys(n).every(o=>t.includes(o))}function al(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n)}function sj(n,t){return typeof n=="string"&&n.trim().length>0&&n.length<=t}function Zfe(n,t){return Dy(t)?n===Rt.status?Rc(t,[])?null:"connection.status does not accept fields.":n===Rt.beginProvisioning?Rc(t,["locale"])&&(t.locale===void 0||t.locale==="zh-CN")?null:"provision.begin received unsupported fields.":[Rt.pollProvisioning,Rt.cancelProvisioning].includes(n)?Rc(t,["attemptId"])&&al(t.attemptId)?null:`${n} requires an attemptId.`:n===Rt.bindCredentials?Rc(t,["clientId","clientSecret"])&&sj(t.clientId,256)&&sj(t.clientSecret,1024)?null:"bot.bind-credentials requires Client ID and Client Secret.":n===Rt.reconnectBot?Rc(t,["botId","sendTest"])&&al(t.botId)&&(t.sendTest===void 0||t.sendTest===!0)?null:"bot.reconnect requires a botId and optional sendTest=true.":n===Rt.deleteBot?Rc(t,["botId","confirm"])&&al(t.botId)&&t.confirm===!0?null:"bot.delete requires a botId and confirm=true.":n===Rt.setWorkspace?ia(t)?null:"\u8BF7\u8F93\u5165\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84\u3002":n===Rt.setAgentPreset?oa(t)?null:"\u8BF7\u9009\u62E9 Agent Preset\u3002":n===Rt.setContextEnhancement?$i(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002":n===Rt.setAccessPolicy?Aa(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u8BBF\u95EE\u8BBE\u7F6E\u3002":n===Rt.setGroupSessionScope?ra(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u7FA4\u4F1A\u8BDD\u7B56\u7565\u3002":n===Rt.approveSender?Rc(t,["botId","requestId","confirm"])&&al(t.botId)&&al(t.requestId)&&t.confirm===!0?null:"bot.sender.approve requires botId, requestId, and confirm=true.":n===Rt.revokeSender?Rc(t,["botId","senderKey","confirm"])&&al(t.botId)&&al(t.senderKey)&&t.confirm===!0?null:"bot.sender.revoke requires botId, senderKey, and confirm=true.":"Unknown DingTalk endpoint.":"Payload must be an object."}function wy(n){return{ok:!1,error:{code:"bad-request",message:n}}}function mu(){return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}}function Xfe(){return{ok:!1,error:{code:"dingtalk-operation-failed",message:"\u9489\u9489\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"}}}function $fe(n){if(n?.name!=="DingtalkPublicConnectionError"||!Dy(n.publicError))return null;let t=n.publicError,o=typeof t.code=="string"&&/^[a-z][a-z\d-]{1,79}$/.test(t.code)?t.code:null,a=typeof t.message=="string"&&t.message.trim()?t.message.trim().slice(0,240):null,e=typeof t.hint=="string"&&t.hint.trim()?t.hint.trim().slice(0,480):null,i=typeof t.referenceId=="string"&&/^DT-CONN-[A-F0-9]{8}$/.test(t.referenceId)?t.referenceId:null;return o&&a&&e&&i?{code:o,message:a,hint:e,referenceId:i}:null}function Ip(n){if(Array.isArray(n))return n.map(Ip);if(!Dy(n))return n;let t={};for(let[o,a]of Object.entries(n))Wfe.has(o)||(t[o]=Ip(a));return t}async function eQe(n){return Vfe.toDataURL(n,{type:"image/png",errorCorrectionLevel:"M",margin:2,width:320})}async function xT(n,t){return!n||typeof n.verificationUrl!="string"?Ip(n):Ip({...n,qrCodeDataUrl:await t(n.verificationUrl)})}async function _n(n,t){let o=structuredClone(n);return o?.provisioning&&(o.provisioning=await xT(o.provisioning,t)),Ip(o)}function AQe(n){for(let t of["status","startProvisioning","registrationStatus","cancelProvisioning","bindCredentials","reconnectBot","deleteBot","approveSender","revokeSender"])if(typeof n?.[t]!="function")throw new TypeError(`A complete DingTalk controller is required (${t})`)}function Ij(n,{encodeQr:t=eQe}={}){AQe(n);let o=new Map,a=e=>{let i=o.get(e);return i||(o.size>=16&&o.delete(o.keys().next().value),i=Promise.resolve().then(()=>t(e)),o.set(e,i)),i};return async(e,i,A)=>{if(A?.aborted)return mu();if(!cj.includes(e))return wy("Unknown DingTalk endpoint.");let r=Zfe(e,i);if(r)return wy(r);try{let s;if(e===Rt.status)s=await _n(await n.status(),a);else if(e===Rt.beginProvisioning){let g=await n.startProvisioning({signal:A});if(A?.aborted)return await n.cancelProvisioning(g.attemptId),mu();s=await xT(g,a)}else if(e===Rt.pollProvisioning){let g=await n.registrationStatus(i.attemptId);if(!g)return wy("The provisioning attempt no longer exists.");s=await xT(g,a)}else if(e===Rt.cancelProvisioning){if(s=await n.cancelProvisioning(i.attemptId),!s)return wy("The provisioning attempt no longer exists.");s=Ip(s)}else if(e===Rt.bindCredentials)s=await _n(await n.bindCredentials(i),a);else if(e===Rt.reconnectBot){let g=await n.reconnectBot(i.botId);if(A?.aborted)return mu();let c;if(i.sendTest===!0)if(!g?.bots?.some(d=>d?.botId===i.botId&&d?.connected===!0)||typeof n.sendConnectionTest!="function")c=dr(Qr("\u9489\u9489\u673A\u5668\u4EBA"));else try{await n.sendConnectionTest(i.botId),c=dr()}catch(d){c=dr(d)}s=await _n({...g,...c?{testMessage:c}:{}},a)}else if(e===Rt.deleteBot)s=await _n(await n.deleteBot(i.botId),a);else if(e===Rt.setWorkspace){if(typeof n.updateWorkspace!="function")throw new Error("Workspace update is unavailable");s=await _n(await n.updateWorkspace(i.botId,i.workspace),a)}else if(e===Rt.setContextEnhancement){if(typeof n.updateContextEnhancement!="function")throw new Error("Context enhancement update is unavailable");s=await n.updateContextEnhancement(i.botId,i.config,g=>_n(g,a))}else if(e===Rt.setAccessPolicy){if(typeof n.updateAccessPolicy!="function")throw new Error("Access policy update is unavailable");s=await n.updateAccessPolicy(i.botId,i.policy,g=>_n(g,a))}else if(e===Rt.setGroupSessionScope){if(typeof n.updateGroupSessionScope!="function")throw new Error("Group session scope update is unavailable");s=await n.updateGroupSessionScope(i.botId,i.groupSessionScope,g=>_n(g,a))}else if(e===Rt.setAgentPreset){if(typeof n.updateAgentPreset!="function")throw new Error("Agent preset update is unavailable");s=await _n(await n.updateAgentPreset(i.botId,i.agentPreset),a)}else e===Rt.approveSender?s=await _n(await n.approveSender(i.botId,i.requestId),a):s=await _n(await n.revokeSender(i.botId,i.senderKey),a);return A?.aborted?mu():{ok:!0,value:s}}catch(s){let g=aa(s),c=$fe(s);return A?.aborted?mu():g?{ok:!1,error:g}:c?{ok:!1,error:c}:Xfe()}}}function Oy(n,t,o,a){if(!n?.connection?.rpc||typeof n.connection.rpc.handle!="function")throw new TypeError("DSH Host Connection RPC is required");return n.connection.rpc.handle(gj,Ij(t,o),{authority:mr(a)})}async function lj(n,t={}){if(t?.controller)return Oy(n,t.controller,t.rpcOptions,t.rpcAuthority);let o=await KT(n,t,t.internals),a=t.deliveryService&&o.deliveryAdapter?t.deliveryService.registerAdapter(o.deliveryAdapter):void 0,e=Oy(n,o.controller,t.rpcOptions,t.rpcAuthority);return n.effect(()=>async()=>{await a?.(),await o.close()},"dsh-dingtalk: close bot connections"),e}import{createHash as tQe}from"node:crypto";import{mkdir as rQe,readFile as iQe,rename as aQe,unlink as oQe,writeFile as nQe}from"node:fs/promises";import{dirname as sQe}from"node:path";var YT=Object.freeze({version:1,bots:Object.freeze([])});function bg(n){return typeof n=="string"&&n.trim()?n.trim():null}function dj(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Su(n,{botPrefix:t,tokenRefPrefix:o}){let a=bg(n);if(!a)throw new TypeError("platformId is required");let e=tQe("sha256").update(a).digest("hex").slice(0,24);return{botId:`${t}_${e}`,tokenRef:`${o}_${e.toUpperCase()}`}}function by(n,t){let o=bg(n)??"";return o.length<=10?o?`${o.slice(0,3)}\u2022\u2022\u2022`:t:`${o.slice(0,6)}\u2022\u2022\u2022\u2022${o.slice(-4)}`}var lp=class{#e;#A;#t;#r;#I;#o;#g;#i=YT;#a=Promise.resolve();constructor(t,{channel:o,botPrefix:a,tokenRefPrefix:e,normalizeBotExtension:i=()=>({})}){if(typeof i!="function")throw new TypeError("normalizeBotExtension must be a function");this.#e=t,this.#A=o,this.#t=a,this.#r=e,this.#I=i,this.#o=new RegExp(`^${dj(a)}_[a-f0-9]{24}$`),this.#g=new RegExp(`^${dj(e)}_[A-F0-9]{24}$`)}async load(){try{let t=this.#l(JSON.parse(await iQe(this.#e,"utf8")));if(!t)throw new Error(`dsh-im ${this.#A} config contains invalid bot data`);this.#i=t}catch(t){if(t?.code!=="ENOENT")throw t;this.#i=YT}return this}list(){return structuredClone(this.#i.bots)}get(t){let o=this.#i.bots.find(a=>a.botId===t);return o?structuredClone(o):null}getByPlatformId(t){let o=this.#i.bots.find(a=>a.platformId===t);return o?structuredClone(o):null}async save(t){let o=this.#s(t);if(!o)throw new Error(`Refusing to persist incomplete ${this.#A} bot data`);return this.#c(a=>{let e=a.find(r=>r.platformId===o.platformId&&r.botId!==o.botId),i=a.find(r=>r.tokenRef===o.tokenRef&&r.botId!==o.botId);if(e||i)throw new Error(`Duplicate ${this.#A} bot identity`);let A=a.findIndex(r=>r.botId===o.botId);return A===-1?a.push(o):a[A]=o,structuredClone(o)})}async remove(t){if(!this.#o.test(t))throw new TypeError(`Invalid ${this.#A} bot id`);return this.#c(o=>{let a=o.findIndex(i=>i.botId===t);if(a===-1)return null;let[e]=o.splice(a,1);return structuredClone(e)})}async clear(){let t=this.#a.then(async()=>{try{await oQe(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#i=YT});this.#a=t.then(()=>{},()=>{}),await t}#s(t){if(!t||typeof t!="object")return null;let o=bg(t.platformId),a=bg(t.botId),e=bg(t.tokenRef),i=bg(t.name);if(!o||!a||!e||!i||!this.#o.test(a)||!this.#g.test(e))return null;let A=Su(o,{botPrefix:this.#t,tokenRefPrefix:this.#r});if(A.botId!==a||A.tokenRef!==e)return null;let r=this.#I(t);return!r||typeof r!="object"||Array.isArray(r)?null:Object.freeze({botId:a,platformId:o,tokenRef:e,name:i,username:bg(t.username),createdAt:bg(t.createdAt)??new Date().toISOString(),connectedAt:bg(t.connectedAt),...r})}#l(t){if(!t||t.version!==1||!Array.isArray(t.bots))return null;let o=t.bots.map(A=>this.#s(A));if(o.some(A=>A===null))return null;let a=new Set,e=new Set,i=new Set;for(let A of o){if(a.has(A.botId)||e.has(A.platformId)||i.has(A.tokenRef))return null;a.add(A.botId),e.add(A.platformId),i.add(A.tokenRef)}return Object.freeze({version:1,bots:Object.freeze(o)})}async#c(t){let o,a=this.#a.then(async()=>{let e=[...this.#i.bots];o=t(e);let i=Object.freeze({version:1,bots:Object.freeze(e)});await this.#d(i),this.#i=i});return this.#a=a.then(()=>{},()=>{}),await a,o}async#d(t){await rQe(sQe(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.tmp`;await nQe(o,`${JSON.stringify(t,null,2)} -`,{encoding:"utf8",mode:384}),await aQe(o,this.#e)}};var pj=Object.freeze({botPrefix:"discord",tokenRefPrefix:"DSH_DISCORD_BOT_TOKEN"});function hj(n){return Su(n,pj)}function Ej(n){return by(n,w("Discord\u673A\u5668\u4EBA"))}var My=class extends lp{constructor(t){super(t,{channel:"Discord",...pj})}};function wu(n){return typeof n=="string"&&n.trim()?n.trim():null}function Du(n,t){return Object.freeze({code:n,message:t})}var dp=class{#e;#A;#t;#r;#I;#o;#g;#i;#a;#s=new Map;#l=new Map;#c=new Map;#d=0;#n=!1;constructor({descriptor:t,credentials:o,configStore:a,inspectToken:e,deriveIdentity:i,maskPlatformId:A,createRuntime:r,deleteState:s=async()=>{},logger:g=console}){if(!t?.key||!t?.label||!t?.connectionLabel)throw new TypeError("TokenBotController requires a channel descriptor");if(!o||typeof o.resolve!="function"||typeof o.set!="function"||typeof o.unset!="function")throw new TypeError(`${t.label} requires the DSH credential provider`);if(!a||typeof a.list!="function"||typeof a.save!="function"||typeof a.remove!="function")throw new TypeError(`${t.label} requires a config store`);if(typeof e!="function"||typeof i!="function"||typeof A!="function"||typeof r!="function")throw new TypeError(`${t.label} controller dependencies are incomplete`);this.#e=t,this.#A=o,this.#t=a,this.#r=e,this.#I=i,this.#o=A,this.#g=r,this.#i=s,this.#a=g}async initialize(){if(this.#n)return this.status();for(let t of this.#t.list())await this.#B(t.botId,async()=>{if(this.#n||this.#s.get(t.botId)?.status?.ready)return;let o=await this.#u(t.tokenRef);if(!o){this.#l.set(t.botId,Du("missing-token",w("{label}\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u63A5\u5165\u3002",{label:this.#e.label})));return}try{await this.#p(t,o),this.#l.delete(t.botId)}catch(a){this.#l.set(t.botId,Du("connection-failed",w("{label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002",{label:this.#e.label}))),this.#a.warn?.(`[dsh-im:${this.#e.key}] bot ${t.botId} failed to initialize:`,a)}finally{this.#f()}});return this.status()}async bindCredentials({token:t}={}){if(this.#n)throw new Error(`${this.#e.label} controller is closed`);let o=wu(t);if(!o)throw new TypeError(`${this.#e.label} Bot Token is required`);let a=await this.#r(o),e=wu(a?.platformId),i=wu(a?.name);if(!e||!i)throw new Error(`${this.#e.label} returned an invalid bot identity`);let A=this.#I(e);return await this.#B(A.botId,async()=>{if(this.#n)throw new Error(`${this.#e.label} controller is closed`);let r=this.#t.getByPlatformId(e),s=await this.#A.resolve(A.tokenRef).catch(()=>{}),g={botId:A.botId,platformId:e,tokenRef:A.tokenRef,name:i,username:wu(a.username),createdAt:r?.createdAt??new Date().toISOString(),connectedAt:new Date().toISOString()};await this.#A.set(A.tokenRef,o);try{await this.#t.save(g)}catch(c){throw await this.#C(A.tokenRef,s),c}try{await this.#p(g,o),this.#l.delete(A.botId)}catch(c){this.#l.set(A.botId,Du("connection-failed",w("{label}\u673A\u5668\u4EBA\u5DF2\u63A5\u5165\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002",{label:this.#e.label}))),this.#a.warn?.(`[dsh-im:${this.#e.key}] bot ${A.botId} credential connection failed:`,c)}this.#f()}),this.status()}async reconnectBot(t){let o=this.#t.get(t);if(!o)throw new Error(`Unknown ${this.#e.label} bot`);return await this.#B(t,async()=>{let a=await this.#u(o.tokenRef);if(!a)throw new Error(`${this.#e.label} bot token is missing`);try{await this.#p(o,a),this.#l.delete(t)}catch(e){throw this.#l.set(t,Du("connection-failed",w("{label}\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{label:this.#e.label}))),e}finally{this.#f()}}),this.status()}async updateBotConfig(t,o){if(this.#n)throw new Error(`${this.#e.label} controller is closed`);if(typeof o!="function")throw new TypeError("Bot config update must be a function");return await this.#B(t,async()=>{if(this.#n)throw new Error(`${this.#e.label} controller is closed`);let a=this.#t.get(t);if(!a)throw new Error(`Unknown ${this.#e.label} bot`);let e=await this.#u(a.tokenRef);if(!e)throw new Error(`${this.#e.label} bot token is missing`);if(this.#n)throw new Error(`${this.#e.label} controller is closed`);let i=o(a),A=await this.#t.save(i);try{await this.#p(A,e),this.#l.delete(t)}catch(r){throw this.#l.set(t,Du("connection-failed",w("{label}\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{label:this.#e.label}))),r}finally{this.#f()}}),this.status()}async sendConnectionTest(t){let o=this.#t.get(t);if(!o)throw new Error(`Unknown ${this.#e.label} bot`);return this.#B(t,async()=>{let a=this.#s.get(t);if(!a?.status?.ready||typeof a.sendConnectionTest!="function"){let i=new Error(w("{label}\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5",{label:this.#e.label}));throw i.code="test-target-unavailable",i}let e=w("{name}\uFF08{id}\uFF09",{name:o.name,id:this.#o(o.platformId)});return await a.sendConnectionTest(Ki(e,w("{label}\u673A\u5668\u4EBA",{label:this.#e.label}))),{sent:!0}})}async sendProactiveText(t,o,a,e={}){if(!this.#t.get(t))throw new Error(`Unknown ${this.#e.label} bot`);return this.#B(t,async()=>{let A=this.#s.get(t);if(!A?.status?.ready||typeof A.sendProactiveText!="function"){let r=new Error(w("{label}\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5",{label:this.#e.label}));throw r.code="bot-not-connected",r}return A.sendProactiveText(o,a,e)})}async deleteBot(t){let o=this.#t.get(t);if(!o)throw new Error(`Unknown ${this.#e.label} bot`);return await this.#B(t,async()=>{let a=await this.#A.resolve(o.tokenRef).catch(()=>{});await this.#h(t);try{await this.#A.unset(o.tokenRef),await this.#t.remove(t)}catch(e){throw a?.value&&(await this.#A.set(o.tokenRef,a.value).catch(()=>{}),await this.#p(o,a.value).catch(()=>{})),new Error(`Unable to remove the ${this.#e.label} bot safely.`,{cause:e})}await this.#i({botId:t,config:o}).catch(e=>{this.#a.warn?.(`[dsh-im:${this.#e.key}] bot ${t} state cleanup failed:`,e)}),this.#l.delete(t),this.#f()}),this.status()}status(){let t=this.#t.list().map(a=>{let e=this.#s.get(a.botId)?.status??null,i=e?.ready===!0&&e.connectionState==="connected"&&e.harnessReachable===!0,A=i?"connected":e?.connectionState==="connecting"?"connecting":this.#l.has(a.botId)||e?.connectionState==="failed"?"error":"offline";return{botId:a.botId,state:A,connected:i,configured:!0,bot:{name:a.name,username:a.username,idMasked:this.#o(a.platformId)},health:{status:i?"healthy":A==="error"?"error":"offline",summary:i?w("{label}{connectionLabel}\u8FD0\u884C\u6B63\u5E38",{label:this.#e.label,connectionLabel:w(this.#e.connectionLabel)}):A==="error"?w("{label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5",{label:this.#e.label}):w("{label}\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF",{label:this.#e.label}),lastCheckedAt:e?.lastCheckedAt??null,lastConnectedAt:e?.lastConnectedAt??null},stats:{messagesReceived:e?.messagesReceived??0,messagesReplied:e?.messagesReplied??0},lastMessageError:ii(e?.lastMessageError),error:structuredClone(this.#l.get(a.botId)??null)}}),o=t.filter(a=>a.connected).length;return{schemaVersion:1,revision:this.#d,state:t.length===0?"disconnected":o===t.length?"connected":o>0?"degraded":"offline",bots:t,totals:{configured:t.length,connected:o}}}async close(){this.#n||(this.#n=!0,await Promise.allSettled([...this.#c.values()]),await Promise.allSettled([...this.#s.keys()].map(t=>this.#h(t))))}async#p(t,o){if(this.#n)throw new Error(`${this.#e.label} controller is closed`);if(await this.#h(t.botId),this.#n)throw new Error(`${this.#e.label} controller is closed`);let a=await this.#g({botId:t.botId,config:t,token:o});if(!a||typeof a.start!="function"||typeof a.stop!="function")throw new TypeError(`createRuntime returned an invalid ${this.#e.label} runtime`);this.#s.set(t.botId,a);try{await a.start()}catch(e){throw await a.stop().catch(()=>{}),this.#s.delete(t.botId),e}}async#h(t){let o=this.#s.get(t);this.#s.delete(t),await o?.stop().catch(a=>{this.#a.warn?.(`[dsh-im:${this.#e.key}] bot ${t} failed to stop cleanly:`,a)})}async#u(t){let o=await this.#A.resolve(t).catch(()=>{});return wu(o?.value)}async#C(t,o){o?.value?await this.#A.set(t,o.value).catch(()=>{}):await this.#A.unset(t).catch(()=>{})}#B(t,o){let i=(this.#c.get(t)??Promise.resolve()).catch(()=>{}).then(o).finally(()=>{this.#c.get(t)===i&&this.#c.delete(t)});return this.#c.set(t,i),i}#f(){this.#d+=1}};import{createHash as gQe}from"node:crypto";var cQe="https://discord.com/api/v10/",IQe=12e4,lQe=new Set([50001,50013]),dQe=new Set([40005]);function Qs(n){return typeof n=="string"&&n.trim()?n.trim():null}function uj(n,t){let o=AbortSignal.timeout(t);return n?AbortSignal.any([n,o]):o}function jT(n){return n?.reason instanceof Error?n.reason:new DOMException("The operation was aborted","AbortError")}function pQe(n,t){if(!Number.isInteger(n)||n<1)throw new TypeError(`${t} must be a positive integer`);return n}function Bj(n,t){return t?.providerCode!==void 0&&(n.providerCode=t.providerCode),t?.retry_after!==void 0&&(n.retry_after=t.retry_after,n.retryAfter=t.retry_after),Number.isInteger(t?.status)&&(n.status=t.status),n}function hQe(n){let t=Number(n?.providerCode),o=Number(n?.status),a=Qs(n?.message)??"",e="artifact-provider-rejected",i="Discord rejected the attachment.";o===401||o===403||lQe.has(t)?(e="artifact-permission-required",i="Discord denied permission to send the attachment."):o===413||dQe.has(t)||/(?:request|attachment|file).{0,24}too large/i.test(a)?(e="artifact-too-large",i="The attachment exceeds Discord's size limit."):o===429?(e="artifact-rate-limited",i="Discord rate-limited attachment delivery."):o>=500&&(e="artifact-delivery-uncertain",i="Discord attachment delivery result is uncertain.");let A=new Error(i,{cause:n});return A.code=e,Bj(A,n)}function EQe(n){let t=new Error("Discord attachment delivery result is uncertain",{cause:n});return t.code="artifact-delivery-uncertain",Bj(t,n)}function uQe(n,t){return new Promise((o,a)=>{if(t?.aborted){a(t.reason??new DOMException("Aborted","AbortError"));return}let e=setTimeout(o,n);e?.unref?.(),t?.addEventListener("abort",()=>{clearTimeout(e),a(t.reason??new DOMException("Aborted","AbortError"))},{once:!0})})}function Ii(n,t){let o=Qs(n);if(!o||!/^\d{5,30}$/.test(o))throw new TypeError(`Invalid Discord ${t}`);return o}function Cj(n){let t=Qs(n);if(!t)throw new TypeError("A Discord reaction emoji is required");return t}function CQe(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{20,}\.[A-Za-z0-9_-]{4,}\.[A-Za-z0-9_-]{20,}$/.test(n.trim())}var Ou=class{#e;#A;#t;#r;constructor({token:t,fetchImpl:o=fetch,baseUrl:a=cQe,fileUploadTimeoutMs:e=IQe}){if(!CQe(t))throw new TypeError("Discord Bot Token is invalid");if(typeof o!="function")throw new TypeError("DiscordApi requires fetch");this.#e=t.trim(),this.#A=o,this.#t=new URL(a),this.#r=pQe(e,"fileUploadTimeoutMs")}getCurrentUser(t={}){return this.#I("users/@me",{...t,method:"GET"})}getGatewayBot(t={}){return this.#I("gateway/bot",{...t,method:"GET"})}getChannel({channelId:t,signal:o}={}){return this.#I(`channels/${Ii(t,"channel id")}`,{method:"GET",signal:o})}getMessage({channelId:t,messageId:o,signal:a}={}){return this.#I(`channels/${Ii(t,"channel id")}/messages/${Ii(o,"message id")}`,{method:"GET",signal:a})}startThreadFromMessage({channelId:t,messageId:o,name:a,signal:e}={}){let i=Qs(a);if(!i||[...i].length>100)throw new TypeError("Discord thread name must contain 1-100 characters");if(e?.aborted)throw jT(e);return this.#I(`channels/${Ii(t,"channel id")}/messages/${Ii(o,"message id")}/threads`,{method:"POST",signal:e,body:{name:i}})}createMessage({channelId:t,content:o,replyToMessageId:a,signal:e}){return this.#I(`channels/${Ii(t,"channel id")}/messages`,{method:"POST",signal:e,body:{content:o,allowed_mentions:{parse:[],replied_user:!1},...a?{message_reference:{message_id:Ii(a,"message id"),channel_id:Ii(t,"channel id"),fail_if_not_exists:!1}}:{}}})}async createFileMessage({channelId:t,file:o,replyToMessageId:a,signal:e}){if(!o||typeof o!="object"||typeof o.fileName!="string"||!o.fileName||!Buffer.isBuffer(o.bytes))throw new TypeError("A Discord attachment is required");let i=Qs(o.deliveryKey)??Qs(o.artifactId),A=i?gQe("sha256").update(i).digest("hex").slice(0,25):void 0,r=new FormData;r.append("payload_json",JSON.stringify({allowed_mentions:{parse:[],replied_user:!1},attachments:[{id:0,filename:o.fileName}],...A?{nonce:A,enforce_nonce:!0}:{},...a?{message_reference:{message_id:Ii(a,"message id"),channel_id:Ii(t,"channel id"),fail_if_not_exists:!1}}:{}})),r.append("files[0]",new Blob([o.bytes],{type:o.mediaType??"application/octet-stream"}),o.fileName);let s=Ii(t,"channel id");if(e?.aborted)throw jT(e);let g=uj(e,this.#r);try{return await this.#I(`channels/${s}/messages`,{method:"POST",signal:g,timeoutMs:this.#r,body:r,multipart:!0})}catch(c){throw e?.aborted?jT(e):c?.code?.startsWith?.("discord-")?hQe(c):EQe(c)}}editMessage({channelId:t,messageId:o,content:a,signal:e}){return this.#I(`channels/${Ii(t,"channel id")}/messages/${Ii(o,"message id")}`,{method:"PATCH",signal:e,body:{content:a,allowed_mentions:{parse:[],replied_user:!1}}})}sendTyping({channelId:t,signal:o}){return this.#I(`channels/${Ii(t,"channel id")}/typing`,{method:"POST",signal:o,expectBody:!1})}async addOwnReaction({channelId:t,messageId:o,emoji:a,signal:e}={}){let i=Cj(a);return await this.#I(`channels/${Ii(t,"channel id")}/messages/${Ii(o,"message id")}/reactions/${encodeURIComponent(i)}/@me`,{method:"PUT",signal:e,expectBody:!1,retry:!1}),i}removeOwnReaction({channelId:t,messageId:o,emoji:a,signal:e}={}){let i=Cj(a);return this.#I(`channels/${Ii(t,"channel id")}/messages/${Ii(o,"message id")}/reactions/${encodeURIComponent(i)}/@me`,{method:"DELETE",signal:e,expectBody:!1,retry:!1})}async#I(t,{method:o,body:a,signal:e,timeoutMs:i=15e3,expectBody:A=!0,retry:r=!0,multipart:s=!1}){let g;try{g=await this.#A(new URL(t,this.#t),{method:o,headers:{authorization:`Bot ${this.#e}`,...s?{}:{"content-type":"application/json"},"user-agent":"DeepSeek-Harness-dsh-im (https://github.com/xmanrui/dsh-im, 1.1.0)"},...a===void 0?{}:{body:s?a:JSON.stringify(a)},signal:uj(e,i),redirect:"error"})}catch(I){throw I?.name==="AbortError"||I?.name==="TimeoutError"?I:new Error(`Discord ${o} transport failed`)}let c=null;if(A||g.status===429||!g.ok)try{c=await g.json()}catch{if(A){let I=new Error(`Discord ${o} returned invalid JSON`);throw I.status=g?.status,I}}if(g.status===429&&r){let I=Math.min(1e4,Math.max(50,Number(c?.retry_after)*1e3||1e3));return await uQe(I,e),this.#I(t,{method:o,body:a,signal:e,timeoutMs:i,expectBody:A,retry:!1,multipart:s})}if(!g.ok){let I=new Error(Qs(c?.message)??`Discord API failed with HTTP ${g.status}`);I.code=`discord-${g.status}`,I.status=g.status,(Number.isInteger(c?.code)||typeof c?.code=="string")&&(I.providerCode=c.code);let d=Number(c?.retry_after);throw Number.isFinite(d)&&d>=0&&(I.retry_after=d,I.retryAfter=d),I}return A?c:null}};async function fj(n,t={}){let a=await new Ou({token:n,...t}).getCurrentUser();if(!a?.id||a?.bot!==!0)throw new Error("Discord token does not belong to a bot");return{platformId:String(a.id),name:Qs(a.global_name)??Qs(a.username)??w("Discord\u673A\u5668\u4EBA"),username:Qs(a.username)}}var BQe=Object.freeze({success(){},error(){},clear(){},settled:()=>Promise.resolve()});function Qj(n,t){!n||typeof n!="object"||(n[t]=(n[t]??0)+1)}async function fQe(n,t){let o=AbortSignal.timeout(t),a,e=new Promise((i,A)=>{a=()=>A(o.reason??new DOMException("Timed out","TimeoutError")),o.addEventListener("abort",a,{once:!0})});try{return await Promise.race([n(o),e])}finally{o.removeEventListener("abort",a)}}function _y({adapter:n,target:t,reactions:o,status:a,logger:e=console,label:i="channel",timeoutMs:A=2e3}={}){if(!t||typeof n?.addReaction!="function"||typeof n?.removeReaction!="function"||typeof o?.processing!="string"||!o.processing||!Number.isSafeInteger(A)||A<=0)return BQe;let r=null,s=!1,g=async(B,f)=>{try{let Q=await fQe(f,A);return Qj(a,B==="add"?"reactionsAdded":"reactionsRemoved"),{ok:!0,value:Q}}catch(Q){return Qj(a,"reactionErrors"),e.warn?.(`[dsh-im:${i}] status reaction ${B} failed:`,Q?.message??Q?.name??String(Q)),{ok:!1,value:null}}},c=async B=>{if(r!==null){let Q=r;r=null,await g("remove",y=>n.removeReaction(t,Q,{signal:y}))}if(typeof B!="string"||!B)return;let f=await g("add",Q=>n.addReaction(t,B,{signal:Q}));f.ok&&f.value!==void 0&&f.value!==null&&(r=f.value)},I=c(o.processing),d=B=>{s||(s=!0,I=I.then(()=>c(B),()=>c(B)),I.catch(()=>{}))};return Object.freeze({success:()=>d(o.success),error:()=>d(o.error),clear:()=>d(null),settled:()=>I})}var yj="\u8FD9\u4E2A\u95EE\u9898\u5DF2\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u7B54\u3002",QQe="\u4EFB\u52A1\u5DF2\u5B8C\u6210\u3002";function Ba(n){return typeof n=="string"?n.trim():""}function yQe(n,t,o){return t.actor===o&&(n.kind!=="group"||n.addressed===!0)&&!Pt(n)&&!bt(n)&&!!Ba(n.content)}function mQe(n,t,o){let a=String(n??w("\u7ED3\u679C\u6587\u4EF6")).replace(/[\r\n]+/g," ").trim().slice(0,255)||w("\u7ED3\u679C\u6587\u4EF6");switch(t?.code){case"artifact-delivery-uncertain":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u7684\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\uFF0C\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u8BD5\u3002",{name:a});case"artifact-permission-required":return o?.key==="slack"?w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 Slack \u5E94\u7528\u7F3A\u5C11 files:write \u6743\u9650\u3002\u8BF7\u66F4\u65B0 Manifest\u3001\u91CD\u65B0\u5B89\u88C5\u5E94\u7528\u5E76\u91CD\u65B0\u8FDE\u63A5\u673A\u5668\u4EBA\u540E\u91CD\u8BD5\u3002",{name:a}):o?.key==="discord"?w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u673A\u5668\u4EBA\u7F3A\u5C11 Discord \u7684 Send Messages\u3001Attach Files \u6216 Read Message History \u6743\u9650\u3002",{name:a}):o?.key==="telegram"?w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 Telegram \u4E0D\u5141\u8BB8\u673A\u5668\u4EBA\u5728\u5F53\u524D\u804A\u5929\u53D1\u9001\u6587\u6863\uFF0C\u8BF7\u68C0\u67E5\u804A\u5929\u6743\u9650\u3002",{name:a}):w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u6587\u4EF6\u53D1\u9001\u6743\u9650\uFF0C\u8BF7\u68C0\u67E5\u6E20\u9053\u6743\u9650\u3002",{name:a});case"artifact-too-large":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u6E20\u9053\u5927\u5C0F\u4E0A\u9650\uFF0C\u672A\u53D1\u9001\u3002",{name:a});case"artifact-empty":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0C\u672A\u53D1\u9001\u3002",{name:a});case"artifact-invalid":case"artifact-changed":case"artifact-unavailable":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u6216\u51C6\u5907\u53D1\u9001\uFF0C\u8BF7\u786E\u8BA4\u6587\u4EF6\u4ECD\u53EF\u8BBF\u95EE\u540E\u91CD\u8BD5\u3002",{name:a});case"artifact-rate-limited":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u5F53\u524D\u6E20\u9053\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{name:a});case"artifact-provider-rejected":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6216\u6587\u4EF6\u6D88\u606F\u3002",{name:a});default:return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6682\u65F6\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{name:a})}}function po(){return{messagesReceived:0,messagesReplied:0,messagesRejected:0,lastMessageAt:null,lastReplyAt:null,lastRejectedAt:null,lastError:null,lastMessageError:null,reactionsAdded:0,reactionsRemoved:0,reactionErrors:0}}var ys=class{#e;#A;#t;#r;#I;#o;#g;#i;#a;#s;#l;#c;#d=new Map;#n=new Map;#p=new Map;#h=new Map;#u=new Set;#C=new Set;#B;#f=new Fa;constructor({descriptor:t,bot:o,harness:a,state:e,contextEnhancement:i,accessPolicy:A,groupSessionScope:r=op,status:s=po(),logger:g=console,replyTimeoutMs:c=6e5,signal:I,resolveAgentPreset:d}){if(!t?.key||!t?.label)throw new TypeError("A channel descriptor is required");if(!o||typeof o.sendText!="function")throw new TypeError("A bot client is required");if(!a||!e)throw new TypeError("Harness client and state store are required");this.#e=t,this.#A=o,this.#t=a,this.#r=e,this.#I=i,this.#o=A,this.#g=r,this.#i=s,this.#a=g,this.#s=c,this.#l=I,this.#c=typeof d=="function"?d:null,this.#B=new Ra({label:t.key,logger:g})}get status(){return structuredClone(this.#i)}#y(){let t=this.#g;return t&&typeof t=="object"&&typeof t.getScope=="function"?np(t.getScope()):np(t)}accept(t,{contextSnapshot:o,accessDecision:a}={}){if(this.#l?.aborted)return Promise.resolve();let e=Ba(t?.conversationId),i=t?.kind==="group"?"group":"direct",A={...t,kind:i,conversationId:e},r=Ba(A.messageId),s=Ba(A.senderId);if(!r||!s||!e||A.senderIsBot===!0||this.#r.hasSeen(r)||this.#h.has(r))return Promise.resolve();if(i==="group"&&A.addressed!==!0)return this.#i.messagesRejected+=1,this.#i.lastRejectedAt=new Date().toISOString(),this.#h.set(r,null),this.#m(A,r,null);if(this.#o||a){let I=Pt(A),d=bt(A),B=a??Ti(this.#o,{conversationType:i,senderIds:[s,Ba(A.senderAlternateId),...Array.isArray(A.senderAliasIds)?A.senderAliasIds:[]].filter(Boolean),text:A.content,hasImages:I,hasFiles:d});if(!B.allowed)return this.#i.messagesRejected+=1,this.#i.lastRejectedAt=new Date().toISOString(),this.#h.set(r,null),this.#m(A,r,B.reason==="command-not-allowed"?w(lo):B.reason==="sender-not-allowed"&&(A.kind!=="group"||A.addressed===!0)?w("\u4F60\u4E0D\u5728\u5F53\u524D\u673A\u5668\u4EBA\u7684\u8BBF\u95EE\u767D\u540D\u5355\u4E2D\u3002"):null,{recordReceived:B.reason==="command-not-allowed"||B.reason==="sender-not-allowed"})}this.#h.set(r,o===void 0?ni(this.#I,t?.kind):o);let g=_y({adapter:this.#A,target:A.kind==="direct"||A.addressed===!0?A.reactionTarget:null,reactions:this.#e.reactions,status:this.#i,logger:this.#a,label:this.#e.key});A.statusReaction=g;let c=this.#w(A,r,s);return c.then(()=>g.success(),()=>g.error()),c}#w(t,o,a){t.kind==="direct"&&To(this.#r,t.connectionTestTarget??t.replyTarget);let e=v3({kind:t.kind,conversationId:t.conversationId,senderId:a,groupSessionScope:this.#y()}),i=this.#n.get(e),A=Ba(t.content),r=La(A);if(r&&t.kind==="group"&&t.addressed===!0)return this.#m(t,o,ps());if(r&&t.kind==="direct"){if(/^\/batch$/iu.test(A)&&(this.#d.has(e)||i||this.#B.hasPending(e)))return this.#m(t,o,Lo());let d=this.#f.handle(e,A,{plainText:!!A&&t.plainText!==!1&&!Pt(t)&&!bt(t)&&!Kr(t)});if(d.handled)return d.kind==="submit"?this.#Q({...t,content:d.prompt,batchSubmission:{token:d.token}},o,a,e):this.#m(t,o,d.message)}else if(t.kind==="direct"&&this.#f.status(e).phase==="collecting"){let I=this.#f.handle(e,A,{plainText:!!A&&t.plainText!==!1&&!Pt(t)&&!bt(t)&&!Kr(t)});if(I.handled)return this.#m(t,o,I.message)}let g=t.kind==="direct"&&this.#f.status(e).phase==="collecting"?null:Yi(A)?go:bt(t)?null:pa(A)?Pa:ha(A)?co:Ea(A)?Ga:null;if(g&&(t.kind!=="group"||t.addressed===!0)){let I;return I=this.#D(t,o,e,g).finally(()=>{this.#h.delete(o),this.#C.delete(I)}),this.#C.add(I),I}let c=this.#B.claimReply({key:e,actor:a,messageId:o,text:Pt(t)||bt(t)?"":t.content,addressed:t.kind!=="group"||t.addressed===!0,hasPendingQuestion:!!i,questionCompletion:i?.submitting||i?.claimedReplyMessageId?i.queue:null,isQuestionPending:()=>this.#n.has(e),send:I=>this.#A.sendText(t.replyTarget,I)});if(c){let I;return I=c.process(async()=>this.#r.hasSeen(o)?!1:(await this.#r.markSeen(o),this.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString(),!0)).finally(()=>{this.#h.delete(o),this.#u.delete(I)}),this.#u.add(I),I}if(i&&i.actor!==a)return this.#Q(t,o,a,e);if(i?.submitting||i?.claimedReplyMessageId)return this.#Q(t,o,a,e);if(i){yQe(t,i,a)&&(i.claimedReplyMessageId=o);let d=(i.queue??Promise.resolve()).catch(()=>{}).then(()=>this.#M(t,o,a,e,i)).finally(()=>{this.#h.delete(o),i.claimedReplyMessageId===o&&(i.claimedReplyMessageId=null),i.queue===d&&(i.queue=null)});return i.queue=d,d}return this.#Q(t,o,a,e)}#m(t,o,a,{recordReceived:e=!0}={}){let i;return i=(async()=>{this.#r.hasSeen(o)||(await this.#r.markSeen(o),e&&(this.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString()),a&&await this.#A.sendText(t.replyTarget,a),this.#i.lastError=null)})().catch(async A=>{if(this.#l?.aborted){t.statusReaction?.clear();return}t.statusReaction?.error(),this.#i.lastError=A?.message??String(A);let r=rt(this.#i,A);this.#a.error?.(`[dsh-im:${this.#e.key}] failed to process a batch input message [${r.referenceId}]:`,A)}).finally(()=>{this.#h.delete(o),this.#C.delete(i)}),this.#C.add(i),i}#Q(t,o,a,e,{releaseMessageId:i=!0,alreadyRecorded:A=!1}={}){let s=(this.#d.get(e)??Promise.resolve()).catch(()=>{}).then(()=>this.#k(t,o,a,e,{alreadyRecorded:A})).finally(()=>{i&&this.#h.delete(o),this.#d.get(e)===s&&this.#d.delete(e)});return this.#d.set(e,s),s}async waitForIdle(){await Promise.allSettled([...this.#d.values(),...[...this.#n.values()].flatMap(t=>t.queue?[t.queue]:[]),...this.#u,...this.#C])}async#D(t,o,a,e){if(this.#r.hasSeen(o))return;await this.#r.markSeen(o),this.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString();let i=t.replyTarget;try{let A=await e(Ba(t.content),this.#t,this.#r,a,{signal:this.#l,isDirect:t.kind==="direct",hasImages:Pt(t),hasFiles:bt(t),pendingInteraction:this.#n.has(a)||this.#B.hasPending(a),control:{owner:this,key:a}});A?.stopped&&await Promise.allSettled([this.#R(a),this.#B.closeRoute(a)]);for(let r of A?.messages??[A?.message])r&&await this.#A.sendText(i,r);this.#i.lastError=null}catch(A){if(A?.code==="turn-stopped"||this.#l?.aborted){t.statusReaction?.clear();return}t.statusReaction?.error(),this.#i.lastError=A?.message??String(A);let r=rt(this.#i,A);this.#a.error?.(`[dsh-im:${this.#e.key}] failed to process a command [${r.referenceId}]:`,A),await this.#A.sendText(i,ut(r)).catch(()=>{})}}sendConnectionTest(t){return yc({state:this.#r,text:t,channelLabel:w("{label}\u673A\u5668\u4EBA",{label:this.#e.label}),send:(o,a)=>this.#A.sendText(o,a)})}sendProactiveText(t,o,{signal:a}={}){return a?.throwIfAborted(),this.#A.sendText(t,o)}async#E(t,o,a=[],e){let i=await Ko({artifacts:a,baseReceipt:e,deliveryId:o,channelKey:this.#e.key,signal:this.#l,sendImage:typeof this.#A.sendImage=="function"?A=>this.#A.sendImage(t,A):void 0,sendFile:typeof this.#A.sendFile=="function"?A=>this.#A.sendFile(t,A):void 0,onFailure:(A,r)=>rt(this.#i,r,{userMessage:mQe(A?.fileName,r,this.#e),reason:r?.code}),sendFailureNotice:(A,r,s)=>this.#A.sendText(t,ut(s)),logger:this.#a});return this.#i.artifactsSent=(this.#i.artifactsSent??0)+i.artifactsSent,this.#i.artifactSendErrors=(this.#i.artifactSendErrors??0)+i.artifactSendErrors,{receipt:i.receipt,userVisible:i.userVisible,artifactSendErrors:i.artifactSendErrors}}async#k(t,o,a,e,{alreadyRecorded:i=!1}={}){if(!i){if(this.#r.hasSeen(o))return;await this.#r.markSeen(o),this.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString()}let A=t.replyTarget,r=Ba(t.content),s=t.batchSubmission,g=null,c=!1;try{if(this.#l?.throwIfAborted(),t.kind==="group"&&t.addressed!==!0){this.#i.messagesRejected+=1,this.#i.lastRejectedAt=new Date().toISOString();return}let I=Pt(t),d=bt(t),B=Kr(t);if(!r&&!I&&!d&&!B){await this.#A.sendText(A,w("\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u6587\u4EF6\u6D88\u606F\u3002"));return}let f=r.toLowerCase();if(!I&&!d&&f==="/help"){await this.#A.sendText(A,[w("{label}\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002",{label:this.#e.label}),"",w("\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u3001\u56FE\u7247\u6216\u6587\u4EF6\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002"),w("/new \u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD"),w("/compact \u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587"),w("/history [\u6570\u91CF] \u67E5\u770B\u6700\u8FD1\u5386\u53F2\u6D88\u606F\uFF08\u9ED8\u8BA4 3 \u6761\uFF0C\u6700\u591A 5 \u6761\uFF09"),w("/workspace \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A"),w("/workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84"),w("/ws\u3001/wsl\u3001/workspaces \u5DE5\u4F5C\u533A\u547D\u4EE4\u522B\u540D"),w("/sessionlist \u6216 /sessions [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898"),w("/sessionlist --limit N \u4EC5\u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u524D N \u4E2A\u4F1A\u8BDD"),w("/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7 \u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD"),w("/models \u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B"),w("/reasoninglist \u6216 /reasonings \u6309\u5E8F\u53F7\u5217\u51FA\u5F53\u524D\u6A21\u578B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7"),w("/reasoning [\u5E8F\u53F7\u3001\u7B49\u7EA7ID\u6216 --default] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u63A8\u7406\u7B49\u7EA7"),w("/model [\u5E8F\u53F7\u6216\u5B8C\u6574\u6A21\u578BID] [\u63A8\u7406\u7B49\u7EA7ID] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B"),w("\u793A\u4F8B\uFF1A\u5148\u53D1 /models\uFF0C\u518D\u53D1 /model 2 [\u63A8\u7406\u7B49\u7EA7ID]"),w("/presetlist \u6216 /presets \u6309\u5E8F\u53F7\u5217\u51FA\u53EF\u7528 Agent Preset"),w("/preset [\u5E8F\u53F7\u6216\u5B8C\u6574ID] \u67E5\u770B\u6216\u8BBE\u7F6E\u5F53\u524D\u673A\u5668\u4EBA Agent Preset"),w("\u7EAF\u6570\u5B57 ID\uFF1A/preset id:"),w("/preset --default \u8DDF\u968F Host \u9ED8\u8BA4"),w("/stop \u505C\u6B62\u5F53\u524D\u4EFB\u52A1"),w("/steer \u8865\u5145\u6307\u4EE4 \u7EA0\u504F\u5F53\u524D\u4EFB\u52A1"),w("/batch \u5F00\u59CB\u6279\u91CF\u8F93\u5165\uFF08\u4EC5\u79C1\u804A\uFF0C\u6700\u591A 10 \u6761\u6587\u5B57\uFF09"),w("/send \u63D0\u4EA4\u5F53\u524D\u6279\u6B21"),w("/cancel \u53D6\u6D88\u5F53\u524D\u6279\u6B21"),w("/status \u68C0\u67E5\u8FDE\u63A5\u72B6\u6001"),w("/version \u67E5\u770B\u63D2\u4EF6\u7248\u672C"),w("/help \u663E\u793A\u672C\u5E2E\u52A9")].join(` -`));return}if(!I&&!d&&f==="/status"){await this.#t.ensureRunning({signal:this.#l}),await this.#A.sendText(A,w("{label}\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002",{label:this.#e.label}));return}let Q=!I&&!d?await Po(r,this.#t,e):null;if(Q){for(let N of Q.messages??[Q.message])await this.#A.sendText(A,N);return}if(!I&&!d&&f==="/new"){await this.#r.clearSession(e),await this.#A.sendText(A,w("\u5DF2\u5F00\u542F\u65B0\u4F1A\u8BDD\u3002\u8BF7\u53D1\u9001\u4F60\u7684\u95EE\u9898\u3002"));return}let y=!I&&!d?await va(r,this.#t,this.#r,e,{signal:this.#l}):null;if(y){await this.#A.sendText(A,y.message);return}await this.#A.sendTyping?.(A).catch(N=>{this.#a.warn?.(`[dsh-im:${this.#e.key}] typing indicator failed:`,N)});let m=!1;if(typeof this.#A.openDeliveryStream=="function")try{g=await this.#A.openDeliveryStream(A),c=!0}catch(N){this.#a.warn?.(`[dsh-im:${this.#e.key}] unable to start a semantic reply stream; using final delivery:`,N)}else if(typeof this.#A.openStream=="function")try{g=await this.#A.openStream(A)}catch(N){this.#a.warn?.(`[dsh-im:${this.#e.key}] unable to start a streamed reply; using text:`,N)}let _=I||B?await xo(t,{signal:this.#l}):void 0,T=this.#h.get(o),R=!1;if(T){let N=_??r,k=t.contextSource?.();_=Fo(N,T,()=>({channel:this.#e.key,senderId:a,senderName:k?.senderName,conversationTitle:k?.conversationTitle,chatId:k?.chatId??t.conversationId,threadId:k?.threadId})),R=_!==N}let{answer:L,artifacts:U=[]}=await ka({harness:this.#t,state:this.#r,key:e,text:r,content:_,contextEnhanced:R,createOptions:(()=>{let N=this.#c?.(t),k={};return this.#l&&(k.signal=this.#l),typeof N=="string"&&N&&(k.agentPreset=N),Object.keys(k).length>0?k:void 0})(),existsOptions:this.#l?{signal:this.#l}:void 0,askOptions:{timeoutMs:this.#s,signal:this.#l,control:{owner:this,key:e},onUpdate:g?async N=>{let k=N.type==="text"?N.text:N.type==="tool"?w("\u6B63\u5728\u4F7F\u7528{name}\u2026",{name:N.name}):N.text;if(k){let q=N.type==="text"?"markdown":"plain";await g.update(c?Es(k,q):k)}}:void 0,onInteraction:N=>this.#O(N,{key:e,actor:a,target:A,requiresMention:t.kind==="group"&&t.requiresMention!==!1}),onInteractionResolved:N=>this.#S(N),files:t.files}});s&&this.#f.complete(e,s.token);let F=!Ba(L)&&U.length>0,z=F?w(QQe):L,J=F?"plain":"markdown",K=null,G=null;if(g)try{let N=await g.finish(c?Es(z,J):z);m=!0,G=rr({deliveryId:o,presentation:N?.presentation??g.presentation??`${this.#e.key}-stream`,providerMessageIds:[...Hr(g),...Hr(N)],deliveryOutcome:N?.deliveryOutcome,reason:N?.reason})}catch(N){g.cancel?.(),this.#a.warn?.(`[dsh-im:${this.#e.key}] streamed reply finalization failed; using text:`,N)}if(!m)try{let N=typeof this.#A.sendDelivery=="function"?await this.#A.sendDelivery(A,Es(z,J)):await this.#A.sendText(A,z);G=rr({deliveryId:o,presentation:N?.presentation??`${this.#e.key}-text`,providerMessageIds:Hr(N),deliveryOutcome:N?.deliveryOutcome,reason:N?.reason})}catch(N){K=xi(N)}let V=G?.deliveryOutcome==="unknown";G?.deliveryOutcome==="failed"?K=xi(new Error(`Final text delivery failed (${G.reason??"unknown"})`),{uncertain:!1}):V&&(K=xi(new Error(`Final text delivery outcome is unknown (${G.reason??"unknown"})`)));let H=await this.#E(A,o,U,G);if(K&&(!H.userVisible||V))throw K.deliveryReceipt=H.receipt,K;return K&&H.artifactSendErrors===0&&rt(this.#i,K),H.userVisible&&(this.#i.messagesReplied+=1,this.#i.lastReplyAt=new Date().toISOString(),this.#i.lastError=null,!K&&H.artifactSendErrors===0&&No(this.#i)),H.receipt}catch(I){let d=I?.code==="turn-stopped";s&&d&&this.#f.complete(e,s.token);let B=s&&!d?this.#f.fail(e,s.token):null;if(d){if(t.statusReaction?.clear(),g)try{await g.finish(w("\u5DF2\u505C\u6B62\u3002"))}catch{g.cancel?.()}return}if(this.#l?.aborted){t.statusReaction?.clear(),g?.cancel?.();return}t.statusReaction?.error(),this.#i.lastError=I?.message??String(I);let f=async T=>{let R=typeof g?.fail=="function"?"fail":typeof g?.finish=="function"?"finish":null;if(!R)return!1;try{let L=await g[R](T);return R==="fail"?!!L&&L.deliveryOutcome!=="failed":L!==!1&&L?.deliveryOutcome!=="failed"}catch(L){return this.#a.warn?.(`[dsh-im:${this.#e.key}] unable to finalize the failed stream:`,L),!1}},Q=vo(I),y=Ho(I),m=rt(this.#i,I,{userMessage:y??Q,reason:so(I)?.reason}),_=B?.retained?`${ut(m)} +`)}function tfe(n){if(typeof n!="string"||!n)return null;if(n.startsWith("direct:")){let i=n.slice(7).trim();return i?{kind:"direct",conversationId:i,senderId:null}:null}if(!n.startsWith("group:"))return null;let t=n.slice(6),o=":user:",a=t.indexOf(o);if(a>=0){let i=t.slice(0,a).trim(),A=t.slice(a+o.length).trim();return!i||!A?null:{kind:"group",conversationId:i,senderId:A}}let e=t.trim();return e?{kind:"group",conversationId:e,senderId:null}:null}function W3(n,t){if(!t||!n||!Array.isArray(n.contacts))return"";let o=n.contacts.find(a=>a?.phone===t);return typeof o?.pushName=="string"?o.pushName.trim():""}function rfe(n,t){let o=n?.groups?.[t]?.title;return typeof o=="string"&&o.trim()?o.trim():""}function Z3(n){return wg(n)??Ni(n)}function X3(n){let t=typeof n?.channel=="string"?n.channel.trim():"",o=typeof n?.botId=="string"?n.botId.trim():"",a=typeof n?.conversationKey=="string"?n.conversationKey.trim():"";if(!t||!o||!a)return null;let e=tfe(a);if(!e)return null;let i=n.grant&&typeof n.grant=="object"?n.grant:null;if(e.kind==="direct"){let c=Z3(e.conversationId),I=W3(i,c),d=I||c||e.conversationId,B=c&&I&&I!==c?`${I} \xB7 ${c}`:d;return Object.freeze({channel:t,botId:o,kind:"direct",conversationKey:a,conversationId:e.conversationId,senderId:null,phone:c||null,pushName:I||null,groupTitle:null,label:B})}let A=rfe(i,e.conversationId)||"\u672A\u547D\u540D\u7FA4";if(!e.senderId)return Object.freeze({channel:t,botId:o,kind:"group",conversationKey:a,conversationId:e.conversationId,senderId:null,phone:null,pushName:null,groupTitle:A,label:`\u7FA4 \xB7 ${A}`});let r=Z3(e.senderId),s=W3(i,r),g=s||r||e.senderId;return Object.freeze({channel:t,botId:o,kind:"group",conversationKey:a,conversationId:e.conversationId,senderId:e.senderId,phone:r||null,pushName:s||null,groupTitle:A,label:`${A} \xB7 ${g}`})}var hiA=Object.freeze({version:1,workspaces:Object.freeze({})});function tl(n){let t=new Error(n);return t.code=Mi,t}async function vT(n){return fu(await ofe(n))}async function lfe(n,t){if(n===t)return!0;try{return await vT(n)===await vT(t)}catch{return!1}}function Rt(n){if(typeof n!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(n))throw new TypeError("Invalid bot id");return n}function Ca(n,t,o){let a=new Error(t,o);return a.code=n,a}function fy(n){if(typeof n!="string"||!/^[A-Za-z0-9._:@-]{1,128}$/.test(n))throw Ca("invalid-target","Invalid target id");return n}function dfe(n){if(!n||typeof n!="object"||Array.isArray(n))throw Ca("invalid-target","Invalid target route");try{let t=JSON.stringify(n);if(t===void 0)throw new TypeError("route is not JSON");let o=JSON.parse(t);if(!o||typeof o!="object"||Array.isArray(o))throw new TypeError("route is not an object");return o}catch(t){throw Ca("invalid-target","Invalid target route",{cause:t})}}function rl(n,{targetId:t}={}){if(!n||typeof n!="object"||Array.isArray(n))throw Ca("invalid-target","Invalid delivery target");let o=t===void 0?new Set(["targetId","name","kind","route"]):new Set(["name","kind","route"]);if(Object.keys(n).some(i=>!o.has(i)))throw Ca("invalid-target","Invalid delivery target");let a=fy(t??n.targetId);if(typeof n.kind!="string"||!/^[a-z][a-z0-9-]{0,31}$/.test(n.kind))throw Ca("invalid-target","Invalid target kind");let e;if(n.name!==void 0){if(typeof n.name!="string"||!n.name.trim()||n.name.trim().length>80)throw Ca("invalid-target","Invalid target name");e=n.name.trim()}return{targetId:a,...e===void 0?{}:{name:e},kind:n.kind,route:dfe(n.route)}}function pfe(n){let t=Object.create(null);if(n===void 0)return t;if(!n||typeof n!="object"||Array.isArray(n))return null;try{for(let[o,a]of Object.entries(n)){if(Rt(o),!a||typeof a!="object"||Array.isArray(a))return null;let e=Object.create(null);for(let[i,A]of Object.entries(a)){let r=rl(A,{targetId:i}),{targetId:s,...g}=r;e[i]=g}t[o]=e}}catch{return null}return t}function hfe(n,t){let o=Object.create(null);if(n===void 0)return o;if(!n||typeof n!="object"||Array.isArray(n)){for(let a of Object.keys(t))o[a]=null;return o}for(let[a,e]of Object.entries(n))try{Rt(a),o[a]=tp(e)}catch{}return o}function Efe(n){if(!n||![1,2].includes(n.version)||!n.workspaces||typeof n.workspaces!="object"||Array.isArray(n.workspaces))return null;let t={};for(let[g,c]of Object.entries(n.workspaces)){if(!/^[A-Za-z0-9_-]{1,128}$/.test(g)||typeof c!="string"||!Aj(c))return null;t[g]=fu(c)}let o={};if(n.agentPresets!==void 0){if(!n.agentPresets||typeof n.agentPresets!="object"||Array.isArray(n.agentPresets))return null;for(let[g,c]of Object.entries(n.agentPresets)){if(!/^[A-Za-z0-9_-]{1,128}$/.test(g))return null;try{let I=Wd(c);if(!I)return null;o[g]=I}catch{return null}}}let a={};if(n.groupSessionScopes!==void 0){if(!n.groupSessionScopes||typeof n.groupSessionScopes!="object"||Array.isArray(n.groupSessionScopes))return null;for(let[g,c]of Object.entries(n.groupSessionScopes)){if(!/^[A-Za-z0-9_-]{1,128}$/.test(g))return null;try{a[g]=sp(c)}catch{return null}}}let e=Object.create(null);if(n.contextEnhancement&&typeof n.contextEnhancement=="object"&&!Array.isArray(n.contextEnhancement))for(let[g,c]of Object.entries(n.contextEnhancement))/^[A-Za-z0-9_-]{1,128}$/.test(g)&&(e[g]=Xd(c));if(n.version===1&&n.deliveryTargets!==void 0)return null;let i=pfe(n.deliveryTargets);if(!i)return null;let A=hfe(n.accessPolicies,t),r=Object.create(null);if(n.accessGrants&&typeof n.accessGrants=="object"&&!Array.isArray(n.accessGrants))for(let[g,c]of Object.entries(n.accessGrants)){if(!/^[A-Za-z0-9_-]{1,128}$/.test(g))continue;let I=Mc(c);I&&(r[g]=I)}return{version:n.accessPolicies===void 0&&n.accessGrants===void 0?n.version:2,workspaces:t,agentPresets:o,groupSessionScopes:a,contextEnhancement:e,deliveryTargets:i,accessPolicies:A,accessGrants:r}}function ufe({version:n,workspaces:t,agentPresets:o,groupSessionScopes:a,contextEnhancement:e,deliveryTargets:i,accessPolicies:A,accessGrants:r}){let s={version:n,workspaces:t};return Object.keys(o).length>0&&(s.agentPresets=o),Object.keys(a).length>0&&(s.groupSessionScopes=a),Object.keys(e).length>0&&(s.contextEnhancement=e),n>=2&&Object.keys(i).length>0&&(s.deliveryTargets=i),n>=2&&Object.keys(A).length>0&&(s.accessPolicies=A),n>=2&&Object.keys(r).length>0&&(s.accessGrants=r),s}async function Cfe(n,t){await ife(Ife(n),{recursive:!0,mode:448});let o=`${n}.tmp`;await cfe(o,`${JSON.stringify(t,null,2)} +`,{encoding:"utf8",mode:384}),await nfe(o,n)}async function $3(n){if(typeof n!="string"||!n.trim()||!Aj(n.trim())){let a=new Error("\u5DE5\u4F5C\u533A\u5FC5\u987B\u662F\u7EDD\u5BF9\u8DEF\u5F84\u3002");throw a.code="workspace-not-absolute",a}let t=fu(n.trim()),o;try{o=await sfe(t)}catch(a){let e=new Error("\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002",{cause:a});throw e.code="workspace-not-found",e}if(!o.isDirectory()){let a=new Error("\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5FC5\u987B\u6307\u5411\u4E00\u4E2A\u76EE\u5F55\u3002");throw a.code="workspace-not-directory",a}return t}var gi=class{#e;#A;#t=1;#r={};#I={};#o={};#g={};#i=Object.create(null);#a=Object.create(null);#s=Object.create(null);#l=new Map;#c=1;#d=new Map;#n=1;#p=new Map;#h=new WeakMap;#u=new Set;#C=Promise.resolve();#B=new Map;constructor(t,{defaultWorkspace:o=process.cwd()}={}){if(typeof t!="string"||!t)throw new TypeError("workspace store path is required");this.#e=t,this.#A=fu(o)}async load(){try{let t=Efe(JSON.parse(await afe(this.#e,"utf8")));if(!t)throw new Error("dsh-im workspace config is invalid");this.#t=t.version,this.#r=t.workspaces,this.#I=t.agentPresets,this.#o=t.groupSessionScopes,this.#g=t.contextEnhancement,this.#i=t.deliveryTargets,this.#a=t.accessPolicies,this.#s=t.accessGrants}catch(t){if(t?.code!=="ENOENT")throw t;this.#t=1,this.#r={},this.#I={},this.#o={},this.#g={},this.#i=Object.create(null),this.#a=Object.create(null),this.#s=Object.create(null)}this.#l.clear(),this.#c=1,this.#d.clear(),this.#n=1,this.#p.clear(),this.#u.clear();for(let t of Object.keys(this.#r))this.#l.set(t,this.#f()),this.#d.set(t,this.#y());return this}has(t){let o=Rt(t);return Object.hasOwn(this.#r,o)&&!this.#p.has(o)}incarnationFor(t){return this.#d.get(Rt(t))??null}workspaceFor(t){return this.#r[Rt(t)]??this.#A}agentPresetFor(t){return this.#I[Rt(t)]??null}groupSessionScopeFor(t){let o=Rt(t);return this.has(o)&&Object.hasOwn(this.#o,o)?np(this.#o[o]):op}contextEnhancementFor(t){let o=Rt(t);return this.has(o)&&Object.hasOwn(this.#g,o)?this.#g[o]:cT}accessPolicyFor(t){let o=Rt(t);return this.has(o)&&Object.hasOwn(this.#a,o)?this.#a[o]:null}accessGrantFor(t){let o=Rt(t);return this.has(o)&&Object.hasOwn(this.#s,o)?this.#s[o]:null}listDeliveryTargets(t){let o=Rt(t);if(!this.has(o))throw Ca("unknown-bot","Unknown bot");return Object.entries(this.#i[o]??{}).map(([a,e])=>rl(e,{targetId:a})).sort((a,e)=>a.targetId.localeCompare(e.targetId))}deliveryTargetFor(t,o){let a=Rt(t),e=fy(o);if(!this.has(a))throw Ca("unknown-bot","Unknown bot");let i=this.#i[a]?.[e];return i?rl(i,{targetId:e}):null}async createDeliveryTarget(t,o){let a=Rt(t),e=rl(o);return this.#Q(a,async()=>{if(!this.has(a))throw Ca("unknown-bot","Unknown bot");if(Object.hasOwn(this.#i[a]??{},e.targetId))throw Ca("target-conflict","Target already exists");let{targetId:i,...A}=e,r={...this.#i,[a]:{...this.#i[a]??{},[i]:A}};return await this.#D(this.#g,r,2),this.#i=r,this.#t=2,rl(A,{targetId:i})})}async updateDeliveryTarget(t,o,a){let e=Rt(t),i=fy(o),A=rl(a,{targetId:i});return this.#Q(e,async()=>{if(!this.has(e))throw Ca("unknown-bot","Unknown bot");if(!Object.hasOwn(this.#i[e]??{},i))throw Ca("unknown-target","Unknown target");let{targetId:r,...s}=A,g={...this.#i,[e]:{...this.#i[e],[i]:s}};return await this.#D(this.#g,g,2),this.#i=g,this.#t=2,rl(s,{targetId:i})})}async deleteDeliveryTarget(t,o){let a=Rt(t),e=fy(o);return this.#Q(a,async()=>{if(!this.has(a))throw Ca("unknown-bot","Unknown bot");if(!Object.hasOwn(this.#i[a]??{},e))throw Ca("unknown-target","Unknown target");let i={...this.#i[a]};delete i[e];let A={...this.#i};return Object.keys(i).length>0?A[a]=i:delete A[a],await this.#D(this.#g,A,2),this.#i=A,this.#t=2,!0})}generationFor(t){return this.#l.get(Rt(t))??null}async whenIdle(){await this.#C}async whenBotIdle(t){let o=Rt(t);for(;;){let a=this.#B.get(o);if(!a||(await a,this.#B.get(o)===a))return}}async ensure(t,{workspace:o=this.#A,defaultAgentPreset:a,initialAccessPolicy:e}={}){let i=Rt(t),A=fu(o);return this.#Q(i,async()=>{let r=!this.#r[i],s=e!==void 0&&!Object.hasOwn(this.#a,i);if(r||s){let g=s?Oc(e):void 0,c=r?Wd(a):null,I=Object.hasOwn(this.#I,i),d=this.#I[i],B=s?{...this.#a,[i]:g}:this.#a;r&&(this.#r[i]=A,c&&(this.#I[i]=c),this.#l.set(i,this.#f()),this.#d.set(i,this.#y()));let f=s?2:this.#t;try{await this.#D(this.#g,this.#i,f,B)}catch(Q){throw r&&(delete this.#r[i],I?this.#I[i]=d:delete this.#I[i],this.#l.delete(i),this.#d.delete(i)),Q}this.#a=B,this.#t=f}else this.#l.has(i)||this.#l.set(i,this.#f());return this.#r[i]})}async setWorkspace(t,o,{clearSessions:a,incarnation:e}={}){let i=Rt(t);if(!this.has(i)||e!==void 0&&e!==this.incarnationFor(i)){let r=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw r.code="workspace-bot-not-found",r}let A=await $3(o);return this.#Q(i,async()=>{if(!this.has(i)||e!==void 0&&e!==this.incarnationFor(i)){let s=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw s.code="workspace-bot-not-found",s}if(A===this.workspaceFor(i))return A;let r=this.#r[i];this.#l.set(i,this.#f()),await a?.(),this.#r[i]=A;try{await this.#D()}catch(s){throw this.#r[i]=r,s}return A})}async setAgentPreset(t,o,{incarnation:a}={}){let e=Rt(t);if(!this.has(e)||a!==void 0&&a!==this.incarnationFor(e)){let A=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw A.code="workspace-bot-not-found",A}let i=Wd(o);return this.#Q(e,async()=>{if(!this.has(e)||a!==void 0&&a!==this.incarnationFor(e)){let r=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw r.code="workspace-bot-not-found",r}let A=this.#I[e]??null;if(A===i)return i;i?this.#I[e]=i:delete this.#I[e];try{await this.#D()}catch(r){throw A?this.#I[e]=A:delete this.#I[e],r}return i})}async setGroupSessionScope(t,o,{incarnation:a}={}){let e=Rt(t);if(!this.has(e)||a!==void 0&&a!==this.incarnationFor(e)){let A=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw A.code="workspace-bot-not-found",A}let i=sp(o);return this.#Q(e,async()=>{if(!this.has(e)||a!==void 0&&a!==this.incarnationFor(e)){let r=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw r.code="workspace-bot-not-found",r}let A=Object.hasOwn(this.#o,e)?this.#o[e]:void 0;if(A===i)return i;this.#o[e]=i;try{await this.#D()}catch(r){throw A===void 0?delete this.#o[e]:this.#o[e]=A,r}return i})}async setContextEnhancement(t,o,{incarnation:a}={}){let e=Rt(t),i=a===void 0?this.incarnationFor(e):a,A=el(o);return this.#Q(e,async()=>{if(!this.has(e)||i!==this.incarnationFor(e)){let s=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw s.code="workspace-bot-not-found",s}let r={...this.#g,[e]:A};return await this.#D(r),this.#g=r,A})}async setAccessPolicy(t,o,{incarnation:a}={}){let e=Rt(t),i=a===void 0?this.incarnationFor(e):a,A=Oc(o);return this.#Q(e,async()=>{if(!this.has(e)||i!==this.incarnationFor(e)){let s=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw s.code="workspace-bot-not-found",s}let r={...this.#a,[e]:A};return await this.#D(this.#g,this.#i,2,r),this.#a=r,this.#t=2,A})}async setAccessGrant(t,o,{incarnation:a}={}){let e=Rt(t);if(!this.has(e)||a!==void 0&&a!==this.incarnationFor(e)){let A=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw A.code="workspace-bot-not-found",A}let i=Yr(o);return this.#Q(e,async()=>{if(!this.has(e)||a!==void 0&&a!==this.incarnationFor(e)){let r=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw r.code="workspace-bot-not-found",r}let A=this.#s[e]??null;this.#s[e]=i;try{await this.#D()}catch(r){throw A?this.#s[e]=A:delete this.#s[e],r}return i})}async bindWorkspaceSession(t,o,{conversationKey:a,sessionId:e,clearSessions:i,setSession:A,incarnation:r,expectedGeneration:s}={}){let g=Rt(t);if(typeof a!="string"||!a||typeof e!="string"||!e)throw new TypeError("conversationKey and sessionId are required");if(typeof i!="function"||typeof A!="function")throw new TypeError("session state callbacks are required");if(!this.has(g)||r!==void 0&&r!==this.incarnationFor(g)){let I=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw I.code="workspace-bot-not-found",I}let c=await vT(await $3(o));return this.#Q(g,async()=>{if(!this.has(g)||r!==void 0&&r!==this.incarnationFor(g)){let I=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw I.code="workspace-bot-not-found",I}if(s!==void 0&&s!==this.generationFor(g))throw tl("The bot workspace changed before the session binding could be committed.");if(!await lfe(c,this.workspaceFor(g))){let I=this.#r[g];this.#l.set(g,this.#f()),await i(),this.#r[g]=c;try{await this.#D()}catch(d){throw this.#r[g]=I,d}}return await A(a,e),{workspace:c,sessionId:e,generation:this.#l.get(g)}})}async invalidateSessions(t,{clearSessions:o}={}){let a=Rt(t);return this.#Q(a,async()=>{this.#l.set(a,this.#f()),await o?.()})}async beginRemoval(t,{clearSessions:o}={}){let a=Rt(t);return this.#Q(a,async()=>{let e=this.#p.get(a);if(e)return e;let i=Object.freeze({});this.#p.set(a,i),this.#h.set(i,{botId:a,incarnation:this.incarnationFor(a)}),this.#l.set(a,this.#f());try{await o?.()}catch(A){throw this.#p.get(a)===i&&this.#p.delete(a),A}return i})}async abortRemoval(t){let{botId:o}=this.#w(t);return this.#Q(o,async()=>this.#p.get(o)!==t?!1:(this.#p.delete(o),Object.hasOwn(this.#r,o)&&(this.#l.set(o,this.#f()),this.#d.has(o)||this.#d.set(o,this.#y())),!0))}async finishRemoval(t){let{botId:o,incarnation:a}=this.#w(t);return this.#Q(o,async()=>this.#p.get(o)!==t?{removed:!1,persisted:!0,error:null,stale:!0}:this.incarnationFor(o)!==a?(this.#p.delete(o),{removed:!1,persisted:!0,error:null,stale:!0}):(this.#p.delete(o),this.#m(o)))}async retireAfterConfigCommit(t){let o=Rt(t);return this.#Q(o,async()=>(this.#p.delete(o),this.#m(o)))}flushPendingRemoval(t){if(this.#u.has(t))return this.#Q(t,async()=>{this.#u.has(t)&&await this.#E()})}async remove(t){let o=await this.retireAfterConfigCommit(t);if(o.error)throw o.error;return o.removed}async reconcile(t){let o=new Set([...t].map(Rt)),a=new Set([...Object.keys(this.#r),...Object.keys(this.#I),...Object.keys(this.#o),...Object.keys(this.#g),...Object.keys(this.#i),...Object.keys(this.#a),...Object.keys(this.#s),...this.#u]);for(let e of a)o.has(e)||await this.remove(e)}decorateStatus(t){return!t||typeof t!="object"||!Array.isArray(t.bots)?t:{...t,bots:t.bots.map(o=>o?.botId?{...o,workspace:this.workspaceFor(o.botId),agentPreset:this.agentPresetFor(o.botId),groupSessionScope:this.groupSessionScopeFor(o.botId),contextEnhancement:this.contextEnhancementFor(o.botId),accessPolicy:this.accessPolicyFor(o.botId),accessGrant:this.accessGrantFor(o.botId)}:o)}}#f(){let t=this.#c;return this.#c+=1,t}#y(){let t=this.#n;return this.#n+=1,t}#w(t){if(!t||typeof t!="object")throw new TypeError("Invalid workspace removal transaction");let o=this.#h.get(t);if(!o)throw new TypeError("Invalid workspace removal transaction");return o}async#m(t){let o=Object.hasOwn(this.#r,t),a=Object.hasOwn(this.#I,t),e=Object.hasOwn(this.#o,t),i=Object.hasOwn(this.#g,t),A=Object.hasOwn(this.#i,t),r=Object.hasOwn(this.#a,t),s=Object.hasOwn(this.#s,t),g=o||a||e||i||A||r||s||this.#u.has(t);if(delete this.#r[t],delete this.#I[t],delete this.#o[t],delete this.#g[t],delete this.#i[t],delete this.#a[t],delete this.#s[t],this.#l.delete(t),this.#d.delete(t),!g)return{removed:!1,persisted:!0,error:null,stale:!1};try{return await this.#E(),{removed:o,persisted:!0,error:null,stale:!1}}catch(c){return this.#u.add(t),{removed:o,persisted:!1,error:c,stale:!1}}}async#Q(t,o){let a=this.#C.then(o,o),e=a.then(()=>{},()=>{});return this.#C=e,this.#B.set(t,e),e.finally(()=>{this.#B.get(t)===e&&this.#B.delete(t)}),a}async#D(t=this.#g,o=this.#i,a=this.#t,e=this.#a){await Cfe(this.#e,ufe({version:a,workspaces:this.#r,agentPresets:this.#I,groupSessionScopes:this.#o,contextEnhancement:t,deliveryTargets:o,accessPolicies:e,accessGrants:this.#s})),this.#u.clear()}async#E(){if(Object.keys(this.#r).length>0||Object.keys(this.#I).length>0||Object.keys(this.#o).length>0||Object.keys(this.#g).length>0||Object.keys(this.#i).length>0||Object.keys(this.#a).length>0||Object.keys(this.#s).length>0){await this.#D();return}try{await gfe(this.#e),this.#u.clear()}catch(t){if(t?.code!=="ENOENT")throw t;this.#u.clear()}}};function _c(n){if(!n)return null;let t=typeof n=="function"?n():n;return t&&typeof t.then=="function"?t.then(ds):ds(t)}function tj(){let n=new Error("Agent Preset \u4E0D\u5B58\u5728\u6216\u4E0D\u53EF\u7528\u3002");return n.code="agent-preset-unavailable",n}function gp(n){if(n())return;let t=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw t.code="workspace-bot-not-found",t}function ej(n,t,o){let a=e=>{let i=n.decorateStatus(e);if(!o||!i||typeof i!="object")return i;let A=s=>s?{...i,agentPresetCatalog:s}:i,r=_c(o);return r&&typeof r.then=="function"?r.then(A):A(r)};return t&&typeof t.then=="function"?t.then(a):a(t)}function Bfe(n){return Promise.resolve(n.status())}function qi(n,{workspaces:t,method:o="remove",botIdFromRemoved:a=A=>A?.botId,saveMethod:e="save",botIdFromSave:i=A=>A?.botId}){if(!n||!t||typeof n[o]!="function")throw new TypeError("configStore removal observer dependencies are required");return new Proxy(n,{get(A,r){let s=Reflect.get(A,r,A);return r===o?async(...g)=>{let c=await s.apply(A,g),I=c?a(c,g):null;return I&&await t.retireAfterConfigCommit(I),c}:r===e&&typeof s=="function"?(...g)=>{let c=t.flushPendingRemoval(i(g[0],g));return c?c.then(()=>s.apply(A,g)):s.apply(A,g)}:typeof s=="function"?s.bind(A):s}})}function zi(n,{botId:t,workspaces:o,state:a,agentPresetCatalog:e}={}){if(!n||!o||!a)throw new TypeError("harness, workspaces, and state are required");let i=o.incarnationFor(t),A=()=>o.has(t)&&o.incarnationFor(t)===i,r=async(I=e)=>{let d;try{d=await _c(I)??ds(null)}catch(B){throw gp(A),B}return gp(A),{agentPreset:o.agentPresetFor(t),agentPresetCatalog:d}},s=new Map,g=new Proxy(n,{get(I,d){if(d==="agentPresetSettings")return async(f={})=>{f?.signal?.throwIfAborted(),gp(A);let Q=await r();return f?.signal?.throwIfAborted(),Q};if(d==="updateAgentPreset")return async(f,Q={})=>{Q?.signal?.throwIfAborted(),gp(A);let y=f==="--default"?null:Wd(f),m=null;if(y&&({agentPresetCatalog:m}=await r(),Q?.signal?.throwIfAborted(),!m.items.some(_=>_.id===y)))throw tj();if(await o.setAgentPreset(t,y,{incarnation:i}),gp(A),m)return{agentPreset:o.agentPresetFor(t),agentPresetCatalog:m};try{return await r()}catch(_){if(_?.code==="workspace-bot-not-found")throw _;return gp(A),{agentPreset:o.agentPresetFor(t),agentPresetCatalog:ds(null)}}};if(d==="currentWorkspace")return()=>{if(!A()){let f=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw f.code="workspace-bot-not-found",f}return o.workspaceFor(t)};if(d==="assertWorkspaceScope")return()=>{if(!A()){let f=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw f.code="workspace-bot-not-found",f}};if((d==="listWorkspaces"||d==="listWorkspaceSessions"||d==="listModels")&&typeof I[d]=="function")return async(...f)=>{if(!A()){let y=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw y.code="workspace-bot-not-found",y}let Q=await I[d](...f);if(!A()){let y=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw y.code="workspace-bot-not-found",y}return Q};if(d==="switchWorkspace")return f=>{if(!A()){let Q=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");return Q.code="workspace-bot-not-found",Promise.reject(Q)}return o.setWorkspace(t,f,{clearSessions:()=>a.clearSessions(),incarnation:i})};if(d==="bindWorkspaceSession")return async(f,Q)=>{if(typeof f!="string"||!f||typeof Q!="string"||!Q)throw new TypeError("conversationKey and sessionId are required");if(!A()){let T=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw T.code="workspace-bot-not-found",T}if(typeof I.adoptWorkspaceSession!="function")throw new TypeError("Harness does not support adopting workspace sessions");let y=o.generationFor(t),m=await I.adoptWorkspaceSession(Q);if(!A()){let T=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw T.code="workspace-bot-not-found",T}if(y!==o.generationFor(t))throw tl("The bot workspace changed while the session was being adopted.");if(!m||typeof m!="object"||m.sessionId!==Q||typeof m.workspace!="string")throw new TypeError("Harness returned an invalid adopted workspace session");let _=await o.bindWorkspaceSession(t,m.workspace,{conversationKey:f,sessionId:Q,clearSessions:()=>a.clearSessions(),setSession:(T,R)=>a.setSession(T,R),incarnation:i,expectedGeneration:y});if(!A()){let T=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw T.code="workspace-bot-not-found",T}if(_.generation!==o.generationFor(t))throw tl("The bot workspace changed before the session binding completed.");return s.set(Q,_.generation),{...m,workspace:_.workspace,sessionId:_.sessionId}};if(d==="createSession")return async(f={})=>{if(await o.whenBotIdle(t),!A()){let R=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw R.code="workspace-bot-not-found",R}let Q=o.generationFor(t),{agentPreset:y,...m}=f??{},_=y!==void 0?y:o.agentPresetFor(t),T=await I.createSession({...m,workspace:o.workspaceFor(t),..._==null?{}:{agentPreset:_}});return s.set(T,Q),T};if(d==="workspaceSession")return f=>{if(typeof f!="string"||!f)throw new TypeError("sessionId is required");let Q=s.get(f)??o.generationFor(t);s.delete(f);let y=()=>A()&&Q===o.generationFor(t),m=async(T,R,L)=>{if(!y())throw tl(`The bot workspace changed before this ${L} started.`);let U=await I[T](f,...R);if(!y())throw tl(`The bot workspace changed while this ${L} was running.`);return U},_=async(T,R,L)=>{if(!y())throw tl(`The bot workspace changed before this ${L} started.`);return I[T](f,...R)};return Object.freeze({sessionId:f,async sessionExists(...T){if(!y())return!1;let R=await I.sessionExists(f,...T);return y()&&R},models(...T){return m("getSessionModels",T,"model listing")},readHistory(...T){return m("readSessionHistory",T,"history read")},...typeof I.renameSession=="function"?{renameTitle(...T){return _("renameSession",T,"title rename")}}:{},selectModel(...T){return m("selectSessionModel",T,"model selection")},isRunning(...T){return m("isSessionRunning",T,"run-state check")},hasActiveTurn(...T){return m("hasActiveTurn",T,"turn ownership check")},stopActiveTurn(...T){return _("stopActiveTurn",T,"turn stop")},steerActiveTurn(...T){return _("steerActiveTurn",T,"turn steering")},ask(...T){if(!y())throw tl("The bot workspace changed before this prompt started.");return I.ask(f,...T)}})};if(d==="sessionExists")return(f,...Q)=>{if(!A())return!1;let y=s.get(f);return y!==void 0&&y!==o.generationFor(t)?(s.delete(f),!1):I.sessionExists(f,...Q)};if(d==="ask")return(f,...Q)=>{let y=s.get(f);if(s.delete(f),!A()||y!==void 0&&y!==o.generationFor(t)){let m=new Error("The bot workspace changed before this prompt started.");throw m.code=Mi,m}return I.ask(f,...Q)};if(d==="executeCommand"&&typeof I.executeCommand=="function")return(f,...Q)=>{let y=s.get(f);if(s.delete(f),!A()||y!==void 0&&y!==o.generationFor(t)){let m=new Error("The bot workspace changed before this command started.");throw m.code=Mi,m}return I.executeCommand(f,...Q)};let B=Reflect.get(I,d,I);return typeof B=="function"?B.bind(I):B}}),c=new Proxy(a,{get(I,d){if(d===__)return I;if(d==="sessionFor")return(f,...Q)=>{if(!A())return null;let y=I.sessionFor(f,...Q);return y&&!s.has(y)&&s.set(y,o.generationFor(t)),y};if(d==="setSession")return(f,Q,...y)=>{let m=s.get(Q);return!A()||m!==void 0&&m!==o.generationFor(t)?(s.delete(Q),!1):I.setSession(f,Q,...y)};let B=Reflect.get(I,d,I);return typeof B=="function"?B.bind(I):B}});return Object.freeze({harness:g,state:c})}function Vi(n,{workspaces:t,stateFor:o,agentPresetCatalog:a,channel:e=null}={}){if(!n||!t||typeof o!="function")throw new TypeError("controller, workspaces, and stateFor are required");let i=typeof e=="string"&&e.trim()?e.trim():null,A=new Map,r=(_,T)=>{let L=(A.get(_)??Promise.resolve()).catch(()=>{}).then(T);return A.set(_,L),L.finally(()=>{A.get(_)===L&&A.delete(_)})},s=_=>ej(t,_,a),g=(_,T)=>{let R=t.incarnationFor(_);return r(_,async()=>{if(!(await n.status())?.bots?.some(F=>F?.botId===_)){let F=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw F.code="workspace-bot-not-found",F}let U=await o(_);return await t.setWorkspace(_,T,{clearSessions:()=>U.clearSessions(),incarnation:R}),s(await n.status())})},c=(_,T)=>{let R=t.incarnationFor(_),L=Wd(T);return r(_,async()=>{if(!(await n.status())?.bots?.some(J=>J?.botId===_)){let J=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw J.code="workspace-bot-not-found",J}let F=L&&a?await _c(a):null;if(L&&a&&!F?.items.some(J=>J.id===L))throw tj();return await t.setAgentPreset(_,L,{incarnation:R}),ej(t,await n.status(),F??a)})},I=(_,T,R)=>{let L=t.incarnationFor(_),U=el(T);return r(_,async()=>{let F=await n.status();if(!F?.bots?.some(q=>q?.botId===_)){let q=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw q.code="workspace-bot-not-found",q}let J=await _c(a),V=t.decorateStatus(F),H={...V,bots:V.bots.map(q=>q?.botId===_?{...q,contextEnhancement:U}:q),...J?{agentPresetCatalog:J}:{}},G=R?await R(H):H;return await t.setContextEnhancement(_,U,{incarnation:L}),G})},d=(_,T,R)=>{let L=t.incarnationFor(_),U=Oc(T);return r(_,async()=>{let F=await n.status();if(!F?.bots?.some(q=>q?.botId===_)){let q=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw q.code="workspace-bot-not-found",q}let J=await _c(a),V=t.decorateStatus(F),H={...V,bots:V.bots.map(q=>q?.botId===_?{...q,accessPolicy:U}:q),...J?{agentPresetCatalog:J}:{}},G=R?await R(H):H;return await t.setAccessPolicy(_,U,{incarnation:L}),G})},B=(_,T,R)=>{let L=t.incarnationFor(_),U=sp(T);return r(_,async()=>{let F=await n.status();if(!F?.bots?.some(q=>q?.botId===_)){let q=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw q.code="workspace-bot-not-found",q}let J=await _c(a),V=t.decorateStatus(F),H={...V,bots:V.bots.map(q=>q?.botId===_?{...q,groupSessionScope:U}:q),...J?{agentPresetCatalog:J}:{}},G=R?await R(H):H;return await t.setGroupSessionScope(_,U,{incarnation:L}),G})},f=(_,T,R)=>{let L=t.incarnationFor(_),U=Yr(T);return r(_,async()=>{let F=await n.status();if(!F?.bots?.some(q=>q?.botId===_)){let q=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw q.code="workspace-bot-not-found",q}let J=await _c(a),V=t.decorateStatus(F),H={...V,bots:V.bots.map(q=>q?.botId===_?{...q,accessGrant:U}:q),...J?{agentPresetCatalog:J}:{}},G=R?await R(H):H;return await t.setAccessGrant(_,U,{incarnation:L}),G})},Q=(_,T,R)=>{let L=t.incarnationFor(_);return r(_,async()=>{let U=t.accessGrantFor(_)??Bs(),{grant:F,pending:J}=By(U,T),V=await n.status();if(!V?.bots?.some(N=>N?.botId===_)){let N=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw N.code="workspace-bot-not-found",N}let H=await _c(a),G=t.decorateStatus(V),q={...G,bots:G.bots.map(N=>N?.botId===_?{...N,accessGrant:F}:N),...H?{agentPresetCatalog:H}:{},resolvedPending:J},K=R?await R(q):q;return await t.setAccessGrant(_,F,{incarnation:L}),K})},y=(_,T)=>r(_,async()=>{let R=await t.beginRemoval(_,{clearSessions:async()=>{try{let L=await o(_);if(!L||typeof L.clearSessions!="function")throw new TypeError("bot state does not support session cleanup");await L.clearSessions()}catch(L){console.warn(`[dsh-im] ignored session cleanup failure while deleting bot ${_}:`,L?.message??L)}}});try{let L=await T();return await t.finishRemoval(R),s(L)}catch(L){let U=await Bfe(n).catch(()=>null);throw Array.isArray(U?.bots)&&!U.bots.some(J=>J?.botId===_)?await t.finishRemoval(R):await t.abortRemoval(R),L}}),m=async _=>{if(!i)return null;let T=typeof _=="string"?_.trim():"";if(!T||T.length>256)return null;let R=await n.status(),L=Array.isArray(R?.bots)?R.bots:[];for(let U of L){let F=typeof U?.botId=="string"?U.botId.trim():"";if(!F)continue;let J;try{J=await o(F)}catch{continue}let V=typeof J?.keyForSession=="function"?J.keyForSession(T):null;if(V)return X3({channel:i,botId:F,conversationKey:V,grant:t.accessGrantFor(F)})}return null};return new Proxy(n,{get(_,T){if(T==="updateWorkspace")return g;if(T==="updateAgentPreset")return c;if(T==="updateContextEnhancement")return I;if(T==="updateAccessPolicy")return d;if(T==="updateGroupSessionScope")return B;if(T==="updateAccessGrant")return f;if(T==="resolveAccessPending")return Q;if(T==="resolveChannelPeer")return m;let R=Reflect.get(_,T,_);return typeof R!="function"?R:T==="deleteBot"?(L,...U)=>y(L,()=>R.call(_,L,...U)):T==="disconnect"?async(...L)=>{let F=(await _.status())?.bots?.[0]?.botId;return F?y(F,()=>R.apply(_,L)):s(R.apply(_,L))}:(...L)=>s(R.apply(_,L))}})}var rj=new Set(["weixin","feishu","dingtalk","wecom","qq","slack","telegram","discord","whatsapp"]);function ffe(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function Qfe(n){return typeof n=="string"&&n.length>0&&n.length<=512&&n.trim()===n&&!/[\s:\u0000-\u001f\u007f]/u.test(n)}function PT(n,t){let o=`${t}:`;if(!n.startsWith(o))return null;let a=n.slice(o.length);return Qfe(a)?a:null}function Qu(n,t){for(let[o,a,e]of t){let i=PT(n,o);if(i)return{kind:a,route:{[e]:i}}}return null}function yfe(n){let t=PT(n,"p2p");return t?.startsWith("ou_")?{kind:"user",route:{openId:t}}:Qu(n,[["group","group","chatId"]])}function mfe(n){let t=PT(n,"direct");if(t&&/^[A-Za-z0-9_-]{1,128}$/.test(t))return{kind:"conversation",route:{channelId:t}};let o=/^group:([^:]+):(\d{1,20}(?:\.\d{1,20})?)$/.exec(n);return!o||!/^[A-Za-z0-9_-]{1,128}$/.test(o[1])?null:{kind:"thread",route:{channelId:o[1],threadTs:o[2]}}}function Sfe(n){let t=/^(direct|group):(-?\d+)(?::([1-9]\d*))?$/.exec(n);if(!t)return null;let o=Number(t[2]);if(!Number.isSafeInteger(o)||t[1]==="direct"&&t[3]!==void 0)return null;if(t[3]===void 0)return{kind:"chat",route:{chatId:t[2]}};let a=Number(t[3]);return!Number.isSafeInteger(a)||a<=0?null:{kind:"topic",route:{chatId:t[2],messageThreadId:a}}}function wfe(n){let t=/^(?:direct|group):(\d{1,32})$/.exec(n);return t?{kind:"channel",route:{channelId:t[1]}}:null}function Dfe(n){let t=/^direct:(\d{5,32}@(s\.whatsapp\.net|lid))$/.exec(n);if(t)return{kind:"user",route:{jid:t[1]}};let o=/^group:(\d{5,32}(?:-\d{1,32})?@g\.us)$/.exec(n);return o?{kind:"group",route:{jid:o[1]}}:null}function Ofe(n,t){if(!rj.has(n)||typeof t!="string")return null;switch(n){case"weixin":return Qu(t,[["p2p","user","toUserId"]]);case"feishu":return yfe(t);case"dingtalk":return Qu(t,[["p2p","user","userId"],["group","group","openConversationId"]]);case"wecom":return Qu(t,[["direct","user","chatId"],["group","group","chatId"]]);case"qq":return Qu(t,[["c2c","user","userOpenId"],["group","group","groupOpenId"]]);case"slack":return mfe(t);case"telegram":return Sfe(t);case"discord":return wfe(t);case"whatsapp":return Dfe(t);default:return null}}function ij(n,t){if(!rj.has(n)||!ffe(t))return[];let o=[],a=new Set;for(let e of Object.keys(t)){let i=Ofe(n,e);if(!i)continue;let A=JSON.stringify(i);a.has(A)||(a.add(A),o.push(i))}return o}var bfe=new Set(["weixin","feishu","dingtalk","wecom","qq","slack","telegram","discord","whatsapp"]);function yy(n){return bfe.has(n)}function Nc(n){let t=new Error(n);return t.code="invalid-target",t}function Mfe(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function GT(n,t,o){if(!Mfe(n))throw Nc(`${o} must be an object`);if(Object.keys(n).find(e=>!t.includes(e))!==void 0)throw Nc(`${o} contains an unknown field`)}function Qy(n,t){if(typeof n!="string"||!n||n.trim()!==n)throw Nc(`${t} must be a non-empty string without surrounding whitespace`);return n}function _fe(n){if(typeof n!="string"||!n.trim()||n.trim().length>80)throw Nc("target.name must contain 1 to 80 characters");return n.trim()}function Tc(n,t){GT(n,t,"route");let o={};for(let a of t)o[a]=Qy(n[a],`route.${a}`);return o}function Dg(n,t){if(!t.includes(n))throw Nc("target kind is not supported by this channel");return n}function Tfe(n,t,o){switch(n){case"weixin":return Dg(t,["user"]),Tc(o,["toUserId"]);case"feishu":return Dg(t,["user","group"]),Tc(o,t==="user"?["openId"]:["chatId"]);case"dingtalk":return Dg(t,["user","group"]),Tc(o,t==="user"?["userId"]:["openConversationId"]);case"wecom":return Dg(t,["user","group"]),Tc(o,["chatId"]);case"qq":return Dg(t,["user","group"]),Tc(o,t==="user"?["userOpenId"]:["groupOpenId"]);case"slack":return Dg(t,["conversation","thread"]),Tc(o,t==="conversation"?["channelId"]:["channelId","threadTs"]);case"telegram":{Dg(t,["chat","topic"]),GT(o,t==="chat"?["chatId"]:["chatId","messageThreadId"],"route");let a=Qy(o.chatId,"route.chatId");if(!/^-?\d+$/.test(a))throw Nc("route.chatId must be a decimal string");if(t==="chat")return{chatId:a};if(!Number.isSafeInteger(o.messageThreadId)||o.messageThreadId<=0)throw Nc("route.messageThreadId must be a positive integer");return{chatId:a,messageThreadId:o.messageThreadId}}case"discord":return Dg(t,["channel"]),Tc(o,["channelId"]);case"whatsapp":{Dg(t,["user","group"]);let a=Tc(o,["jid"]);if(!(t==="user"?/^\d{5,32}@(s\.whatsapp\.net|lid)$/.test(a.jid):/^\d{5,32}(?:-\d{1,32})?@g\.us$/.test(a.jid)))throw Nc(`route.jid must be a ${t} WhatsApp JID`);return a}default:throw new TypeError(`Unsupported delivery channel: ${n}`)}}function cp(n,t,{targetIdRequired:o=!0}={}){if(!yy(n))throw new TypeError(`Unsupported delivery channel: ${n}`);GT(t,o?["targetId","name","kind","route"]:["name","kind","route"],"target");let a={};return o&&(a.targetId=Qy(t.targetId,"target.targetId")),t.name!==void 0&&(a.name=_fe(t.name)),a.kind=Qy(t.kind,"target.kind"),a.route=Tfe(n,a.kind,t.route),a}function Wi({channel:n,workspaces:t,coreController:o,stateFor:a}){if(!yy(n))throw new TypeError(`Unsupported delivery channel: ${n}`);if(!t||typeof t!="object")throw new TypeError("delivery adapter requires a workspace store");if(!o||typeof o!="object")throw new TypeError("delivery adapter requires a proactive text controller");if(typeof a!="function")throw new TypeError("delivery adapter requires a bot state getter");return Object.freeze({channel:n,ownsBot:e=>t.has(e),listTargets:e=>t.listDeliveryTargets(e),async listSuggestions(e){let i=await a(e);if(!i||typeof i.snapshot!="function")throw new TypeError("delivery suggestion state cannot be inspected");return ij(n,i.snapshot()?.sessions).map(r=>cp(n,r,{targetIdRequired:!1}))},createTarget:(e,i)=>t.createDeliveryTarget(e,cp(n,i)),updateTarget:(e,i,A)=>t.updateDeliveryTarget(e,i,cp(n,A,{targetIdRequired:!1})),deleteTarget:(e,i)=>t.deleteDeliveryTarget(e,i),async sendText(e,i,A,r={}){let s=cp(n,i);if(typeof o.sendProactiveText!="function")throw new TypeError("delivery controller cannot send proactive text");return await o.sendProactiveText(e,s,A,r),{sent:!0}}})}var aj=Object.freeze([250,1e3,3e3,5e3,1e4,3e4]);function Nfe(n){if(!Array.isArray(n)||n.length===0)return[...aj];let t=n.filter(o=>Number.isFinite(o)&&o>=0);return t.length>0?t:[...aj]}var my=class{#e;#A;#t;#r;#I;#o;#g;#i=null;#a=null;#s=0;#l=!1;#c=!1;#d;#n;constructor({controller:t,harness:o,logger:a=console,retryDelaysMs:e,healthyIntervalMs:i=15e3,setTimeoutImpl:A=setTimeout,clearTimeoutImpl:r=clearTimeout}){if(!t||typeof t.initialize!="function"||typeof t.status!="function")throw new TypeError("ConnectionSupervisor requires a controller");if(!o||typeof o.ensureRunning!="function")throw new TypeError("ConnectionSupervisor requires a Harness client");this.#e=t,this.#A=o,this.#t=a,this.#r=Nfe(e),this.#I=Number.isFinite(i)&&i>=0?i:15e3,this.#o=A,this.#g=r,this.#d=new Promise(s=>{this.#n=s})}get ready(){return this.#d}start(){return this.#c||this.#l?this:(this.#c=!0,this.#p(0),this)}async close(){this.#l||(this.#l=!0,this.#i!==null&&this.#g(this.#i),this.#i=null,await this.#a?.catch(()=>{}),this.#n?.(null),this.#n=null)}#p(t){this.#l||(this.#i=this.#o(()=>{this.#i=null,this.#h()},t),this.#i?.unref?.())}async#h(){if(this.#l||this.#a)return;let t=this.#u();this.#a=t;try{await t}finally{this.#a===t&&(this.#a=null)}}async#u(){try{if(await this.#A.ensureRunning(),this.#l)return;let t=await this.#e.initialize();if(this.#l)return;this.#n?.(t),this.#n=null;let{configured:o,connected:a}=t.totals;if(a{let A={namespace:"commands",method:"execute",args:{agentId:a,line:e,images:[]},signal:i.signal};try{return await o.invoke(A)}catch(r){if(r?.name!=="TypertGatewayError"||r.code!=="arguments-invalid"||r.endpoint!=="commands/execute"||r.message!=='typert gateway: commands/execute: args fields do not match the descriptor: unexpected "images"')throw r;return i.signal?.throwIfAborted(),o.invoke({...A,args:{agentId:a,line:e}})}}}}import{randomUUID as LT}from"node:crypto";var Sy=new WeakMap;function Rfe(n){let t=n?.failure;return t&&typeof t=="object"&&typeof t.code=="string"&&typeof t.message=="string"?{code:t.code,message:t.message,details:t.details&&typeof t.details=="object"?t.details:{}}:n?.name==="AbortError"||n?.name==="RemoteInvocationCancelled"?{code:"cancelled",message:n instanceof Error?n.message:"Harness request was cancelled",details:{}}:{code:"internal",message:n instanceof Error?n.message:String(n),details:{}}}function Yo(n,t){return Promise.resolve().then(t).then(o=>({rpcId:n.rpcId,result:{ok:!0,value:o}}),o=>({rpcId:n.rpcId,result:{ok:!1,error:Rfe(o)}}))}function oj(n,t,o,a){return{namespace:n,method:t,args:o,...a===void 0?{}:{signal:a}}}function wy(n,t){let o=new Error(n);return o.name="UserQuestionError",o.code=t,o}function kfe(n){if(typeof n?.snapshotEvents=="function"){let o=n.snapshotEvents();if(Array.isArray(o))return o}let t=n?.events;return Array.isArray(t)?t:null}function vfe(n,t){return!n||typeof n!="object"||n.sessionId!==t.sessionId||!n.answer||typeof n.answer!="object"||!Array.isArray(n.answer.answers)||n.answer.answers.length!==t.questions.length?!1:n.answer.answers.every((o,a)=>{let e=t.questions[a];if(!o||typeof o!="object"||o.id!==e.id||!Array.isArray(o.selected)||o.selected.some(r=>typeof r!="string")||new Set(o.selected).size!==o.selected.length||o.custom!==void 0&&typeof o.custom!="string")return!1;let i=o.custom?.trim();if(i!==void 0&&!i||e.multiSelect!==!0&&(i!==void 0&&o.selected.length>0||o.selected.length>1))return!1;let A=new Set(e.options?.map(r=>r.label)??[]);return o.selected.every(r=>A.has(r))})}function Pfe(n){if(n?.type==="event"&&n.event&&typeof n.event=="object")return[{event:n.event}];let t=n?.type==="chunks"?n.event:null;if(!t||typeof t!="object")throw new Error("Harness returned an invalid session history record");let{data:o}=t,a=t.type,e=a==="chunkrow/tool-call-chunks"?o?.args:o?.texts;if(!o||!Array.isArray(e)||e.length===0||e.some(A=>typeof A!="string")||!Array.isArray(o.dt)||o.dt.length!==e.length-1)throw new Error("Harness returned an invalid packed session chunk");let i=t.time;return e.map((A,r)=>{r>0&&(i+=o.dt[r-1]);let s;if(a==="chunkrow/text-chunks")s={type:"text-delta",index:o.index,text:A};else if(a==="chunkrow/reasoning-chunks")s={type:"reasoning-delta",index:o.index,text:A};else if(a==="chunkrow/tool-call-chunks")s={type:"tool-call-delta",index:o.index,id:o.id,...Object.hasOwn(o,"name")?{name:o.name}:{},argumentsDelta:A};else throw new Error(`Harness returned an unsupported packed session chunk: ${String(a)}`);return{event:{type:"assistant/chunk",seq:t.seq+r,time:i,data:{turn:o.turn,step:o.step,chunk:s}}}})}function nj(n){if(!Array.isArray(n))throw new Error("Harness returned invalid session history records");return n.flatMap(Pfe)}var UT=class{#e=[];#A=null;#t=!1;#r;#I;#o;constructor(t,o){this.#r=t,this.#o=o,this.#I=()=>this.close(),t?.addEventListener("abort",this.#I,{once:!0}),t?.aborted&&this.close()}push(t){if(!this.#t)if(this.#A){let o=this.#A;this.#A=null,o({value:t,done:!1})}else this.#e.push(t)}next(){return this.#e.length>0?Promise.resolve({value:this.#e.shift(),done:!1}):this.#t?Promise.resolve({value:void 0,done:!0}):new Promise(t=>{this.#A=t})}return(){return this.close(),Promise.resolve({value:void 0,done:!0})}close(){if(!this.#t&&(this.#t=!0,this.#r?.removeEventListener("abort",this.#I),this.#o?.(),this.#o=null,this.#A)){let t=this.#A;this.#A=null,t({value:void 0,done:!0})}}[Symbol.asyncIterator](){return this}},HT=class{#e;#A;#t=new Set;#r=new Map;#I=new Map;#o=new Map;#g=[];#i=!1;constructor(t,o,a){this.#e=o,this.#A=a,this.host=Object.freeze({describe:e=>Yo(e,()=>({ready:!0,transport:"typert"}))}),this.workspace=Object.freeze({list:(e,i)=>Yo(e,()=>this.#l(i)),create:(e,i)=>Yo(e,()=>this.#a("workspace","create",{request:e.payload},i))}),this.sessions=Object.freeze({list:(e,i)=>Yo(e,()=>this.#a("session","list",{_request:e.payload},i)),create:(e,i)=>Yo(e,()=>this.#a("session","create",{request:e.payload},i)),history:(e,i)=>Yo(e,()=>this.#d(e.payload,i)),prompt:(e,i)=>Yo(e,()=>this.#a("session","prompt",{request:{requestId:e.rpcId,...e.payload}},i)),rename:(e,i)=>Yo(e,()=>this.#a("session","rename",{request:e.payload},i)),cancel:(e,i)=>Yo(e,()=>this.#a("session","cancel",{request:{sessionId:e.payload.sessionId}},i)),models:(e,i)=>Yo(e,()=>this.#h(e.payload.sessionId,i)),selectModel:(e,i)=>Yo(e,()=>this.#a("session","selectModel",{request:e.payload},i))}),this.llm=Object.freeze({models:(e,i)=>Yo(e,async()=>{let A=await this.#p(i);return{groups:A.groups,failures:A.failures}})}),this.events=Object.freeze({mux:(e,i)=>this.#u(i)}),this.respond=e=>Promise.resolve(this.#Q(e)),typeof t?.on=="function"&&(this.#g.push(t.on("session/event",(e,i)=>{let A=e?.id;typeof A!="string"||!i||typeof i!="object"||(Number.isSafeInteger(i.seq)&&this.#n(A,i.seq),this.#C({type:"session/event",sessionId:A,event:i}))},{global:!0})),this.#g.push(t.on("approval/request",(e,i)=>this.#m(e,i),{global:!0,prepend:!0})),this.#g.push(t.on("user-questions/request",(e,i)=>this.#y(e,i),{global:!0,prepend:!0})))}async#a(t,o,a,e){return this.#e.invoke(oj(t,o,a,e))}async#s(t,o,a,e){let i=new AbortController,A=e?AbortSignal.any([e,i.signal]):i.signal,r;try{r=(await this.#e.stream(oj(t,o,a,A)))[Symbol.asyncIterator]();let g=await r.next();if(g.done)throw new Error(`Harness ${t}.${o} stream ended before its baseline`);return g.value}finally{i.abort(new DOMException("Baseline received","AbortError")),await Promise.resolve(r?.return?.()).catch(()=>{})}}async#l(t){let o=await this.#s("workspace","follow",{},t);if(o?.type!=="baseline"||!o.value||typeof o.value!="object")throw new Error("Harness workspace.follow returned no baseline");return o.value}async#c(t,o,a){let e=await this.#s("session","follow",{request:{address:{kind:"session",sessionId:t},maxMessages:o}},a);if(e?.type!=="snapshot"||!Number.isSafeInteger(e.cursor))throw new Error("Harness session.follow returned no snapshot");return this.#n(t,e.cursor),e}async#d(t,o){let{sessionId:a,maxMessages:e=50,beforeSeq:i}=t,A=this.#o.get(a);if(A===void 0){let s=await this.#c(a,e,o);if(A=this.#o.get(a)??s.cursor,i===void 0&&A===s.cursor)return{events:nj(s.records),hasMore:s.hasMore===!0,...s.projections===void 0?{}:{projections:s.projections}}}let r=await this.#a("session","page",{request:{address:{kind:"session",sessionId:a},throughSeq:A,maxMessages:e,...i===void 0?{}:{beforeSeq:i}}},o);return{events:nj(r.records),hasMore:r.hasMore===!0}}#n(t,o){let a=this.#o.get(t);(a===void 0||o>a)&&this.#o.set(t,o)}#p(t){return this.#a("session","modelCatalog",{},t)}async#h(t,o){let[a,e]=await Promise.all([this.#p(o),this.#a("session","list",{_request:{}},o)]),i=e?.items?.find(s=>s?.sessionId===t);if(!i){let s=new Error(`session "${t}" not found`);throw s.failure={code:"session-not-found",message:s.message,details:{sessionId:t}},s}let A=i.projections?.values?.modelSelection,r=A?.next??A?.lastUsed??a.default;return{current:r,routable:a.routableProviders.includes(r.provider),groups:a.groups,failures:a.failures}}#u(t){let o;o=new UT(t,()=>this.#t.delete(o)),this.#t.add(o);for(let a of this.#r.values())o.push(this.#f(a));for(let a of this.#I.values())o.push(this.#w(a));return o}#C(t,o=LT()){let a={rpcId:o,payload:t};for(let e of this.#t)e.push(a)}#B(t){let o=t?.session,a=o?.id??t?.id,e=kfe(o);return typeof a!="string"||!e?null:k3(this.#A,a,e)?{sessionId:a,events:e}:null}#f(t){return{rpcId:t.rpcId,payload:{type:"question/requested",sessionId:t.sessionId,questions:t.questions}}}#y(t,o){let a=this.#B(t?.agent);return a?t.signal?.aborted?Promise.reject(wy("ask_user_question was aborted before the user answered","ASK_ABORTED")):new Promise((e,i)=>{let A={rpcId:LT(),sessionId:a.sessionId,questions:t.questions,signal:t.signal,settle:(s,g)=>{this.#r.delete(A.rpcId)&&(t.signal?.removeEventListener("abort",r),this.#C({type:"question/resolved",sessionId:A.sessionId,questionRpcId:A.rpcId,outcome:s}),s==="answered"?e(g):i(g))}},r=()=>A.settle("cancelled",wy("ask_user_question was aborted before the user answered","ASK_ABORTED"));this.#r.set(A.rpcId,A),t.signal?.addEventListener("abort",r,{once:!0}),this.#C(this.#f(A).payload,A.rpcId)}):o()}#w(t){return{rpcId:t.rpcId,payload:{type:"approval/requested",sessionId:t.sessionId,approvalId:t.approvalId,toolName:t.toolName,...t.callId===void 0?{}:{callId:t.callId},...t.reason===void 0?{}:{reason:t.reason}}}}#m(t,o){let a=this.#B(t?.agent);if(!a)return o();if(t.signal?.aborted)return Promise.resolve("cancelled");let e=new Set([...this.#I.values()].map(r=>r.approvalId)),i=new Set,A;for(let r=a.events.length-1;r>=0;r-=1){let s=a.events[r];if(s.type==="approval/decided")i.add(s.data?.id);else if(s.type==="approval/asked"){let g=s.data?.id;if(!g||i.has(g)||e.has(g)||(t.callId??null)!==(s.data?.callId??null))continue;A=g;break}}return A===void 0?o():new Promise(r=>{let s={rpcId:LT(),sessionId:a.sessionId,approvalId:A,toolName:t.toolName,callId:t.callId,reason:t.reason,settle:c=>{this.#I.delete(s.rpcId)&&(t.signal?.removeEventListener("abort",g),this.#C({type:"approval/resolved",sessionId:s.sessionId,approvalId:s.approvalId,outcome:c}),r(c))}},g=()=>s.settle("cancelled");this.#I.set(s.rpcId,s),t.signal?.addEventListener("abort",g,{once:!0}),this.#C(this.#w(s).payload,s.rpcId)})}#Q(t){let o=this.#I.get(t?.rpcId);if(o){let i=t?.result?.value;return t?.result?.ok!==!0||!i||typeof i!="object"||i.sessionId!==o.sessionId||i.approvalId!==o.approvalId||i.outcome!=="allowed-once"&&i.outcome!=="rejected"?{accepted:!1,reason:"bad-response"}:(o.settle(i.outcome),{accepted:!0})}let a=this.#r.get(t?.rpcId);if(!a)return{accepted:!1,reason:"not-pending"};if(t?.result?.ok!==!0)return t?.result?.error?.code!=="cancelled"?{accepted:!1,reason:"bad-response"}:(a.settle("cancelled",wy("the user cancelled ask_user_question","ASK_CANCELLED")),{accepted:!0});if(!vfe(t.result.value,a))return{accepted:!1,reason:"bad-response"};let e={answers:t.result.value.answer.answers.map(i=>({id:i.id,selected:[...i.selected],...i.custom===void 0?{}:{custom:i.custom}}))};return a.settle("answered",e),{accepted:!0}}dispose(){if(!this.#i){this.#i=!0;for(let t of[...this.#t])t.close();for(let t of[...this.#I.values()])t.settle("cancelled");for(let t of[...this.#r.values()])t.settle("cancelled",wy("dsh-im interaction adapter was disposed","ASK_ABORTED"));for(let t of this.#g.splice(0).reverse())t?.()}}};function sj(n){let t=n?.root??n;if(!t||!["object","function"].includes(typeof t))throw new TypeError("dsh-im requires a Cordis Host context");let o=Sy.get(t);if(o)return o;let a=n?.typertGateway;if(!a||typeof a.invoke!="function"||typeof a.stream!="function")throw new TypeError("dsh-im requires the modern Host Typert gateway");let e=new HT(n,a,t);return Sy.set(t,e),typeof n.effect=="function"&&n.effect(()=>()=>{Sy.get(t)===e&&Sy.delete(t),e.dispose()},"dsh-im: modern Harness compatibility API"),e}function Gfe(n,t){return n&&Object.hasOwn(n,t)?n[t]:typeof n?.get=="function"?n.get(t):void 0}function ci(n,t={}){return t.harnessBaseUrl!==void 0?{baseUrl:new URL(t.harnessBaseUrl)}:{apiProxy:Gfe(n,"apiProxy")??sj(n),interactionScope:n.root??n}}import{randomUUID as Ffe}from"node:crypto";function Lfe(n){if(typeof n?.get!="function")return;let t;try{t=n.get("agents")}catch{return}if(t!=null){if(typeof t.get!="function")throw new TypeError('dsh-im requires a callable AgentRegistry when ctx.get("agents") is present');return t}}function Ufe(n,t,o){if(n?.status!=="running")return!1;let a=n?.session?.events;if(!Array.isArray(a))return!1;let e=null,i=!1;for(let A of a){if(A?.type==="turn/start"){e=A.data?.turn??null,i=!1;continue}if(A?.type==="turn/end"&&A.data?.turn===e){e=null,i=!1;continue}e===t&&A?.type==="user/message"&&A.data?.source?.rpcId===o&&(i=!0)}return e===t&&i}function gj(n){if(!n||typeof n!="object"||Object.isFrozen(n))return n;for(let t of Object.values(n))gj(t);return Object.freeze(n)}function Hfe(n){return gj({id:Ffe(),role:"user",content:[{type:"text",text:n}],source:{kind:"user"}})}function Kfe(n){let t=new Error("Session is busy with an active turn or maintenance task",{cause:n});return t.code="agent-busy",t}function xfe(n){return({sessionId:t,expectedTurn:o,promptRpcId:a,action:e,text:i})=>{let A=n.get(t);if(A){if(!Ufe(A,o,a))return!1;if(e==="stop")return A.cancel({kind:"user"},{keepInbox:!0}),!0;if(e==="steer")return typeof i!="string"||!i.trim()?!1:(A.inject(Hfe(i)),!0);throw new TypeError(`Unsupported Harness control action: ${String(e)}`)}}}function Yfe(n){return({sessionId:t,operation:o})=>{if(typeof o!="function")throw new TypeError("maintenance operation is required");let a=n.get(t);if(!a)return o();try{return a.runMaintenance(e=>{if(n.get(t)!==a){let i=new Error("Session agent changed before maintenance started");throw i.code="agent-unavailable",i}return o(e)})}catch(e){throw Kfe(e)}}}function jfe(n){return({sessionId:t,workspace:o,files:a,signal:e})=>{let A=n.get(t)?.session?.header?.cwd,r=typeof A=="string"&&A?A:o;if(typeof r!="string"||!r)throw new Uo("inbound-file-workspace-unavailable","The Harness Session workspace is unavailable for inbound files.");return Y1({files:a},{workspace:r,signal:e})}}function Xi(n,t={}){let{controlExecutor:o,sessionMaintenanceExecutor:a,fileIngressExecutor:e}=t;if(o!==void 0&&typeof o!="function")throw new TypeError("controlExecutor must be a function");if(a!==void 0&&typeof a!="function")throw new TypeError("sessionMaintenanceExecutor must be a function");if(e!==void 0&&typeof e!="function")throw new TypeError("fileIngressExecutor must be a function");let i=o&&a&&e?void 0:Lfe(n);return{controlExecutor:o??(i?xfe(i):void 0),sessionMaintenanceExecutor:a??(i?Yfe(i):void 0),fileIngressExecutor:e??jfe(i??{get:()=>{}})}}function cj(n){return n.map(t=>({id:t,canExecuteCommands:!0}))}function Og(n=[]){return sy({mode:"open",open:{defaultCanExecuteCommands:!0,commandPermissionOverrides:[]},allowlist:{users:cj(n)}})}function Rc(n=[]){return sy({mode:"allowlist",open:{defaultCanExecuteCommands:!1,commandPermissionOverrides:[]},allowlist:{users:cj(n)}})}function bg(n){return[...new Set((Array.isArray(n)?n:[n]).filter(t=>typeof t=="string"||typeof t=="number"||typeof t=="bigint").map(t=>String(t).trim()).filter(Boolean))]}function Jfe(n){return bg(n).map(t=>`${t.replace(/^\+/,"")}@s.whatsapp.net`)}function pr(n,t={}){let o=String(n??"").trim().toLowerCase();if(o==="weixin")return Sg({direct:Rc(),group:Rc()});if(o==="feishu"){let e=bg(t.ownerOpenIds??t.ownerOpenId).includes("*")?Og():Rc();return Sg({direct:e,group:e})}if(o==="qq"){let a=bg(t.ownerUserOpenid);return Sg({direct:a.includes("*")?Og():Rc(),group:Og()})}if(o==="telegram"){let a=bg(t.allowedUsers);return(t.accessMode??"compatible")==="private-allowlist"?Sg({direct:Rc(a),group:Rc()}):Sg({direct:Og(a),group:Og()})}if(o==="whatsapp"){let a=t.accessMode??"self-only",e=Jfe(t.allowedNumbers);return a==="open"?Sg({direct:Og(e),group:Og()}):Sg({direct:Rc(a==="private-allowlist"?e:[]),group:Rc()})}if(["dingtalk","wecom","slack","discord"].includes(o))return Sg({direct:Og(),group:Og()});throw new TypeError(`Unsupported access-policy channel: ${n}`)}function qfe(n,t={}){let o=String(n??"").trim().toLowerCase();if(o==="weixin")return bg(t.ownerUserId);if(o==="feishu")return bg(t.ownerOpenIds??t.ownerOpenId).filter(a=>a!=="*");if(o==="dingtalk"){let a=Array.isArray(t.approvedSenders)?t.approvedSenders:[];return bg(a.map(e=>e?.staffId))}return o==="qq"?bg(t.ownerUserOpenid).filter(a=>a!=="*"):o==="whatsapp"?bg(t.accountJid):[]}function $i(n,t,{channel:o,config:a,equals:e}={}){if(!n||typeof n.accessPolicyFor!="function")throw new TypeError("A workspace store with access policies is required");let i=new Set(qfe(o,a)),A=typeof e=="function"?e:(r,s)=>r===s;return Object.freeze({botId:t,getSettings:()=>n.accessPolicyFor(t),isPrivileged(r,s){if(!["direct","group"].includes(s))return!1;let g=Array.isArray(r)?r:[r];try{return g.some(c=>typeof c=="string"&&[...i].some(I=>A(c.trim(),I)===!0))}catch{return!1}}})}function Wfe(n){let t=il(n.dshHome??process.env.DSH_HOME??yu(Vfe(),".dsh")),o=il(n.dataDir??yu(t,"integrations","dsh-dingtalk"));return{root:o,config:il(n.configPath??yu(o,"config.json")),bots:il(n.botsDir??yu(o,"bots")),workspaces:il(n.workspacesPath??yu(o,"workspaces.json"))}}async function KT(n,t={},o={}){if(!n?.credentials)throw new TypeError("dsh-dingtalk requires ctx.credentials");let a=ci(n,t),e=o.ConfigStore??KQ,i=o.DeviceAuth??YQ,A=o.StateStore??ny,r=o.HarnessClient??dy,s=o.Controller??nu,g=o.Runtime??Eu,c=o.createConnectionSupervisor??FT,I=typeof n.logger=="function"?n.logger("dsh-dingtalk"):n.logger??console,d=()=>Ji(n),B=Wfe(t),f=await new e(B.config).load(),Q=il(t.workspace??process.cwd()),y=o.WorkspaceStore??gi,m=o.workspaces??await new y(B.workspaces,{defaultWorkspace:Q}).load(),_=typeof f.list=="function",T=_?f.list():[];_&&await m.reconcile(T.map(X=>X.botId)),await Promise.all(T.map(X=>m.ensure(X.botId,{defaultAgentPreset:t.agentPreset,initialAccessPolicy:pr("dingtalk",X)})));let R=typeof f.remove=="function"?qi(f,{workspaces:m}):f,L=o.deviceAuth??new i({baseUrl:t.registrationBaseUrl}),U=new Map,F=X=>il(B.bots,X,"state.json"),J=async X=>{let ie=U.get(X);return ie||(ie=await new A(F(X)).load(),U.set(X,ie)),ie},V=Zi(n,o.commandExecutor),{controlExecutor:H,sessionMaintenanceExecutor:G,fileIngressExecutor:q}=Xi(n,{controlExecutor:o.controlExecutor,sessionMaintenanceExecutor:o.sessionMaintenanceExecutor,fileIngressExecutor:o.fileIngressExecutor}),K=new r({...a,workspace:Q,autostart:!1,dshBin:t.dshBin??"dsh",...V?{commandExecutor:V}:{},...H?{controlExecutor:H}:{},...G?{sessionMaintenanceExecutor:G}:{},...q?{fileIngressExecutor:q}:{}}),N=new s({deviceAuth:L,credentials:n.credentials,configStore:R,logger:I,createRuntime:async({botId:X,config:ie,clientSecret:De})=>{let oe=await J(X);await m.ensure(X,{defaultAgentPreset:t.agentPreset,initialAccessPolicy:pr("dingtalk",ie)});let Se=zi(K,{botId:X,workspaces:m,state:oe,agentPresetCatalog:d});return new g({config:ie,clientSecret:De,harness:Se.harness,state:Se.state,contextEnhancement:{botId:X,getSettings:()=>m.contextEnhancementFor(X)},accessPolicy:$i(m,X,{channel:"dingtalk",config:ie}),groupSessionScope:{getScope:()=>m.groupSessionScopeFor(X)},replyTimeoutMs:t.replyTimeoutMs??6e5,maxMessageChars:t.maxMessageChars??4e3,connectTimeoutMs:t.connectTimeoutMs??15e3,logger:{error:(...Be)=>I.error?.(`[${X}]`,...Be),warn:(...Be)=>I.warn?.(`[${X}]`,...Be),info:(...Be)=>I.info?.(`[${X}]`,...Be),debug:(...Be)=>I.debug?.(`[${X}]`,...Be)}})},deleteState:async({botId:X})=>{let ie=U.get(X);if(U.delete(X),ie&&typeof ie.remove=="function")await ie.remove();else try{await zfe(F(X))}catch(De){if(De?.code!=="ENOENT")throw De}}}),k=Vi(N,{workspaces:m,stateFor:J,agentPresetCatalog:d}),z=c({controller:k,harness:K,logger:I,retryDelaysMs:t.retryDelaysMs,healthyIntervalMs:t.healthyIntervalMs}).start();return{controller:k,deliveryAdapter:Wi({channel:"dingtalk",workspaces:m,coreController:N,stateFor:J}),ready:z.ready,async close(){await z.close(),await k.close(),K.stopManagedProcess()}}}import eQe from"qrcode";var Ha="bot.context-enhancement.set";function ea(n){try{return!n||typeof n!="object"||Array.isArray(n)||Reflect.ownKeys(n).length!==2||!Object.hasOwn(n,"botId")||!Object.hasOwn(n,"config")||typeof n.botId!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)?!1:(el(n.config),!0)}catch{return!1}}var Aa="bot.access-policy.set";function ta(n){try{return!n||typeof n!="object"||Array.isArray(n)||Reflect.ownKeys(n).length!==2||!Object.hasOwn(n,"botId")||!Object.hasOwn(n,"policy")||typeof n.botId!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)?!1:(Oc(n.policy),!0)}catch{return!1}}var ra="bot.group-session-scope.set";function ia(n){try{return!n||typeof n!="object"||Array.isArray(n)||Reflect.ownKeys(n).length!==2||!Object.hasOwn(n,"botId")||!Object.hasOwn(n,"groupSessionScope")||typeof n.botId!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)?!1:(sp(n.groupSessionScope),!0)}catch{return!1}}var Zfe=new Set(["loopback","trusted-host"]);function mr(n){if(n===void 0)return"loopback";if(Zfe.has(n))return n;throw new TypeError('dsh-im rpcAuthority must be "loopback" or "trusted-host"')}import{isAbsolute as Xfe}from"node:path";var Ka="bot.workspace.set";function aa(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)&&Object.keys(n).every(t=>["botId","workspace"].includes(t))&&typeof n.botId=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)&&typeof n.workspace=="string"&&n.workspace.length<=4096&&Xfe(n.workspace.trim())}function oa(n){return["workspace-not-absolute","workspace-not-found","workspace-not-directory","workspace-bot-not-found","agent-preset-invalid","agent-preset-unavailable","context-enhancement-invalid"].includes(n?.code)?{code:n.code,message:n.message}:null}var xa="bot.preset.set";function $fe(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function na(n){return $fe(n)&&Object.keys(n).every(t=>["botId","agentPreset"].includes(t))&&typeof n.botId=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)&&(n.agentPreset===null||typeof n.agentPreset=="string"&&aT.test(n.agentPreset))}var lj="/dingtalk",kt=Object.freeze({status:"connection.status",beginProvisioning:"provision.begin",pollProvisioning:"provision.poll",cancelProvisioning:"provision.cancel",bindCredentials:"bot.bind-credentials",reconnectBot:"bot.reconnect",deleteBot:"bot.delete",setWorkspace:Ka,setAgentPreset:xa,setContextEnhancement:Ha,setAccessPolicy:Aa,setGroupSessionScope:ra,approveSender:"bot.sender.approve",revokeSender:"bot.sender.revoke"}),dj=Object.freeze(Object.values(kt)),AQe=new Set(["clientSecret","client_secret","deviceCode","device_code","secretRef","staffId","senderStaffId","verificationUrl","verificationUri","userCode"]);function Oy(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function kc(n,t){return Oy(n)&&Object.keys(n).every(o=>t.includes(o))}function al(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n)}function Ij(n,t){return typeof n=="string"&&n.trim().length>0&&n.length<=t}function tQe(n,t){return Oy(t)?n===kt.status?kc(t,[])?null:"connection.status does not accept fields.":n===kt.beginProvisioning?kc(t,["locale"])&&(t.locale===void 0||t.locale==="zh-CN")?null:"provision.begin received unsupported fields.":[kt.pollProvisioning,kt.cancelProvisioning].includes(n)?kc(t,["attemptId"])&&al(t.attemptId)?null:`${n} requires an attemptId.`:n===kt.bindCredentials?kc(t,["clientId","clientSecret"])&&Ij(t.clientId,256)&&Ij(t.clientSecret,1024)?null:"bot.bind-credentials requires Client ID and Client Secret.":n===kt.reconnectBot?kc(t,["botId","sendTest"])&&al(t.botId)&&(t.sendTest===void 0||t.sendTest===!0)?null:"bot.reconnect requires a botId and optional sendTest=true.":n===kt.deleteBot?kc(t,["botId","confirm"])&&al(t.botId)&&t.confirm===!0?null:"bot.delete requires a botId and confirm=true.":n===kt.setWorkspace?aa(t)?null:"\u8BF7\u8F93\u5165\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84\u3002":n===kt.setAgentPreset?na(t)?null:"\u8BF7\u9009\u62E9 Agent Preset\u3002":n===kt.setContextEnhancement?ea(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002":n===kt.setAccessPolicy?ta(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u8BBF\u95EE\u8BBE\u7F6E\u3002":n===kt.setGroupSessionScope?ia(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u7FA4\u4F1A\u8BDD\u7B56\u7565\u3002":n===kt.approveSender?kc(t,["botId","requestId","confirm"])&&al(t.botId)&&al(t.requestId)&&t.confirm===!0?null:"bot.sender.approve requires botId, requestId, and confirm=true.":n===kt.revokeSender?kc(t,["botId","senderKey","confirm"])&&al(t.botId)&&al(t.senderKey)&&t.confirm===!0?null:"bot.sender.revoke requires botId, senderKey, and confirm=true.":"Unknown DingTalk endpoint.":"Payload must be an object."}function Dy(n){return{ok:!1,error:{code:"bad-request",message:n}}}function mu(){return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}}function rQe(){return{ok:!1,error:{code:"dingtalk-operation-failed",message:"\u9489\u9489\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"}}}function iQe(n){if(n?.name!=="DingtalkPublicConnectionError"||!Oy(n.publicError))return null;let t=n.publicError,o=typeof t.code=="string"&&/^[a-z][a-z\d-]{1,79}$/.test(t.code)?t.code:null,a=typeof t.message=="string"&&t.message.trim()?t.message.trim().slice(0,240):null,e=typeof t.hint=="string"&&t.hint.trim()?t.hint.trim().slice(0,480):null,i=typeof t.referenceId=="string"&&/^DT-CONN-[A-F0-9]{8}$/.test(t.referenceId)?t.referenceId:null;return o&&a&&e&&i?{code:o,message:a,hint:e,referenceId:i}:null}function Ip(n){if(Array.isArray(n))return n.map(Ip);if(!Oy(n))return n;let t={};for(let[o,a]of Object.entries(n))AQe.has(o)||(t[o]=Ip(a));return t}async function aQe(n){return eQe.toDataURL(n,{type:"image/png",errorCorrectionLevel:"M",margin:2,width:320})}async function xT(n,t){return!n||typeof n.verificationUrl!="string"?Ip(n):Ip({...n,qrCodeDataUrl:await t(n.verificationUrl)})}async function _n(n,t){let o=structuredClone(n);return o?.provisioning&&(o.provisioning=await xT(o.provisioning,t)),Ip(o)}function oQe(n){for(let t of["status","startProvisioning","registrationStatus","cancelProvisioning","bindCredentials","reconnectBot","deleteBot","approveSender","revokeSender"])if(typeof n?.[t]!="function")throw new TypeError(`A complete DingTalk controller is required (${t})`)}function pj(n,{encodeQr:t=aQe}={}){oQe(n);let o=new Map,a=e=>{let i=o.get(e);return i||(o.size>=16&&o.delete(o.keys().next().value),i=Promise.resolve().then(()=>t(e)),o.set(e,i)),i};return async(e,i,A)=>{if(A?.aborted)return mu();if(!dj.includes(e))return Dy("Unknown DingTalk endpoint.");let r=tQe(e,i);if(r)return Dy(r);try{let s;if(e===kt.status)s=await _n(await n.status(),a);else if(e===kt.beginProvisioning){let g=await n.startProvisioning({signal:A});if(A?.aborted)return await n.cancelProvisioning(g.attemptId),mu();s=await xT(g,a)}else if(e===kt.pollProvisioning){let g=await n.registrationStatus(i.attemptId);if(!g)return Dy("The provisioning attempt no longer exists.");s=await xT(g,a)}else if(e===kt.cancelProvisioning){if(s=await n.cancelProvisioning(i.attemptId),!s)return Dy("The provisioning attempt no longer exists.");s=Ip(s)}else if(e===kt.bindCredentials)s=await _n(await n.bindCredentials(i),a);else if(e===kt.reconnectBot){let g=await n.reconnectBot(i.botId);if(A?.aborted)return mu();let c;if(i.sendTest===!0)if(!g?.bots?.some(d=>d?.botId===i.botId&&d?.connected===!0)||typeof n.sendConnectionTest!="function")c=dr(Qr("\u9489\u9489\u673A\u5668\u4EBA"));else try{await n.sendConnectionTest(i.botId),c=dr()}catch(d){c=dr(d)}s=await _n({...g,...c?{testMessage:c}:{}},a)}else if(e===kt.deleteBot)s=await _n(await n.deleteBot(i.botId),a);else if(e===kt.setWorkspace){if(typeof n.updateWorkspace!="function")throw new Error("Workspace update is unavailable");s=await _n(await n.updateWorkspace(i.botId,i.workspace),a)}else if(e===kt.setContextEnhancement){if(typeof n.updateContextEnhancement!="function")throw new Error("Context enhancement update is unavailable");s=await n.updateContextEnhancement(i.botId,i.config,g=>_n(g,a))}else if(e===kt.setAccessPolicy){if(typeof n.updateAccessPolicy!="function")throw new Error("Access policy update is unavailable");s=await n.updateAccessPolicy(i.botId,i.policy,g=>_n(g,a))}else if(e===kt.setGroupSessionScope){if(typeof n.updateGroupSessionScope!="function")throw new Error("Group session scope update is unavailable");s=await n.updateGroupSessionScope(i.botId,i.groupSessionScope,g=>_n(g,a))}else if(e===kt.setAgentPreset){if(typeof n.updateAgentPreset!="function")throw new Error("Agent preset update is unavailable");s=await _n(await n.updateAgentPreset(i.botId,i.agentPreset),a)}else e===kt.approveSender?s=await _n(await n.approveSender(i.botId,i.requestId),a):s=await _n(await n.revokeSender(i.botId,i.senderKey),a);return A?.aborted?mu():{ok:!0,value:s}}catch(s){let g=oa(s),c=iQe(s);return A?.aborted?mu():g?{ok:!1,error:g}:c?{ok:!1,error:c}:rQe()}}}function by(n,t,o,a){if(!n?.connection?.rpc||typeof n.connection.rpc.handle!="function")throw new TypeError("DSH Host Connection RPC is required");return n.connection.rpc.handle(lj,pj(t,o),{authority:mr(a)})}async function hj(n,t={}){if(t?.controller)return by(n,t.controller,t.rpcOptions,t.rpcAuthority);let o=await KT(n,t,t.internals),a=t.deliveryService&&o.deliveryAdapter?t.deliveryService.registerAdapter(o.deliveryAdapter):void 0,e=by(n,o.controller,t.rpcOptions,t.rpcAuthority);return n.effect(()=>async()=>{await a?.(),await o.close()},"dsh-dingtalk: close bot connections"),e}import{createHash as nQe}from"node:crypto";import{mkdir as sQe,readFile as gQe,rename as cQe,unlink as IQe,writeFile as lQe}from"node:fs/promises";import{dirname as dQe}from"node:path";var YT=Object.freeze({version:1,bots:Object.freeze([])});function Mg(n){return typeof n=="string"&&n.trim()?n.trim():null}function Ej(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Su(n,{botPrefix:t,tokenRefPrefix:o}){let a=Mg(n);if(!a)throw new TypeError("platformId is required");let e=nQe("sha256").update(a).digest("hex").slice(0,24);return{botId:`${t}_${e}`,tokenRef:`${o}_${e.toUpperCase()}`}}function My(n,t){let o=Mg(n)??"";return o.length<=10?o?`${o.slice(0,3)}\u2022\u2022\u2022`:t:`${o.slice(0,6)}\u2022\u2022\u2022\u2022${o.slice(-4)}`}var lp=class{#e;#A;#t;#r;#I;#o;#g;#i=YT;#a=Promise.resolve();constructor(t,{channel:o,botPrefix:a,tokenRefPrefix:e,normalizeBotExtension:i=()=>({})}){if(typeof i!="function")throw new TypeError("normalizeBotExtension must be a function");this.#e=t,this.#A=o,this.#t=a,this.#r=e,this.#I=i,this.#o=new RegExp(`^${Ej(a)}_[a-f0-9]{24}$`),this.#g=new RegExp(`^${Ej(e)}_[A-F0-9]{24}$`)}async load(){try{let t=this.#l(JSON.parse(await gQe(this.#e,"utf8")));if(!t)throw new Error(`dsh-im ${this.#A} config contains invalid bot data`);this.#i=t}catch(t){if(t?.code!=="ENOENT")throw t;this.#i=YT}return this}list(){return structuredClone(this.#i.bots)}get(t){let o=this.#i.bots.find(a=>a.botId===t);return o?structuredClone(o):null}getByPlatformId(t){let o=this.#i.bots.find(a=>a.platformId===t);return o?structuredClone(o):null}async save(t){let o=this.#s(t);if(!o)throw new Error(`Refusing to persist incomplete ${this.#A} bot data`);return this.#c(a=>{let e=a.find(r=>r.platformId===o.platformId&&r.botId!==o.botId),i=a.find(r=>r.tokenRef===o.tokenRef&&r.botId!==o.botId);if(e||i)throw new Error(`Duplicate ${this.#A} bot identity`);let A=a.findIndex(r=>r.botId===o.botId);return A===-1?a.push(o):a[A]=o,structuredClone(o)})}async remove(t){if(!this.#o.test(t))throw new TypeError(`Invalid ${this.#A} bot id`);return this.#c(o=>{let a=o.findIndex(i=>i.botId===t);if(a===-1)return null;let[e]=o.splice(a,1);return structuredClone(e)})}async clear(){let t=this.#a.then(async()=>{try{await IQe(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#i=YT});this.#a=t.then(()=>{},()=>{}),await t}#s(t){if(!t||typeof t!="object")return null;let o=Mg(t.platformId),a=Mg(t.botId),e=Mg(t.tokenRef),i=Mg(t.name);if(!o||!a||!e||!i||!this.#o.test(a)||!this.#g.test(e))return null;let A=Su(o,{botPrefix:this.#t,tokenRefPrefix:this.#r});if(A.botId!==a||A.tokenRef!==e)return null;let r=this.#I(t);return!r||typeof r!="object"||Array.isArray(r)?null:Object.freeze({botId:a,platformId:o,tokenRef:e,name:i,username:Mg(t.username),createdAt:Mg(t.createdAt)??new Date().toISOString(),connectedAt:Mg(t.connectedAt),...r})}#l(t){if(!t||t.version!==1||!Array.isArray(t.bots))return null;let o=t.bots.map(A=>this.#s(A));if(o.some(A=>A===null))return null;let a=new Set,e=new Set,i=new Set;for(let A of o){if(a.has(A.botId)||e.has(A.platformId)||i.has(A.tokenRef))return null;a.add(A.botId),e.add(A.platformId),i.add(A.tokenRef)}return Object.freeze({version:1,bots:Object.freeze(o)})}async#c(t){let o,a=this.#a.then(async()=>{let e=[...this.#i.bots];o=t(e);let i=Object.freeze({version:1,bots:Object.freeze(e)});await this.#d(i),this.#i=i});return this.#a=a.then(()=>{},()=>{}),await a,o}async#d(t){await sQe(dQe(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.tmp`;await lQe(o,`${JSON.stringify(t,null,2)} +`,{encoding:"utf8",mode:384}),await cQe(o,this.#e)}};var uj=Object.freeze({botPrefix:"discord",tokenRefPrefix:"DSH_DISCORD_BOT_TOKEN"});function Cj(n){return Su(n,uj)}function Bj(n){return My(n,w("Discord\u673A\u5668\u4EBA"))}var _y=class extends lp{constructor(t){super(t,{channel:"Discord",...uj})}};function wu(n){return typeof n=="string"&&n.trim()?n.trim():null}function Du(n,t){return Object.freeze({code:n,message:t})}var dp=class{#e;#A;#t;#r;#I;#o;#g;#i;#a;#s=new Map;#l=new Map;#c=new Map;#d=0;#n=!1;constructor({descriptor:t,credentials:o,configStore:a,inspectToken:e,deriveIdentity:i,maskPlatformId:A,createRuntime:r,deleteState:s=async()=>{},logger:g=console}){if(!t?.key||!t?.label||!t?.connectionLabel)throw new TypeError("TokenBotController requires a channel descriptor");if(!o||typeof o.resolve!="function"||typeof o.set!="function"||typeof o.unset!="function")throw new TypeError(`${t.label} requires the DSH credential provider`);if(!a||typeof a.list!="function"||typeof a.save!="function"||typeof a.remove!="function")throw new TypeError(`${t.label} requires a config store`);if(typeof e!="function"||typeof i!="function"||typeof A!="function"||typeof r!="function")throw new TypeError(`${t.label} controller dependencies are incomplete`);this.#e=t,this.#A=o,this.#t=a,this.#r=e,this.#I=i,this.#o=A,this.#g=r,this.#i=s,this.#a=g}async initialize(){if(this.#n)return this.status();for(let t of this.#t.list())await this.#B(t.botId,async()=>{if(this.#n||this.#s.get(t.botId)?.status?.ready)return;let o=await this.#u(t.tokenRef);if(!o){this.#l.set(t.botId,Du("missing-token",w("{label}\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u63A5\u5165\u3002",{label:this.#e.label})));return}try{await this.#p(t,o),this.#l.delete(t.botId)}catch(a){this.#l.set(t.botId,Du("connection-failed",w("{label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002",{label:this.#e.label}))),this.#a.warn?.(`[dsh-im:${this.#e.key}] bot ${t.botId} failed to initialize:`,a)}finally{this.#f()}});return this.status()}async bindCredentials({token:t}={}){if(this.#n)throw new Error(`${this.#e.label} controller is closed`);let o=wu(t);if(!o)throw new TypeError(`${this.#e.label} Bot Token is required`);let a=await this.#r(o),e=wu(a?.platformId),i=wu(a?.name);if(!e||!i)throw new Error(`${this.#e.label} returned an invalid bot identity`);let A=this.#I(e);return await this.#B(A.botId,async()=>{if(this.#n)throw new Error(`${this.#e.label} controller is closed`);let r=this.#t.getByPlatformId(e),s=await this.#A.resolve(A.tokenRef).catch(()=>{}),g={botId:A.botId,platformId:e,tokenRef:A.tokenRef,name:i,username:wu(a.username),createdAt:r?.createdAt??new Date().toISOString(),connectedAt:new Date().toISOString()};await this.#A.set(A.tokenRef,o);try{await this.#t.save(g)}catch(c){throw await this.#C(A.tokenRef,s),c}try{await this.#p(g,o),this.#l.delete(A.botId)}catch(c){this.#l.set(A.botId,Du("connection-failed",w("{label}\u673A\u5668\u4EBA\u5DF2\u63A5\u5165\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002",{label:this.#e.label}))),this.#a.warn?.(`[dsh-im:${this.#e.key}] bot ${A.botId} credential connection failed:`,c)}this.#f()}),this.status()}async reconnectBot(t){let o=this.#t.get(t);if(!o)throw new Error(`Unknown ${this.#e.label} bot`);return await this.#B(t,async()=>{let a=await this.#u(o.tokenRef);if(!a)throw new Error(`${this.#e.label} bot token is missing`);try{await this.#p(o,a),this.#l.delete(t)}catch(e){throw this.#l.set(t,Du("connection-failed",w("{label}\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{label:this.#e.label}))),e}finally{this.#f()}}),this.status()}async updateBotConfig(t,o){if(this.#n)throw new Error(`${this.#e.label} controller is closed`);if(typeof o!="function")throw new TypeError("Bot config update must be a function");return await this.#B(t,async()=>{if(this.#n)throw new Error(`${this.#e.label} controller is closed`);let a=this.#t.get(t);if(!a)throw new Error(`Unknown ${this.#e.label} bot`);let e=await this.#u(a.tokenRef);if(!e)throw new Error(`${this.#e.label} bot token is missing`);if(this.#n)throw new Error(`${this.#e.label} controller is closed`);let i=o(a),A=await this.#t.save(i);try{await this.#p(A,e),this.#l.delete(t)}catch(r){throw this.#l.set(t,Du("connection-failed",w("{label}\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{label:this.#e.label}))),r}finally{this.#f()}}),this.status()}async sendConnectionTest(t){let o=this.#t.get(t);if(!o)throw new Error(`Unknown ${this.#e.label} bot`);return this.#B(t,async()=>{let a=this.#s.get(t);if(!a?.status?.ready||typeof a.sendConnectionTest!="function"){let i=new Error(w("{label}\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5",{label:this.#e.label}));throw i.code="test-target-unavailable",i}let e=w("{name}\uFF08{id}\uFF09",{name:o.name,id:this.#o(o.platformId)});return await a.sendConnectionTest(xi(e,w("{label}\u673A\u5668\u4EBA",{label:this.#e.label}))),{sent:!0}})}async sendProactiveText(t,o,a,e={}){if(!this.#t.get(t))throw new Error(`Unknown ${this.#e.label} bot`);return this.#B(t,async()=>{let A=this.#s.get(t);if(!A?.status?.ready||typeof A.sendProactiveText!="function"){let r=new Error(w("{label}\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5",{label:this.#e.label}));throw r.code="bot-not-connected",r}return A.sendProactiveText(o,a,e)})}async deleteBot(t){let o=this.#t.get(t);if(!o)throw new Error(`Unknown ${this.#e.label} bot`);return await this.#B(t,async()=>{let a=await this.#A.resolve(o.tokenRef).catch(()=>{});await this.#h(t);try{await this.#A.unset(o.tokenRef),await this.#t.remove(t)}catch(e){throw a?.value&&(await this.#A.set(o.tokenRef,a.value).catch(()=>{}),await this.#p(o,a.value).catch(()=>{})),new Error(`Unable to remove the ${this.#e.label} bot safely.`,{cause:e})}await this.#i({botId:t,config:o}).catch(e=>{this.#a.warn?.(`[dsh-im:${this.#e.key}] bot ${t} state cleanup failed:`,e)}),this.#l.delete(t),this.#f()}),this.status()}status(){let t=this.#t.list().map(a=>{let e=this.#s.get(a.botId)?.status??null,i=e?.ready===!0&&e.connectionState==="connected"&&e.harnessReachable===!0,A=i?"connected":e?.connectionState==="connecting"?"connecting":this.#l.has(a.botId)||e?.connectionState==="failed"?"error":"offline";return{botId:a.botId,state:A,connected:i,configured:!0,bot:{name:a.name,username:a.username,idMasked:this.#o(a.platformId)},health:{status:i?"healthy":A==="error"?"error":"offline",summary:i?w("{label}{connectionLabel}\u8FD0\u884C\u6B63\u5E38",{label:this.#e.label,connectionLabel:w(this.#e.connectionLabel)}):A==="error"?w("{label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5",{label:this.#e.label}):w("{label}\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF",{label:this.#e.label}),lastCheckedAt:e?.lastCheckedAt??null,lastConnectedAt:e?.lastConnectedAt??null},stats:{messagesReceived:e?.messagesReceived??0,messagesReplied:e?.messagesReplied??0},lastMessageError:ii(e?.lastMessageError),error:structuredClone(this.#l.get(a.botId)??null)}}),o=t.filter(a=>a.connected).length;return{schemaVersion:1,revision:this.#d,state:t.length===0?"disconnected":o===t.length?"connected":o>0?"degraded":"offline",bots:t,totals:{configured:t.length,connected:o}}}async close(){this.#n||(this.#n=!0,await Promise.allSettled([...this.#c.values()]),await Promise.allSettled([...this.#s.keys()].map(t=>this.#h(t))))}async#p(t,o){if(this.#n)throw new Error(`${this.#e.label} controller is closed`);if(await this.#h(t.botId),this.#n)throw new Error(`${this.#e.label} controller is closed`);let a=await this.#g({botId:t.botId,config:t,token:o});if(!a||typeof a.start!="function"||typeof a.stop!="function")throw new TypeError(`createRuntime returned an invalid ${this.#e.label} runtime`);this.#s.set(t.botId,a);try{await a.start()}catch(e){throw await a.stop().catch(()=>{}),this.#s.delete(t.botId),e}}async#h(t){let o=this.#s.get(t);this.#s.delete(t),await o?.stop().catch(a=>{this.#a.warn?.(`[dsh-im:${this.#e.key}] bot ${t} failed to stop cleanly:`,a)})}async#u(t){let o=await this.#A.resolve(t).catch(()=>{});return wu(o?.value)}async#C(t,o){o?.value?await this.#A.set(t,o.value).catch(()=>{}):await this.#A.unset(t).catch(()=>{})}#B(t,o){let i=(this.#c.get(t)??Promise.resolve()).catch(()=>{}).then(o).finally(()=>{this.#c.get(t)===i&&this.#c.delete(t)});return this.#c.set(t,i),i}#f(){this.#d+=1}};import{createHash as pQe}from"node:crypto";var hQe="https://discord.com/api/v10/",EQe=12e4,uQe=new Set([50001,50013]),CQe=new Set([40005]);function Qs(n){return typeof n=="string"&&n.trim()?n.trim():null}function fj(n,t){let o=AbortSignal.timeout(t);return n?AbortSignal.any([n,o]):o}function jT(n){return n?.reason instanceof Error?n.reason:new DOMException("The operation was aborted","AbortError")}function BQe(n,t){if(!Number.isInteger(n)||n<1)throw new TypeError(`${t} must be a positive integer`);return n}function yj(n,t){return t?.providerCode!==void 0&&(n.providerCode=t.providerCode),t?.retry_after!==void 0&&(n.retry_after=t.retry_after,n.retryAfter=t.retry_after),Number.isInteger(t?.status)&&(n.status=t.status),n}function fQe(n){let t=Number(n?.providerCode),o=Number(n?.status),a=Qs(n?.message)??"",e="artifact-provider-rejected",i="Discord rejected the attachment.";o===401||o===403||uQe.has(t)?(e="artifact-permission-required",i="Discord denied permission to send the attachment."):o===413||CQe.has(t)||/(?:request|attachment|file).{0,24}too large/i.test(a)?(e="artifact-too-large",i="The attachment exceeds Discord's size limit."):o===429?(e="artifact-rate-limited",i="Discord rate-limited attachment delivery."):o>=500&&(e="artifact-delivery-uncertain",i="Discord attachment delivery result is uncertain.");let A=new Error(i,{cause:n});return A.code=e,yj(A,n)}function QQe(n){let t=new Error("Discord attachment delivery result is uncertain",{cause:n});return t.code="artifact-delivery-uncertain",yj(t,n)}function yQe(n,t){return new Promise((o,a)=>{if(t?.aborted){a(t.reason??new DOMException("Aborted","AbortError"));return}let e=setTimeout(o,n);e?.unref?.(),t?.addEventListener("abort",()=>{clearTimeout(e),a(t.reason??new DOMException("Aborted","AbortError"))},{once:!0})})}function Ii(n,t){let o=Qs(n);if(!o||!/^\d{5,30}$/.test(o))throw new TypeError(`Invalid Discord ${t}`);return o}function Qj(n){let t=Qs(n);if(!t)throw new TypeError("A Discord reaction emoji is required");return t}function mQe(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{20,}\.[A-Za-z0-9_-]{4,}\.[A-Za-z0-9_-]{20,}$/.test(n.trim())}var Ou=class{#e;#A;#t;#r;constructor({token:t,fetchImpl:o=fetch,baseUrl:a=hQe,fileUploadTimeoutMs:e=EQe}){if(!mQe(t))throw new TypeError("Discord Bot Token is invalid");if(typeof o!="function")throw new TypeError("DiscordApi requires fetch");this.#e=t.trim(),this.#A=o,this.#t=new URL(a),this.#r=BQe(e,"fileUploadTimeoutMs")}getCurrentUser(t={}){return this.#I("users/@me",{...t,method:"GET"})}getGatewayBot(t={}){return this.#I("gateway/bot",{...t,method:"GET"})}getChannel({channelId:t,signal:o}={}){return this.#I(`channels/${Ii(t,"channel id")}`,{method:"GET",signal:o})}getMessage({channelId:t,messageId:o,signal:a}={}){return this.#I(`channels/${Ii(t,"channel id")}/messages/${Ii(o,"message id")}`,{method:"GET",signal:a})}startThreadFromMessage({channelId:t,messageId:o,name:a,signal:e}={}){let i=Qs(a);if(!i||[...i].length>100)throw new TypeError("Discord thread name must contain 1-100 characters");if(e?.aborted)throw jT(e);return this.#I(`channels/${Ii(t,"channel id")}/messages/${Ii(o,"message id")}/threads`,{method:"POST",signal:e,body:{name:i}})}createMessage({channelId:t,content:o,replyToMessageId:a,signal:e}){return this.#I(`channels/${Ii(t,"channel id")}/messages`,{method:"POST",signal:e,body:{content:o,allowed_mentions:{parse:[],replied_user:!1},...a?{message_reference:{message_id:Ii(a,"message id"),channel_id:Ii(t,"channel id"),fail_if_not_exists:!1}}:{}}})}async createFileMessage({channelId:t,file:o,replyToMessageId:a,signal:e}){if(!o||typeof o!="object"||typeof o.fileName!="string"||!o.fileName||!Buffer.isBuffer(o.bytes))throw new TypeError("A Discord attachment is required");let i=Qs(o.deliveryKey)??Qs(o.artifactId),A=i?pQe("sha256").update(i).digest("hex").slice(0,25):void 0,r=new FormData;r.append("payload_json",JSON.stringify({allowed_mentions:{parse:[],replied_user:!1},attachments:[{id:0,filename:o.fileName}],...A?{nonce:A,enforce_nonce:!0}:{},...a?{message_reference:{message_id:Ii(a,"message id"),channel_id:Ii(t,"channel id"),fail_if_not_exists:!1}}:{}})),r.append("files[0]",new Blob([o.bytes],{type:o.mediaType??"application/octet-stream"}),o.fileName);let s=Ii(t,"channel id");if(e?.aborted)throw jT(e);let g=fj(e,this.#r);try{return await this.#I(`channels/${s}/messages`,{method:"POST",signal:g,timeoutMs:this.#r,body:r,multipart:!0})}catch(c){throw e?.aborted?jT(e):c?.code?.startsWith?.("discord-")?fQe(c):QQe(c)}}editMessage({channelId:t,messageId:o,content:a,signal:e}){return this.#I(`channels/${Ii(t,"channel id")}/messages/${Ii(o,"message id")}`,{method:"PATCH",signal:e,body:{content:a,allowed_mentions:{parse:[],replied_user:!1}}})}sendTyping({channelId:t,signal:o}){return this.#I(`channels/${Ii(t,"channel id")}/typing`,{method:"POST",signal:o,expectBody:!1})}async addOwnReaction({channelId:t,messageId:o,emoji:a,signal:e}={}){let i=Qj(a);return await this.#I(`channels/${Ii(t,"channel id")}/messages/${Ii(o,"message id")}/reactions/${encodeURIComponent(i)}/@me`,{method:"PUT",signal:e,expectBody:!1,retry:!1}),i}removeOwnReaction({channelId:t,messageId:o,emoji:a,signal:e}={}){let i=Qj(a);return this.#I(`channels/${Ii(t,"channel id")}/messages/${Ii(o,"message id")}/reactions/${encodeURIComponent(i)}/@me`,{method:"DELETE",signal:e,expectBody:!1,retry:!1})}async#I(t,{method:o,body:a,signal:e,timeoutMs:i=15e3,expectBody:A=!0,retry:r=!0,multipart:s=!1}){let g;try{g=await this.#A(new URL(t,this.#t),{method:o,headers:{authorization:`Bot ${this.#e}`,...s?{}:{"content-type":"application/json"},"user-agent":"DeepSeek-Harness-dsh-im (https://github.com/xmanrui/dsh-im, 1.1.0)"},...a===void 0?{}:{body:s?a:JSON.stringify(a)},signal:fj(e,i),redirect:"error"})}catch(I){throw I?.name==="AbortError"||I?.name==="TimeoutError"?I:new Error(`Discord ${o} transport failed`)}let c=null;if(A||g.status===429||!g.ok)try{c=await g.json()}catch{if(A){let I=new Error(`Discord ${o} returned invalid JSON`);throw I.status=g?.status,I}}if(g.status===429&&r){let I=Math.min(1e4,Math.max(50,Number(c?.retry_after)*1e3||1e3));return await yQe(I,e),this.#I(t,{method:o,body:a,signal:e,timeoutMs:i,expectBody:A,retry:!1,multipart:s})}if(!g.ok){let I=new Error(Qs(c?.message)??`Discord API failed with HTTP ${g.status}`);I.code=`discord-${g.status}`,I.status=g.status,(Number.isInteger(c?.code)||typeof c?.code=="string")&&(I.providerCode=c.code);let d=Number(c?.retry_after);throw Number.isFinite(d)&&d>=0&&(I.retry_after=d,I.retryAfter=d),I}return A?c:null}};async function mj(n,t={}){let a=await new Ou({token:n,...t}).getCurrentUser();if(!a?.id||a?.bot!==!0)throw new Error("Discord token does not belong to a bot");return{platformId:String(a.id),name:Qs(a.global_name)??Qs(a.username)??w("Discord\u673A\u5668\u4EBA"),username:Qs(a.username)}}var SQe=Object.freeze({success(){},error(){},clear(){},settled:()=>Promise.resolve()});function Sj(n,t){!n||typeof n!="object"||(n[t]=(n[t]??0)+1)}async function wQe(n,t){let o=AbortSignal.timeout(t),a,e=new Promise((i,A)=>{a=()=>A(o.reason??new DOMException("Timed out","TimeoutError")),o.addEventListener("abort",a,{once:!0})});try{return await Promise.race([n(o),e])}finally{o.removeEventListener("abort",a)}}function Ty({adapter:n,target:t,reactions:o,status:a,logger:e=console,label:i="channel",timeoutMs:A=2e3}={}){if(!t||typeof n?.addReaction!="function"||typeof n?.removeReaction!="function"||typeof o?.processing!="string"||!o.processing||!Number.isSafeInteger(A)||A<=0)return SQe;let r=null,s=!1,g=async(B,f)=>{try{let Q=await wQe(f,A);return Sj(a,B==="add"?"reactionsAdded":"reactionsRemoved"),{ok:!0,value:Q}}catch(Q){return Sj(a,"reactionErrors"),e.warn?.(`[dsh-im:${i}] status reaction ${B} failed:`,Q?.message??Q?.name??String(Q)),{ok:!1,value:null}}},c=async B=>{if(r!==null){let Q=r;r=null,await g("remove",y=>n.removeReaction(t,Q,{signal:y}))}if(typeof B!="string"||!B)return;let f=await g("add",Q=>n.addReaction(t,B,{signal:Q}));f.ok&&f.value!==void 0&&f.value!==null&&(r=f.value)},I=c(o.processing),d=B=>{s||(s=!0,I=I.then(()=>c(B),()=>c(B)),I.catch(()=>{}))};return Object.freeze({success:()=>d(o.success),error:()=>d(o.error),clear:()=>d(null),settled:()=>I})}var wj="\u8FD9\u4E2A\u95EE\u9898\u5DF2\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u7B54\u3002",DQe="\u4EFB\u52A1\u5DF2\u5B8C\u6210\u3002";function Ba(n){return typeof n=="string"?n.trim():""}function OQe(n,t,o){return t.actor===o&&(n.kind!=="group"||n.addressed===!0)&&!Pt(n)&&!Mt(n)&&!!Ba(n.content)}function bQe(n,t,o){let a=String(n??w("\u7ED3\u679C\u6587\u4EF6")).replace(/[\r\n]+/g," ").trim().slice(0,255)||w("\u7ED3\u679C\u6587\u4EF6");switch(t?.code){case"artifact-delivery-uncertain":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u7684\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\uFF0C\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u8BD5\u3002",{name:a});case"artifact-permission-required":return o?.key==="slack"?w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 Slack \u5E94\u7528\u7F3A\u5C11 files:write \u6743\u9650\u3002\u8BF7\u66F4\u65B0 Manifest\u3001\u91CD\u65B0\u5B89\u88C5\u5E94\u7528\u5E76\u91CD\u65B0\u8FDE\u63A5\u673A\u5668\u4EBA\u540E\u91CD\u8BD5\u3002",{name:a}):o?.key==="discord"?w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u673A\u5668\u4EBA\u7F3A\u5C11 Discord \u7684 Send Messages\u3001Attach Files \u6216 Read Message History \u6743\u9650\u3002",{name:a}):o?.key==="telegram"?w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 Telegram \u4E0D\u5141\u8BB8\u673A\u5668\u4EBA\u5728\u5F53\u524D\u804A\u5929\u53D1\u9001\u6587\u6863\uFF0C\u8BF7\u68C0\u67E5\u804A\u5929\u6743\u9650\u3002",{name:a}):w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u6587\u4EF6\u53D1\u9001\u6743\u9650\uFF0C\u8BF7\u68C0\u67E5\u6E20\u9053\u6743\u9650\u3002",{name:a});case"artifact-too-large":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u6E20\u9053\u5927\u5C0F\u4E0A\u9650\uFF0C\u672A\u53D1\u9001\u3002",{name:a});case"artifact-empty":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0C\u672A\u53D1\u9001\u3002",{name:a});case"artifact-invalid":case"artifact-changed":case"artifact-unavailable":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u6216\u51C6\u5907\u53D1\u9001\uFF0C\u8BF7\u786E\u8BA4\u6587\u4EF6\u4ECD\u53EF\u8BBF\u95EE\u540E\u91CD\u8BD5\u3002",{name:a});case"artifact-rate-limited":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u5F53\u524D\u6E20\u9053\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{name:a});case"artifact-provider-rejected":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6216\u6587\u4EF6\u6D88\u606F\u3002",{name:a});default:return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6682\u65F6\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{name:a})}}function po(){return{messagesReceived:0,messagesReplied:0,messagesRejected:0,lastMessageAt:null,lastReplyAt:null,lastRejectedAt:null,lastError:null,lastMessageError:null,reactionsAdded:0,reactionsRemoved:0,reactionErrors:0}}var ys=class{#e;#A;#t;#r;#I;#o;#g;#i;#a;#s;#l;#c;#d=new Map;#n=new Map;#p=new Map;#h=new Map;#u=new Set;#C=new Set;#B;#f=new Fa;constructor({descriptor:t,bot:o,harness:a,state:e,contextEnhancement:i,accessPolicy:A,groupSessionScope:r=op,status:s=po(),logger:g=console,replyTimeoutMs:c=6e5,signal:I,resolveAgentPreset:d}){if(!t?.key||!t?.label)throw new TypeError("A channel descriptor is required");if(!o||typeof o.sendText!="function")throw new TypeError("A bot client is required");if(!a||!e)throw new TypeError("Harness client and state store are required");this.#e=t,this.#A=o,this.#t=a,this.#r=e,this.#I=i,this.#o=A,this.#g=r,this.#i=s,this.#a=g,this.#s=c,this.#l=I,this.#c=typeof d=="function"?d:null,this.#B=new Ra({label:t.key,logger:g})}get status(){return structuredClone(this.#i)}#y(){let t=this.#g;return t&&typeof t=="object"&&typeof t.getScope=="function"?np(t.getScope()):np(t)}accept(t,{contextSnapshot:o,accessDecision:a}={}){if(this.#l?.aborted)return Promise.resolve();let e=Ba(t?.conversationId),i=t?.kind==="group"?"group":"direct",A={...t,kind:i,conversationId:e},r=Ba(A.messageId),s=Ba(A.senderId);if(!r||!s||!e||A.senderIsBot===!0||this.#r.hasSeen(r)||this.#h.has(r))return Promise.resolve();if(i==="group"&&A.addressed!==!0)return this.#i.messagesRejected+=1,this.#i.lastRejectedAt=new Date().toISOString(),this.#h.set(r,null),this.#m(A,r,null);if(this.#o||a){let I=Pt(A),d=Mt(A),B=a??Ti(this.#o,{conversationType:i,senderIds:[s,Ba(A.senderAlternateId),...Array.isArray(A.senderAliasIds)?A.senderAliasIds:[]].filter(Boolean),text:A.content,hasImages:I,hasFiles:d});if(!B.allowed)return this.#i.messagesRejected+=1,this.#i.lastRejectedAt=new Date().toISOString(),this.#h.set(r,null),this.#m(A,r,B.reason==="command-not-allowed"?w(lo):B.reason==="sender-not-allowed"&&(A.kind!=="group"||A.addressed===!0)?w("\u4F60\u4E0D\u5728\u5F53\u524D\u673A\u5668\u4EBA\u7684\u8BBF\u95EE\u767D\u540D\u5355\u4E2D\u3002"):null,{recordReceived:B.reason==="command-not-allowed"||B.reason==="sender-not-allowed"})}this.#h.set(r,o===void 0?ni(this.#I,t?.kind):o);let g=Ty({adapter:this.#A,target:A.kind==="direct"||A.addressed===!0?A.reactionTarget:null,reactions:this.#e.reactions,status:this.#i,logger:this.#a,label:this.#e.key});A.statusReaction=g;let c=this.#w(A,r,s);return c.then(()=>g.success(),()=>g.error()),c}#w(t,o,a){t.kind==="direct"&&To(this.#r,t.connectionTestTarget??t.replyTarget);let e=v3({kind:t.kind,conversationId:t.conversationId,senderId:a,groupSessionScope:this.#y()}),i=this.#n.get(e),A=Ba(t.content),r=La(A);if(r&&t.kind==="group"&&t.addressed===!0)return this.#m(t,o,ps());if(r&&t.kind==="direct"){if(/^\/batch$/iu.test(A)&&(this.#d.has(e)||i||this.#B.hasPending(e)))return this.#m(t,o,Lo());let d=this.#f.handle(e,A,{plainText:!!A&&t.plainText!==!1&&!Pt(t)&&!Mt(t)&&!Kr(t)});if(d.handled)return d.kind==="submit"?this.#Q({...t,content:d.prompt,batchSubmission:{token:d.token}},o,a,e):this.#m(t,o,d.message)}else if(t.kind==="direct"&&this.#f.status(e).phase==="collecting"){let I=this.#f.handle(e,A,{plainText:!!A&&t.plainText!==!1&&!Pt(t)&&!Mt(t)&&!Kr(t)});if(I.handled)return this.#m(t,o,I.message)}let g=t.kind==="direct"&&this.#f.status(e).phase==="collecting"?null:ji(A)?go:Mt(t)?null:ha(A)?Pa:Ea(A)?co:ua(A)?Ga:null;if(g&&(t.kind!=="group"||t.addressed===!0)){let I;return I=this.#D(t,o,e,g).finally(()=>{this.#h.delete(o),this.#C.delete(I)}),this.#C.add(I),I}let c=this.#B.claimReply({key:e,actor:a,messageId:o,text:Pt(t)||Mt(t)?"":t.content,addressed:t.kind!=="group"||t.addressed===!0,hasPendingQuestion:!!i,questionCompletion:i?.submitting||i?.claimedReplyMessageId?i.queue:null,isQuestionPending:()=>this.#n.has(e),send:I=>this.#A.sendText(t.replyTarget,I)});if(c){let I;return I=c.process(async()=>this.#r.hasSeen(o)?!1:(await this.#r.markSeen(o),this.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString(),!0)).finally(()=>{this.#h.delete(o),this.#u.delete(I)}),this.#u.add(I),I}if(i&&i.actor!==a)return this.#Q(t,o,a,e);if(i?.submitting||i?.claimedReplyMessageId)return this.#Q(t,o,a,e);if(i){OQe(t,i,a)&&(i.claimedReplyMessageId=o);let d=(i.queue??Promise.resolve()).catch(()=>{}).then(()=>this.#M(t,o,a,e,i)).finally(()=>{this.#h.delete(o),i.claimedReplyMessageId===o&&(i.claimedReplyMessageId=null),i.queue===d&&(i.queue=null)});return i.queue=d,d}return this.#Q(t,o,a,e)}#m(t,o,a,{recordReceived:e=!0}={}){let i;return i=(async()=>{this.#r.hasSeen(o)||(await this.#r.markSeen(o),e&&(this.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString()),a&&await this.#A.sendText(t.replyTarget,a),this.#i.lastError=null)})().catch(async A=>{if(this.#l?.aborted){t.statusReaction?.clear();return}t.statusReaction?.error(),this.#i.lastError=A?.message??String(A);let r=rt(this.#i,A);this.#a.error?.(`[dsh-im:${this.#e.key}] failed to process a batch input message [${r.referenceId}]:`,A)}).finally(()=>{this.#h.delete(o),this.#C.delete(i)}),this.#C.add(i),i}#Q(t,o,a,e,{releaseMessageId:i=!0,alreadyRecorded:A=!1}={}){let s=(this.#d.get(e)??Promise.resolve()).catch(()=>{}).then(()=>this.#k(t,o,a,e,{alreadyRecorded:A})).finally(()=>{i&&this.#h.delete(o),this.#d.get(e)===s&&this.#d.delete(e)});return this.#d.set(e,s),s}async waitForIdle(){await Promise.allSettled([...this.#d.values(),...[...this.#n.values()].flatMap(t=>t.queue?[t.queue]:[]),...this.#u,...this.#C])}async#D(t,o,a,e){if(this.#r.hasSeen(o))return;await this.#r.markSeen(o),this.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString();let i=t.replyTarget;try{let A=await e(Ba(t.content),this.#t,this.#r,a,{signal:this.#l,isDirect:t.kind==="direct",hasImages:Pt(t),hasFiles:Mt(t),pendingInteraction:this.#n.has(a)||this.#B.hasPending(a),control:{owner:this,key:a}});A?.stopped&&await Promise.allSettled([this.#R(a),this.#B.closeRoute(a)]);for(let r of A?.messages??[A?.message])r&&await this.#A.sendText(i,r);this.#i.lastError=null}catch(A){if(A?.code==="turn-stopped"||this.#l?.aborted){t.statusReaction?.clear();return}t.statusReaction?.error(),this.#i.lastError=A?.message??String(A);let r=rt(this.#i,A);this.#a.error?.(`[dsh-im:${this.#e.key}] failed to process a command [${r.referenceId}]:`,A),await this.#A.sendText(i,ut(r)).catch(()=>{})}}sendConnectionTest(t){return mc({state:this.#r,text:t,channelLabel:w("{label}\u673A\u5668\u4EBA",{label:this.#e.label}),send:(o,a)=>this.#A.sendText(o,a)})}sendProactiveText(t,o,{signal:a}={}){return a?.throwIfAborted(),this.#A.sendText(t,o)}async#E(t,o,a=[],e){let i=await Ko({artifacts:a,baseReceipt:e,deliveryId:o,channelKey:this.#e.key,signal:this.#l,sendImage:typeof this.#A.sendImage=="function"?A=>this.#A.sendImage(t,A):void 0,sendFile:typeof this.#A.sendFile=="function"?A=>this.#A.sendFile(t,A):void 0,onFailure:(A,r)=>rt(this.#i,r,{userMessage:bQe(A?.fileName,r,this.#e),reason:r?.code}),sendFailureNotice:(A,r,s)=>this.#A.sendText(t,ut(s)),logger:this.#a});return this.#i.artifactsSent=(this.#i.artifactsSent??0)+i.artifactsSent,this.#i.artifactSendErrors=(this.#i.artifactSendErrors??0)+i.artifactSendErrors,{receipt:i.receipt,userVisible:i.userVisible,artifactSendErrors:i.artifactSendErrors}}async#k(t,o,a,e,{alreadyRecorded:i=!1}={}){if(!i){if(this.#r.hasSeen(o))return;await this.#r.markSeen(o),this.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString()}let A=t.replyTarget,r=Ba(t.content),s=t.batchSubmission,g=null,c=!1;try{if(this.#l?.throwIfAborted(),t.kind==="group"&&t.addressed!==!0){this.#i.messagesRejected+=1,this.#i.lastRejectedAt=new Date().toISOString();return}let I=Pt(t),d=Mt(t),B=Kr(t);if(!r&&!I&&!d&&!B){await this.#A.sendText(A,w("\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u6587\u4EF6\u6D88\u606F\u3002"));return}let f=r.toLowerCase();if(!I&&!d&&f==="/help"){await this.#A.sendText(A,[w("{label}\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002",{label:this.#e.label}),"",w("\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u3001\u56FE\u7247\u6216\u6587\u4EF6\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002"),w("/new \u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD"),w("/compact \u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587"),w("/history [\u6570\u91CF] \u67E5\u770B\u6700\u8FD1\u5386\u53F2\u6D88\u606F\uFF08\u9ED8\u8BA4 3 \u6761\uFF0C\u6700\u591A 5 \u6761\uFF09"),w("/workspace \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A"),w("/workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84"),w("/ws\u3001/wsl\u3001/workspaces \u5DE5\u4F5C\u533A\u547D\u4EE4\u522B\u540D"),w("/sessionlist \u6216 /sessions [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898"),w("/sessionlist --limit N \u4EC5\u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u524D N \u4E2A\u4F1A\u8BDD"),w("/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7 \u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD"),w("/models \u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B"),w("/reasoninglist \u6216 /reasonings \u6309\u5E8F\u53F7\u5217\u51FA\u5F53\u524D\u6A21\u578B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7"),w("/reasoning [\u5E8F\u53F7\u3001\u7B49\u7EA7ID\u6216 --default] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u63A8\u7406\u7B49\u7EA7"),w("/model [\u5E8F\u53F7\u6216\u5B8C\u6574\u6A21\u578BID] [\u63A8\u7406\u7B49\u7EA7ID] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B"),w("\u793A\u4F8B\uFF1A\u5148\u53D1 /models\uFF0C\u518D\u53D1 /model 2 [\u63A8\u7406\u7B49\u7EA7ID]"),w("/presetlist \u6216 /presets \u6309\u5E8F\u53F7\u5217\u51FA\u53EF\u7528 Agent Preset"),w("/preset [\u5E8F\u53F7\u6216\u5B8C\u6574ID] \u67E5\u770B\u6216\u8BBE\u7F6E\u5F53\u524D\u673A\u5668\u4EBA Agent Preset"),w("\u7EAF\u6570\u5B57 ID\uFF1A/preset id:"),w("/preset --default \u8DDF\u968F Host \u9ED8\u8BA4"),w("/stop \u505C\u6B62\u5F53\u524D\u4EFB\u52A1"),w("/steer \u8865\u5145\u6307\u4EE4 \u7EA0\u504F\u5F53\u524D\u4EFB\u52A1"),w("/batch \u5F00\u59CB\u6279\u91CF\u8F93\u5165\uFF08\u4EC5\u79C1\u804A\uFF0C\u6700\u591A 10 \u6761\u6587\u5B57\uFF09"),w("/send \u63D0\u4EA4\u5F53\u524D\u6279\u6B21"),w("/cancel \u53D6\u6D88\u5F53\u524D\u6279\u6B21"),w("/status \u68C0\u67E5\u8FDE\u63A5\u72B6\u6001"),w("/version \u67E5\u770B\u63D2\u4EF6\u7248\u672C"),w("/help \u663E\u793A\u672C\u5E2E\u52A9")].join(` +`));return}if(!I&&!d&&f==="/status"){await this.#t.ensureRunning({signal:this.#l}),await this.#A.sendText(A,w("{label}\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002",{label:this.#e.label}));return}let Q=!I&&!d?await Po(r,this.#t,e):null;if(Q){for(let N of Q.messages??[Q.message])await this.#A.sendText(A,N);return}if(!I&&!d&&f==="/new"){await this.#r.clearSession(e),await this.#A.sendText(A,w("\u5DF2\u5F00\u542F\u65B0\u4F1A\u8BDD\u3002\u8BF7\u53D1\u9001\u4F60\u7684\u95EE\u9898\u3002"));return}let y=!I&&!d?await va(r,this.#t,this.#r,e,{signal:this.#l}):null;if(y){await this.#A.sendText(A,y.message);return}await this.#A.sendTyping?.(A).catch(N=>{this.#a.warn?.(`[dsh-im:${this.#e.key}] typing indicator failed:`,N)});let m=!1;if(typeof this.#A.openDeliveryStream=="function")try{g=await this.#A.openDeliveryStream(A),c=!0}catch(N){this.#a.warn?.(`[dsh-im:${this.#e.key}] unable to start a semantic reply stream; using final delivery:`,N)}else if(typeof this.#A.openStream=="function")try{g=await this.#A.openStream(A)}catch(N){this.#a.warn?.(`[dsh-im:${this.#e.key}] unable to start a streamed reply; using text:`,N)}let _=I||B?await xo(t,{signal:this.#l}):void 0,T=this.#h.get(o),R=!1;if(T){let N=_??r,k=t.contextSource?.();_=Fo(N,T,()=>({channel:this.#e.key,senderId:a,senderName:k?.senderName,conversationTitle:k?.conversationTitle,chatId:k?.chatId??t.conversationId,threadId:k?.threadId})),R=_!==N}let{answer:L,artifacts:U=[]}=await ka({harness:this.#t,state:this.#r,key:e,text:r,content:_,contextEnhanced:R,createOptions:(()=>{let N=this.#c?.(t),k={};return this.#l&&(k.signal=this.#l),typeof N=="string"&&N&&(k.agentPreset=N),Object.keys(k).length>0?k:void 0})(),existsOptions:this.#l?{signal:this.#l}:void 0,askOptions:{timeoutMs:this.#s,signal:this.#l,control:{owner:this,key:e},onUpdate:g?async N=>{let k=N.type==="text"?N.text:N.type==="tool"?w("\u6B63\u5728\u4F7F\u7528{name}\u2026",{name:N.name}):N.text;if(k){let z=N.type==="text"?"markdown":"plain";await g.update(c?Es(k,z):k)}}:void 0,onInteraction:N=>this.#O(N,{key:e,actor:a,target:A,requiresMention:t.kind==="group"&&t.requiresMention!==!1}),onInteractionResolved:N=>this.#S(N),files:t.files}});s&&this.#f.complete(e,s.token);let F=!Ba(L)&&U.length>0,J=F?w(DQe):L,V=F?"plain":"markdown",H=null,G=null;if(g)try{let N=await g.finish(c?Es(J,V):J);m=!0,G=rr({deliveryId:o,presentation:N?.presentation??g.presentation??`${this.#e.key}-stream`,providerMessageIds:[...Hr(g),...Hr(N)],deliveryOutcome:N?.deliveryOutcome,reason:N?.reason})}catch(N){g.cancel?.(),this.#a.warn?.(`[dsh-im:${this.#e.key}] streamed reply finalization failed; using text:`,N)}if(!m)try{let N=typeof this.#A.sendDelivery=="function"?await this.#A.sendDelivery(A,Es(J,V)):await this.#A.sendText(A,J);G=rr({deliveryId:o,presentation:N?.presentation??`${this.#e.key}-text`,providerMessageIds:Hr(N),deliveryOutcome:N?.deliveryOutcome,reason:N?.reason})}catch(N){H=Yi(N)}let q=G?.deliveryOutcome==="unknown";G?.deliveryOutcome==="failed"?H=Yi(new Error(`Final text delivery failed (${G.reason??"unknown"})`),{uncertain:!1}):q&&(H=Yi(new Error(`Final text delivery outcome is unknown (${G.reason??"unknown"})`)));let K=await this.#E(A,o,U,G);if(H&&(!K.userVisible||q))throw H.deliveryReceipt=K.receipt,H;return H&&K.artifactSendErrors===0&&rt(this.#i,H),K.userVisible&&(this.#i.messagesReplied+=1,this.#i.lastReplyAt=new Date().toISOString(),this.#i.lastError=null,!H&&K.artifactSendErrors===0&&No(this.#i)),K.receipt}catch(I){let d=I?.code==="turn-stopped";s&&d&&this.#f.complete(e,s.token);let B=s&&!d?this.#f.fail(e,s.token):null;if(d){if(t.statusReaction?.clear(),g)try{await g.finish(w("\u5DF2\u505C\u6B62\u3002"))}catch{g.cancel?.()}return}if(this.#l?.aborted){t.statusReaction?.clear(),g?.cancel?.();return}t.statusReaction?.error(),this.#i.lastError=I?.message??String(I);let f=async T=>{let R=typeof g?.fail=="function"?"fail":typeof g?.finish=="function"?"finish":null;if(!R)return!1;try{let L=await g[R](T);return R==="fail"?!!L&&L.deliveryOutcome!=="failed":L!==!1&&L?.deliveryOutcome!=="failed"}catch(L){return this.#a.warn?.(`[dsh-im:${this.#e.key}] unable to finalize the failed stream:`,L),!1}},Q=vo(I),y=Ho(I),m=rt(this.#i,I,{userMessage:y??Q,reason:so(I)?.reason}),_=B?.retained?`${ut(m)} -${B.message}`:ut(m);if(this.#a.error?.(`[dsh-im:${this.#e.key}] failed to process a message [${m.referenceId}]:`,I),await f(_))return I.deliveryReceipt;g?.cancel?.();try{await this.#A.sendText(A,_)}catch(T){this.#a.error?.(`[dsh-im:${this.#e.key}] failed to send the safe error reply:`,T)}return I.deliveryReceipt}finally{await Promise.allSettled([this.#R(e),this.#B.closeRoute(e)])}}async#M(t,o,a,e,i){if(this.#l?.aborted){t.statusReaction?.clear();return}let A=this.#n.get(e),r=i.claimedReplyMessageId===o;if(!A||A!==i||A.submitting)return r&&(!A||A!==i)?this.#T(t,o):this.#Q(t,o,a,e,{releaseMessageId:!1});if(this.#r.hasSeen(o))return;if(await this.#r.markSeen(o),this.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString(),t.kind==="group"&&t.addressed!==!0){this.#i.messagesRejected+=1,this.#i.lastRejectedAt=new Date().toISOString();return}let s=t.replyTarget,g=Ba(t.content);if(!g||Pt(t)||bt(t)){try{await this.#A.sendText(s,w("\u8BF7\u7528\u6587\u5B57\u56DE\u7B54\u5F53\u524D\u95EE\u9898\u3002"))}catch(d){this.#a.error?.(`[dsh-im:${this.#e.key}] failed to reject a non-text interaction reply:`,d)}return}let c=this.#n.get(e);if(!c||c!==i||c.submitting)return r&&(!c||c!==i)?this.#T(t,o,{alreadyRecorded:!0}):this.#Q(t,o,a,e,{releaseMessageId:!1,alreadyRecorded:!0});if(c.target=s,c.needsPresentation){let d=c.presentationTask!==null;try{await this.#_(c)}catch(f){t.statusReaction?.error(),this.#i.lastError=w("{label}\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002",{label:this.#e.label}),this.#a.error?.(`[dsh-im:${this.#e.key}] failed to retry an interaction question:`,f),c.interaction.reconnect?.();return}let B=this.#n.get(e);if(!B||B!==i||B.submitting)return r&&(!B||B!==i)?this.#T(t,o,{alreadyRecorded:!0}):this.#Q(t,o,a,e,{releaseMessageId:!1,alreadyRecorded:!0});if(!d)return}let I=c.questions[c.index];if(I){if(c.answers.push(Na(I,g)),c.index+=1,c.indexthis.#A.sendText(e,c)});if(t?.kind!=="question")return;let A=t?.payload?.questions,r=Ba(t?.interactionId)||Ba(t?.rpcId);if(!Ba(t?.rpcId)||!r||!Ba(t?.sessionId)||!Array.isArray(A)||A.length===0||A.some(c=>!Ta(c))){this.#a.warn?.(`[dsh-im:${this.#e.key}] ignored an invalid Harness question interaction`);return}if(t.recovered===!0){await this.#G(t,`${this.#e.label} safely cancelled an interaction left by an earlier client.`);try{await this.#A.sendText(e,w("\u68C0\u6D4B\u5230\u8FD9\u4E2A Session \u4E2D\u9057\u7559\u7684\u5F85\u56DE\u7B54\u95EE\u9898\uFF0C\u5DF2\u5B89\u5168\u53D6\u6D88\u5E76\u7EE7\u7EED\u5904\u7406\u4F60\u521A\u624D\u7684\u6D88\u606F\u3002"))}catch(c){this.#a.error?.(`[dsh-im:${this.#e.key}] failed to send an interaction recovery notice:`,c)}return}let s=this.#n.get(o);if(s?.interactionId===r){s.interaction=t,s.needsPresentation&&await this.#_(s);return}if(this.#p.has(r))return;if(s){this.#a.warn?.(`[dsh-im:${this.#e.key}] cancelled a second pending Harness question`),await this.#G(t,`${this.#e.label} is already handling another user interaction.`);return}let g={kind:"question",interactionId:r,sessionId:t.sessionId,interaction:t,actor:a,requiresMention:i,questions:A,answers:[],index:0,target:e,queue:null,claimedReplyMessageId:null,submitting:!1,needsPresentation:!0,presentationTask:null};this.#n.set(o,g),this.#p.set(r,o),await this.#_(g)}async#S(t){if(t?.kind==="approval"){await this.#B.handleResolved(t);return}let o=Ba(t?.interactionId);if(t?.kind!=="question"||!o)return;let a=this.#p.get(o);a&&this.#N(a,o)}#_(t){if(t.presentationTask)return t.presentationTask;let o=t.questions[t.index];if(!o)return Promise.resolve();let a=(async()=>{await this.#A.sendText(t.target,da(o,t.index,t.questions.length,{requiresMention:t.requiresMention})),t.needsPresentation=!1})();return t.presentationTask=a,a.then(()=>{t.presentationTask===a&&(t.presentationTask=null)},()=>{t.presentationTask===a&&(t.presentationTask=null)}),a}async#T(t,o,{alreadyRecorded:a=!1}={}){if(!a){if(this.#r.hasSeen(o))return;await this.#r.markSeen(o),this.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString()}try{await this.#A.sendText(t.replyTarget,w(yj))}catch(e){this.#a.error?.(`[dsh-im:${this.#e.key}] failed to send an expired interaction notice:`,e)}}#P(t,o){let a=this.#n.get(t);return!a||o!==void 0&&a.interactionId!==o?null:(this.#n.delete(t),this.#p.delete(a.interactionId),a)}#N(t,o){return this.#P(t,o)!==null}async#G(t,o){try{await t.respond({ok:!1,error:{code:"cancelled",message:o,details:{}}},{signal:AbortSignal.timeout(5e3)})}catch(a){if(a?.code!=="interaction-not-pending")throw a}}async#R(t){let o=this.#P(t);if(!(!o||o.kind!=="question"))try{await this.#G(o.interaction,`The ${this.#e.label} interaction ended before the user answered.`)}catch(a){this.#a.warn?.(`[dsh-im:${this.#e.key}] failed to cancel a pending Harness interaction:`,a)}}};var JT=Object.freeze({key:"discord",label:"Discord",connectionLabel:" Gateway \u957F\u8FDE\u63A5",reactions:Object.freeze({processing:"\u{1F440}",success:"\u2705",error:"\u274C"})}),Ty=class extends ys{constructor(t){super({descriptor:JT,...t})}};var bu=class extends dp{constructor(t){super({...t,descriptor:JT,inspectToken:t.inspectToken??fj,deriveIdentity:hj,maskPlatformId:Ej})}};var Ny=class extends yr{constructor(t){super({...t,rpcIdPrefix:"discord",logPrefix:"dsh-discord"})}};function ms(n,t){let o=typeof n=="string"?n.trim():"";if(!o)return[];let a=[],e=o;for(;e.length>t;){let i=e.lastIndexOf(` -`,t);inull,logger:r=console}){let s,g=[],c=null,I=null,d=null,B=!1,f=n,Q=()=>{B||I!==null||d||!c||(I=setTimeout(()=>{I=null;let y=c;c=null;let m=ms(y,t)[0]??n;d=Promise.resolve(m===f?void 0:e(s,m)).then(()=>{f=m}).catch(_=>r.warn?.("[dsh-im] streamed message update failed:",_)).finally(()=>{d=null,Q()})},o),I?.unref?.())};return{get messageId(){return s},get providerMessageIds(){return[...g]},async start(){return s=await a(n),(typeof s=="string"&&s.trim()||Number.isSafeInteger(s))&&g.push(String(s)),this},update(y){B||typeof y!="string"||!y.trim()||(c=y,Q())},async finish(y){if(B)throw new Error("Message stream is already closed");B=!0,I!==null&&clearTimeout(I),I=null,c=null,await d?.catch(()=>{});let m=ms(y,t),_=m[0]??w("\u5904\u7406\u5B8C\u6210\u3002");_!==f&&await e(s,_),f=_;for(let T of m.slice(1)){let R=await i(T),L=A(R);(typeof L=="string"&&L.trim()||Number.isSafeInteger(L))&&g.push(String(L))}},cancel(){B=!0,c=null,I!==null&&clearTimeout(I),I=null}}}async function mj(n){try{await n?.body?.cancel?.()}catch{}}function SQe(n,t){return!Array.isArray(t)||t.some(o=>typeof o=="string"&&(n.hostname===o||o.startsWith(".")&&(n.hostname===o.slice(1)||n.hostname.endsWith(o))))}async function pp(n,{fetchImpl:t=fetch,headers:o,signal:a,allowedHosts:e}={}){let i=new URL(n);if(i.protocol!=="https:")throw new Error("File download URL must use HTTPS");if(!SQe(i,e))throw new Error("File download URL is not hosted by the messaging platform");let A=await t(i,{method:"GET",headers:o,signal:a,redirect:"manual"});if(Number.isInteger(A?.status)&&A.status>=300&&A.status<400){await mj(A);let r=new Error(`File download redirect was blocked (HTTP ${A.status})`);throw r.code="file-redirect-blocked",r}if(!A?.ok){await mj(A);let r=new Error(`File download failed with HTTP ${A?.status??"unknown"}`);throw r.code="file-http-error",r.status=A?.status,r}if(A.body?.[Symbol.asyncIterator])return{stream:A.body};if(typeof A.arrayBuffer=="function"){let r=Buffer.from(await A.arrayBuffer());return{stream:(async function*(){yield r})()}}throw new Error("File download returned no readable body")}var wQe=37377,DQe=5e3,Sj=Object.freeze([1e3,3e3,5e3,1e4,3e4]),OQe=0,bQe=5,MQe=10,_Qe=11,TQe=12,NQe=new Set([MQe,_Qe,TQe]),RQe=new Set(["image/jpeg","image/png","image/webp","image/gif"]),kQe=new Map([[".jpg","image/jpeg"],[".jpeg","image/jpeg"],[".png","image/png"],[".webp","image/webp"],[".gif","image/gif"]]),bj=Object.freeze(["cdn.discordapp.com"]);function vQe(n){let t=new URL(n);if(t.protocol!=="wss:")throw new Error("Discord returned an insecure Gateway URL");return t.searchParams.set("v","10"),t.searchParams.set("encoding","json"),t.href}function qT(n,t,o){if(typeof n.addEventListener=="function")n.addEventListener(t,o);else if(typeof n.on=="function")n.on(t,o);else throw new TypeError("Discord WebSocket does not support events")}function PQe(n){return typeof n=="string"?n:typeof n?.data=="string"?n.data:Buffer.isBuffer(n)?n.toString("utf8"):Buffer.isBuffer(n?.data)?n.data.toString("utf8"):null}function GQe(n){if(n===4004){let o=new Error(w("Discord Bot Token \u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\u3002"));return o.code="discord-401",o}if(n===4013||n===4014){let o=new Error(w("Discord Gateway Intents \u914D\u7F6E\u4E0D\u6B63\u786E\uFF0C\u8BF7\u68C0\u67E5 Developer Portal \u7684 Bot \u8BBE\u7F6E\u3002"));return o.code="discord-intents",o}let t=new Error(`Discord Gateway closed (${n||"unknown"})`);return t.code="discord-gateway-closed",t}function Mj(n,t){return typeof n!="string"?"":n.replace(new RegExp(`<@!?${t}>`,"g"),"").trim()}function FQe(n,t){return[...Mj(n?.content??"",t).replace(/\s+/g," ").trim()||"DeepSeek Harness"].slice(0,100).join("")}function WT(n){return NQe.has(Number(n?.type))}function _j(n,t){return WT(n)&&String(n?.id??"")===String(t?.id??"")&&String(n?.parent_id??"")===String(t?.channel_id??"")}function zT(n,t){return n?.id&&t?.(n),n}function ol(n,t,o,{fromSourceMessage:a=!1,fallback:e=null,notice:i=null}={}){let A=String(t?.id??n.conversationId),r=WT(t),s=r&&String(t?.owner_id??"")===String(o),g=r&&t?.parent_id?String(t.parent_id):A;return{...n,conversationId:A,addressed:n.addressed||s,requiresMention:r?!s:n.kind==="group",replyTarget:{channelId:A,...!a&&n.replyTarget?.replyToMessageId?{replyToMessageId:n.replyTarget.replyToMessageId}:{},...i?{notice:i}:{}},connectionTestTarget:{channelId:A},conversationRoute:{peerId:g,...r?{threadId:A,managed:s}:{},...e?{fallback:e}:{}}}}function LQe(n){let t=Number(n?.status);return!Number.isInteger(t)||t>=500}function wj(n){let t=new Error("Discord Thread creation result is uncertain",{cause:n});return t.code="discord-thread-create-uncertain",t}async function UQe(n,t,{signal:o,onChannel:a}={}){try{let e=zT(await n.getChannel({channelId:String(t.id),signal:o}),a);return _j(e,t)?e:null}catch(e){if(e?.status===404)return null;throw e}}async function Dj(n,t,o){try{await n.createMessage({channelId:t.replyTarget.channelId,replyToMessageId:t.replyTarget.replyToMessageId,content:"Thread \u521B\u5EFA\u7ED3\u679C\u6682\u65F6\u65E0\u6CD5\u786E\u8BA4\u3002\u82E5\u5DF2\u521B\u5EFA\uFF0C\u8BF7\u5728\u5BF9\u5E94 Thread \u4E2D\u91CD\u8BD5\uFF1B\u82E5\u672A\u521B\u5EFA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u65B0 @\u673A\u5668\u4EBA\u3002",signal:o})}catch(a){if(o?.aborted)throw o.reason??a}}function Tj(n){let t=typeof n?.content_type=="string"?n.content_type.split(";",1)[0].trim().toLowerCase():"";if(RQe.has(t))return t;let o=typeof n?.filename=="string"?n.filename.toLowerCase():"";for(let[a,e]of kQe)if(o.endsWith(a))return e;return null}function Nj(n){return Number.isSafeInteger(n)&&n>=0?n:void 0}function HQe(n,t){let o=Tj(n);return!o||typeof n?.url!="string"?null:{name:typeof n.filename=="string"?n.filename:void 0,mediaType:o,size:Nj(n.size),load:a=>ko(n.url,{...a,fetchImpl:t,allowedHosts:bj})}}function KQe(n,t){if(Tj(n)||typeof n?.url!="string"||!n.url)return null;let o=typeof n.content_type=="string"&&n.content_type?n.content_type.split(";",1)[0].trim().toLowerCase():void 0;return{name:typeof n.filename=="string"&&n.filename?n.filename:String(n.id??"discord-file"),...o?{mediaType:o}:{},size:Nj(n.size),load:({signal:a}={})=>pp(n.url,{fetchImpl:t,signal:a,allowedHosts:bj})}}function xQe(n){if(!n||typeof n!="object")return null;let t=typeof n.content_type=="string"?n.content_type.split(";",1)[0].trim().toLowerCase():"",o=t.startsWith("image/")?"image":t.startsWith("audio/")?"audio":t.startsWith("video/")?"video":"file",a=typeof n.filename=="string"&&n.filename?n.filename:void 0;return{kind:o,...a?{name:a}:{}}}function Oj(n,t){if(!n||typeof n!="object")return null;let o=typeof n.id=="string"&&n.id?n.id:t,a=typeof n.author?.id=="string"&&n.author.id?n.author.id:void 0,e=[n.member?.nick,n.author?.global_name,n.author?.username].find(A=>typeof A=="string"&&A.trim()),i=Array.isArray(n.attachments)?n.attachments.map(xQe).filter(Boolean):[];return Array.isArray(n.sticker_items)&&i.push(...n.sticker_items.map(A=>({kind:"image",...typeof A?.name=="string"&&A.name?{name:A.name}:{}}))),{...o?{messageId:String(o)}:{},...a?{authorId:a}:{},...e?{authorName:e}:{},content:typeof n.content=="string"?n.content:"",attachments:i}}function YQe(n,t){let o=String(n?.channel_id??""),a=typeof n?.message_reference?.message_id=="string"&&n.message_reference.message_id?n.message_reference.message_id:void 0,e=n?.message_reference?.channel_id;if(e!==void 0&&String(e)!==o)return{...a?{messageId:a}:{},unavailableReason:"not-found"};if(Object.hasOwn(n??{},"referenced_message")){if(n.referenced_message===null)return{...a?{messageId:a}:{},unavailableReason:"deleted"};if(n.referenced_message&&typeof n.referenced_message=="object"){let i=typeof n.referenced_message.id=="string"&&n.referenced_message.id?n.referenced_message.id:void 0;return String(n.referenced_message.channel_id??"")!==o||!i||a&&i!==a?{...a?{messageId:a}:{},unavailableReason:"not-found"}:Oj(n.referenced_message,a)??void 0}}if(a)return typeof t!="function"?{messageId:a,unavailableReason:"not-delivered"}:{messageId:a,load:async({signal:i}={})=>{let A=await t({channelId:o,messageId:a,signal:i});return!A||String(A.id??"")!==a||String(A.channel_id??"")!==o?null:Oj(A,a)}}}function Rj(n,t,{fetchImpl:o=fetch,loadReply:a}={}){if(!n?.id||!n?.channel_id||!n?.author?.id||Number(n.type)===21)return null;let e=!n.guild_id,i=e||n.mentions?.some(r=>String(r?.id)===String(t)),A=YQe(n,a);return{messageId:String(n.id),senderId:String(n.author.id),contextSource:()=>({senderName:[n.member?.nick,n.author.global_name,n.author.username].find(r=>typeof r=="string"&&r.trim())}),senderIsBot:n.author.bot===!0,kind:e?"direct":"group",conversationId:String(n.channel_id),content:Mj(n.content??"",t),plainText:(!Array.isArray(n.attachments)||n.attachments.length===0)&&(!Array.isArray(n.sticker_items)||n.sticker_items.length===0)&&!n.poll,images:Array.isArray(n.attachments)?n.attachments.map(r=>HQe(r,o)).filter(Boolean):[],files:Array.isArray(n.attachments)?n.attachments.map(r=>KQe(r,o)).filter(Boolean):[],...A?{replyTo:A}:{},addressed:i,replyTarget:{channelId:String(n.channel_id),replyToMessageId:String(n.id)},reactionTarget:{channelId:String(n.channel_id),messageId:String(n.id)},connectionTestTarget:{channelId:String(n.channel_id)}}}async function jQe(n,t,{api:o,channel:a,fetchImpl:e=fetch,signal:i,onChannel:A}={}){let r=Rj(n,t,{fetchImpl:e,loadReply:typeof o?.getMessage=="function"?I=>o.getMessage(I):void 0});if(!r||r.senderIsBot)return r;if(i?.throwIfAborted(),r.kind==="direct")return ol(r,{id:r.conversationId,type:1},t);if(!o||typeof o.getChannel!="function")throw new TypeError("Discord route resolution requires the Discord API");let s=zT(a??await o.getChannel({channelId:r.conversationId,signal:i}),A);if(WT(s)||!r.addressed)return ol(r,s,t);let g=Number(s?.type);if(g!==OQe&&g!==bQe)return ol(r,s,t,{fallback:"unsupported-channel",notice:"\u5F53\u524D\u9891\u9053\u4E0D\u652F\u6301\u81EA\u52A8\u521B\u5EFA Thread\uFF0C\u5DF2\u76F4\u63A5\u5728\u5F53\u524D\u9891\u9053\u56DE\u590D\u3002"});i?.throwIfAborted();let c;try{if(c=zT(await o.startThreadFromMessage({channelId:r.conversationId,messageId:r.messageId,name:FQe(n,t),signal:i}),A),!_j(c,n))throw new Error("Discord returned an invalid thread for the source message")}catch(I){let d;try{d=await UQe(o,n,{signal:AbortSignal.timeout(DQe),onChannel:A})}catch(B){throw i?.aborted?i.reason??I:(await Dj(o,r,i),wj(B))}if(d)return ol(r,d,t,{fromSourceMessage:!0});if(i?.aborted)throw i.reason??I;if(LQe(I))throw await Dj(o,r,i),wj(I);return ol(r,s,t,{fallback:"thread-create-failed",notice:"\u65E0\u6CD5\u521B\u5EFA Thread\uFF0C\u5DF2\u76F4\u63A5\u5728\u5F53\u524D\u9891\u9053\u56DE\u590D\u3002"})}return ol(r,c,t,{fromSourceMessage:!0})}var VT=class{#e;#A;#t=new WeakSet;constructor({api:t,signal:o}){this.#e=t,this.#A=o}async sendText(t,o){let a=!this.#t.has(t)&&t?.notice?String(t.notice):null,e=ms(a?`${a} +${B.message}`:ut(m);if(this.#a.error?.(`[dsh-im:${this.#e.key}] failed to process a message [${m.referenceId}]:`,I),await f(_))return I.deliveryReceipt;g?.cancel?.();try{await this.#A.sendText(A,_)}catch(T){this.#a.error?.(`[dsh-im:${this.#e.key}] failed to send the safe error reply:`,T)}return I.deliveryReceipt}finally{await Promise.allSettled([this.#R(e),this.#B.closeRoute(e)])}}async#M(t,o,a,e,i){if(this.#l?.aborted){t.statusReaction?.clear();return}let A=this.#n.get(e),r=i.claimedReplyMessageId===o;if(!A||A!==i||A.submitting)return r&&(!A||A!==i)?this.#T(t,o):this.#Q(t,o,a,e,{releaseMessageId:!1});if(this.#r.hasSeen(o))return;if(await this.#r.markSeen(o),this.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString(),t.kind==="group"&&t.addressed!==!0){this.#i.messagesRejected+=1,this.#i.lastRejectedAt=new Date().toISOString();return}let s=t.replyTarget,g=Ba(t.content);if(!g||Pt(t)||Mt(t)){try{await this.#A.sendText(s,w("\u8BF7\u7528\u6587\u5B57\u56DE\u7B54\u5F53\u524D\u95EE\u9898\u3002"))}catch(d){this.#a.error?.(`[dsh-im:${this.#e.key}] failed to reject a non-text interaction reply:`,d)}return}let c=this.#n.get(e);if(!c||c!==i||c.submitting)return r&&(!c||c!==i)?this.#T(t,o,{alreadyRecorded:!0}):this.#Q(t,o,a,e,{releaseMessageId:!1,alreadyRecorded:!0});if(c.target=s,c.needsPresentation){let d=c.presentationTask!==null;try{await this.#_(c)}catch(f){t.statusReaction?.error(),this.#i.lastError=w("{label}\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002",{label:this.#e.label}),this.#a.error?.(`[dsh-im:${this.#e.key}] failed to retry an interaction question:`,f),c.interaction.reconnect?.();return}let B=this.#n.get(e);if(!B||B!==i||B.submitting)return r&&(!B||B!==i)?this.#T(t,o,{alreadyRecorded:!0}):this.#Q(t,o,a,e,{releaseMessageId:!1,alreadyRecorded:!0});if(!d)return}let I=c.questions[c.index];if(I){if(c.answers.push(Na(I,g)),c.index+=1,c.indexthis.#A.sendText(e,c)});if(t?.kind!=="question")return;let A=t?.payload?.questions,r=Ba(t?.interactionId)||Ba(t?.rpcId);if(!Ba(t?.rpcId)||!r||!Ba(t?.sessionId)||!Array.isArray(A)||A.length===0||A.some(c=>!Ta(c))){this.#a.warn?.(`[dsh-im:${this.#e.key}] ignored an invalid Harness question interaction`);return}if(t.recovered===!0){await this.#G(t,`${this.#e.label} safely cancelled an interaction left by an earlier client.`);try{await this.#A.sendText(e,w("\u68C0\u6D4B\u5230\u8FD9\u4E2A Session \u4E2D\u9057\u7559\u7684\u5F85\u56DE\u7B54\u95EE\u9898\uFF0C\u5DF2\u5B89\u5168\u53D6\u6D88\u5E76\u7EE7\u7EED\u5904\u7406\u4F60\u521A\u624D\u7684\u6D88\u606F\u3002"))}catch(c){this.#a.error?.(`[dsh-im:${this.#e.key}] failed to send an interaction recovery notice:`,c)}return}let s=this.#n.get(o);if(s?.interactionId===r){s.interaction=t,s.needsPresentation&&await this.#_(s);return}if(this.#p.has(r))return;if(s){this.#a.warn?.(`[dsh-im:${this.#e.key}] cancelled a second pending Harness question`),await this.#G(t,`${this.#e.label} is already handling another user interaction.`);return}let g={kind:"question",interactionId:r,sessionId:t.sessionId,interaction:t,actor:a,requiresMention:i,questions:A,answers:[],index:0,target:e,queue:null,claimedReplyMessageId:null,submitting:!1,needsPresentation:!0,presentationTask:null};this.#n.set(o,g),this.#p.set(r,o),await this.#_(g)}async#S(t){if(t?.kind==="approval"){await this.#B.handleResolved(t);return}let o=Ba(t?.interactionId);if(t?.kind!=="question"||!o)return;let a=this.#p.get(o);a&&this.#N(a,o)}#_(t){if(t.presentationTask)return t.presentationTask;let o=t.questions[t.index];if(!o)return Promise.resolve();let a=(async()=>{await this.#A.sendText(t.target,pa(o,t.index,t.questions.length,{requiresMention:t.requiresMention})),t.needsPresentation=!1})();return t.presentationTask=a,a.then(()=>{t.presentationTask===a&&(t.presentationTask=null)},()=>{t.presentationTask===a&&(t.presentationTask=null)}),a}async#T(t,o,{alreadyRecorded:a=!1}={}){if(!a){if(this.#r.hasSeen(o))return;await this.#r.markSeen(o),this.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString()}try{await this.#A.sendText(t.replyTarget,w(wj))}catch(e){this.#a.error?.(`[dsh-im:${this.#e.key}] failed to send an expired interaction notice:`,e)}}#P(t,o){let a=this.#n.get(t);return!a||o!==void 0&&a.interactionId!==o?null:(this.#n.delete(t),this.#p.delete(a.interactionId),a)}#N(t,o){return this.#P(t,o)!==null}async#G(t,o){try{await t.respond({ok:!1,error:{code:"cancelled",message:o,details:{}}},{signal:AbortSignal.timeout(5e3)})}catch(a){if(a?.code!=="interaction-not-pending")throw a}}async#R(t){let o=this.#P(t);if(!(!o||o.kind!=="question"))try{await this.#G(o.interaction,`The ${this.#e.label} interaction ended before the user answered.`)}catch(a){this.#a.warn?.(`[dsh-im:${this.#e.key}] failed to cancel a pending Harness interaction:`,a)}}};var JT=Object.freeze({key:"discord",label:"Discord",connectionLabel:" Gateway \u957F\u8FDE\u63A5",reactions:Object.freeze({processing:"\u{1F440}",success:"\u2705",error:"\u274C"})}),Ny=class extends ys{constructor(t){super({descriptor:JT,...t})}};var bu=class extends dp{constructor(t){super({...t,descriptor:JT,inspectToken:t.inspectToken??mj,deriveIdentity:Cj,maskPlatformId:Bj})}};var Ry=class extends yr{constructor(t){super({...t,rpcIdPrefix:"discord",logPrefix:"dsh-discord"})}};function ms(n,t){let o=typeof n=="string"?n.trim():"";if(!o)return[];let a=[],e=o;for(;e.length>t;){let i=e.lastIndexOf(` +`,t);inull,logger:r=console}){let s,g=[],c=null,I=null,d=null,B=!1,f=n,Q=()=>{B||I!==null||d||!c||(I=setTimeout(()=>{I=null;let y=c;c=null;let m=ms(y,t)[0]??n;d=Promise.resolve(m===f?void 0:e(s,m)).then(()=>{f=m}).catch(_=>r.warn?.("[dsh-im] streamed message update failed:",_)).finally(()=>{d=null,Q()})},o),I?.unref?.())};return{get messageId(){return s},get providerMessageIds(){return[...g]},async start(){return s=await a(n),(typeof s=="string"&&s.trim()||Number.isSafeInteger(s))&&g.push(String(s)),this},update(y){B||typeof y!="string"||!y.trim()||(c=y,Q())},async finish(y){if(B)throw new Error("Message stream is already closed");B=!0,I!==null&&clearTimeout(I),I=null,c=null,await d?.catch(()=>{});let m=ms(y,t),_=m[0]??w("\u5904\u7406\u5B8C\u6210\u3002");_!==f&&await e(s,_),f=_;for(let T of m.slice(1)){let R=await i(T),L=A(R);(typeof L=="string"&&L.trim()||Number.isSafeInteger(L))&&g.push(String(L))}},cancel(){B=!0,c=null,I!==null&&clearTimeout(I),I=null}}}async function Dj(n){try{await n?.body?.cancel?.()}catch{}}function MQe(n,t){return!Array.isArray(t)||t.some(o=>typeof o=="string"&&(n.hostname===o||o.startsWith(".")&&(n.hostname===o.slice(1)||n.hostname.endsWith(o))))}async function pp(n,{fetchImpl:t=fetch,headers:o,signal:a,allowedHosts:e}={}){let i=new URL(n);if(i.protocol!=="https:")throw new Error("File download URL must use HTTPS");if(!MQe(i,e))throw new Error("File download URL is not hosted by the messaging platform");let A=await t(i,{method:"GET",headers:o,signal:a,redirect:"manual"});if(Number.isInteger(A?.status)&&A.status>=300&&A.status<400){await Dj(A);let r=new Error(`File download redirect was blocked (HTTP ${A.status})`);throw r.code="file-redirect-blocked",r}if(!A?.ok){await Dj(A);let r=new Error(`File download failed with HTTP ${A?.status??"unknown"}`);throw r.code="file-http-error",r.status=A?.status,r}if(A.body?.[Symbol.asyncIterator])return{stream:A.body};if(typeof A.arrayBuffer=="function"){let r=Buffer.from(await A.arrayBuffer());return{stream:(async function*(){yield r})()}}throw new Error("File download returned no readable body")}var _Qe=37377,TQe=5e3,Oj=Object.freeze([1e3,3e3,5e3,1e4,3e4]),NQe=0,RQe=5,kQe=10,vQe=11,PQe=12,GQe=new Set([kQe,vQe,PQe]),FQe=new Set(["image/jpeg","image/png","image/webp","image/gif"]),LQe=new Map([[".jpg","image/jpeg"],[".jpeg","image/jpeg"],[".png","image/png"],[".webp","image/webp"],[".gif","image/gif"]]),Tj=Object.freeze(["cdn.discordapp.com"]);function UQe(n){let t=new URL(n);if(t.protocol!=="wss:")throw new Error("Discord returned an insecure Gateway URL");return t.searchParams.set("v","10"),t.searchParams.set("encoding","json"),t.href}function qT(n,t,o){if(typeof n.addEventListener=="function")n.addEventListener(t,o);else if(typeof n.on=="function")n.on(t,o);else throw new TypeError("Discord WebSocket does not support events")}function HQe(n){return typeof n=="string"?n:typeof n?.data=="string"?n.data:Buffer.isBuffer(n)?n.toString("utf8"):Buffer.isBuffer(n?.data)?n.data.toString("utf8"):null}function KQe(n){if(n===4004){let o=new Error(w("Discord Bot Token \u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\u3002"));return o.code="discord-401",o}if(n===4013||n===4014){let o=new Error(w("Discord Gateway Intents \u914D\u7F6E\u4E0D\u6B63\u786E\uFF0C\u8BF7\u68C0\u67E5 Developer Portal \u7684 Bot \u8BBE\u7F6E\u3002"));return o.code="discord-intents",o}let t=new Error(`Discord Gateway closed (${n||"unknown"})`);return t.code="discord-gateway-closed",t}function Nj(n,t){return typeof n!="string"?"":n.replace(new RegExp(`<@!?${t}>`,"g"),"").trim()}function xQe(n,t){return[...Nj(n?.content??"",t).replace(/\s+/g," ").trim()||"DeepSeek Harness"].slice(0,100).join("")}function WT(n){return GQe.has(Number(n?.type))}function Rj(n,t){return WT(n)&&String(n?.id??"")===String(t?.id??"")&&String(n?.parent_id??"")===String(t?.channel_id??"")}function zT(n,t){return n?.id&&t?.(n),n}function ol(n,t,o,{fromSourceMessage:a=!1,fallback:e=null,notice:i=null}={}){let A=String(t?.id??n.conversationId),r=WT(t),s=r&&String(t?.owner_id??"")===String(o),g=r&&t?.parent_id?String(t.parent_id):A;return{...n,conversationId:A,addressed:n.addressed||s,requiresMention:r?!s:n.kind==="group",replyTarget:{channelId:A,...!a&&n.replyTarget?.replyToMessageId?{replyToMessageId:n.replyTarget.replyToMessageId}:{},...i?{notice:i}:{}},connectionTestTarget:{channelId:A},conversationRoute:{peerId:g,...r?{threadId:A,managed:s}:{},...e?{fallback:e}:{}}}}function YQe(n){let t=Number(n?.status);return!Number.isInteger(t)||t>=500}function bj(n){let t=new Error("Discord Thread creation result is uncertain",{cause:n});return t.code="discord-thread-create-uncertain",t}async function jQe(n,t,{signal:o,onChannel:a}={}){try{let e=zT(await n.getChannel({channelId:String(t.id),signal:o}),a);return Rj(e,t)?e:null}catch(e){if(e?.status===404)return null;throw e}}async function Mj(n,t,o){try{await n.createMessage({channelId:t.replyTarget.channelId,replyToMessageId:t.replyTarget.replyToMessageId,content:"Thread \u521B\u5EFA\u7ED3\u679C\u6682\u65F6\u65E0\u6CD5\u786E\u8BA4\u3002\u82E5\u5DF2\u521B\u5EFA\uFF0C\u8BF7\u5728\u5BF9\u5E94 Thread \u4E2D\u91CD\u8BD5\uFF1B\u82E5\u672A\u521B\u5EFA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u65B0 @\u673A\u5668\u4EBA\u3002",signal:o})}catch(a){if(o?.aborted)throw o.reason??a}}function kj(n){let t=typeof n?.content_type=="string"?n.content_type.split(";",1)[0].trim().toLowerCase():"";if(FQe.has(t))return t;let o=typeof n?.filename=="string"?n.filename.toLowerCase():"";for(let[a,e]of LQe)if(o.endsWith(a))return e;return null}function vj(n){return Number.isSafeInteger(n)&&n>=0?n:void 0}function JQe(n,t){let o=kj(n);return!o||typeof n?.url!="string"?null:{name:typeof n.filename=="string"?n.filename:void 0,mediaType:o,size:vj(n.size),load:a=>ko(n.url,{...a,fetchImpl:t,allowedHosts:Tj})}}function qQe(n,t){if(kj(n)||typeof n?.url!="string"||!n.url)return null;let o=typeof n.content_type=="string"&&n.content_type?n.content_type.split(";",1)[0].trim().toLowerCase():void 0;return{name:typeof n.filename=="string"&&n.filename?n.filename:String(n.id??"discord-file"),...o?{mediaType:o}:{},size:vj(n.size),load:({signal:a}={})=>pp(n.url,{fetchImpl:t,signal:a,allowedHosts:Tj})}}function zQe(n){if(!n||typeof n!="object")return null;let t=typeof n.content_type=="string"?n.content_type.split(";",1)[0].trim().toLowerCase():"",o=t.startsWith("image/")?"image":t.startsWith("audio/")?"audio":t.startsWith("video/")?"video":"file",a=typeof n.filename=="string"&&n.filename?n.filename:void 0;return{kind:o,...a?{name:a}:{}}}function _j(n,t){if(!n||typeof n!="object")return null;let o=typeof n.id=="string"&&n.id?n.id:t,a=typeof n.author?.id=="string"&&n.author.id?n.author.id:void 0,e=[n.member?.nick,n.author?.global_name,n.author?.username].find(A=>typeof A=="string"&&A.trim()),i=Array.isArray(n.attachments)?n.attachments.map(zQe).filter(Boolean):[];return Array.isArray(n.sticker_items)&&i.push(...n.sticker_items.map(A=>({kind:"image",...typeof A?.name=="string"&&A.name?{name:A.name}:{}}))),{...o?{messageId:String(o)}:{},...a?{authorId:a}:{},...e?{authorName:e}:{},content:typeof n.content=="string"?n.content:"",attachments:i}}function VQe(n,t){let o=String(n?.channel_id??""),a=typeof n?.message_reference?.message_id=="string"&&n.message_reference.message_id?n.message_reference.message_id:void 0,e=n?.message_reference?.channel_id;if(e!==void 0&&String(e)!==o)return{...a?{messageId:a}:{},unavailableReason:"not-found"};if(Object.hasOwn(n??{},"referenced_message")){if(n.referenced_message===null)return{...a?{messageId:a}:{},unavailableReason:"deleted"};if(n.referenced_message&&typeof n.referenced_message=="object"){let i=typeof n.referenced_message.id=="string"&&n.referenced_message.id?n.referenced_message.id:void 0;return String(n.referenced_message.channel_id??"")!==o||!i||a&&i!==a?{...a?{messageId:a}:{},unavailableReason:"not-found"}:_j(n.referenced_message,a)??void 0}}if(a)return typeof t!="function"?{messageId:a,unavailableReason:"not-delivered"}:{messageId:a,load:async({signal:i}={})=>{let A=await t({channelId:o,messageId:a,signal:i});return!A||String(A.id??"")!==a||String(A.channel_id??"")!==o?null:_j(A,a)}}}function Pj(n,t,{fetchImpl:o=fetch,loadReply:a}={}){if(!n?.id||!n?.channel_id||!n?.author?.id||Number(n.type)===21)return null;let e=!n.guild_id,i=e||n.mentions?.some(r=>String(r?.id)===String(t)),A=VQe(n,a);return{messageId:String(n.id),senderId:String(n.author.id),contextSource:()=>({senderName:[n.member?.nick,n.author.global_name,n.author.username].find(r=>typeof r=="string"&&r.trim())}),senderIsBot:n.author.bot===!0,kind:e?"direct":"group",conversationId:String(n.channel_id),content:Nj(n.content??"",t),plainText:(!Array.isArray(n.attachments)||n.attachments.length===0)&&(!Array.isArray(n.sticker_items)||n.sticker_items.length===0)&&!n.poll,images:Array.isArray(n.attachments)?n.attachments.map(r=>JQe(r,o)).filter(Boolean):[],files:Array.isArray(n.attachments)?n.attachments.map(r=>qQe(r,o)).filter(Boolean):[],...A?{replyTo:A}:{},addressed:i,replyTarget:{channelId:String(n.channel_id),replyToMessageId:String(n.id)},reactionTarget:{channelId:String(n.channel_id),messageId:String(n.id)},connectionTestTarget:{channelId:String(n.channel_id)}}}async function WQe(n,t,{api:o,channel:a,fetchImpl:e=fetch,signal:i,onChannel:A}={}){let r=Pj(n,t,{fetchImpl:e,loadReply:typeof o?.getMessage=="function"?I=>o.getMessage(I):void 0});if(!r||r.senderIsBot)return r;if(i?.throwIfAborted(),r.kind==="direct")return ol(r,{id:r.conversationId,type:1},t);if(!o||typeof o.getChannel!="function")throw new TypeError("Discord route resolution requires the Discord API");let s=zT(a??await o.getChannel({channelId:r.conversationId,signal:i}),A);if(WT(s)||!r.addressed)return ol(r,s,t);let g=Number(s?.type);if(g!==NQe&&g!==RQe)return ol(r,s,t,{fallback:"unsupported-channel",notice:"\u5F53\u524D\u9891\u9053\u4E0D\u652F\u6301\u81EA\u52A8\u521B\u5EFA Thread\uFF0C\u5DF2\u76F4\u63A5\u5728\u5F53\u524D\u9891\u9053\u56DE\u590D\u3002"});i?.throwIfAborted();let c;try{if(c=zT(await o.startThreadFromMessage({channelId:r.conversationId,messageId:r.messageId,name:xQe(n,t),signal:i}),A),!Rj(c,n))throw new Error("Discord returned an invalid thread for the source message")}catch(I){let d;try{d=await jQe(o,n,{signal:AbortSignal.timeout(TQe),onChannel:A})}catch(B){throw i?.aborted?i.reason??I:(await Mj(o,r,i),bj(B))}if(d)return ol(r,d,t,{fromSourceMessage:!0});if(i?.aborted)throw i.reason??I;if(YQe(I))throw await Mj(o,r,i),bj(I);return ol(r,s,t,{fallback:"thread-create-failed",notice:"\u65E0\u6CD5\u521B\u5EFA Thread\uFF0C\u5DF2\u76F4\u63A5\u5728\u5F53\u524D\u9891\u9053\u56DE\u590D\u3002"})}return ol(r,c,t,{fromSourceMessage:!0})}var VT=class{#e;#A;#t=new WeakSet;constructor({api:t,signal:o}){this.#e=t,this.#A=o}async sendText(t,o){let a=!this.#t.has(t)&&t?.notice?String(t.notice):null,e=ms(a?`${a} ${o}`:o,1900),i=[];for(let[A,r]of e.entries()){let s=await this.#e.createMessage({channelId:t.channelId,content:r,replyToMessageId:A===0?t.replyToMessageId:void 0,signal:this.#A});a&&A===0&&this.#t.add(t),typeof s?.id=="string"&&s.id&&i.push(s.id)}return{providerMessageIds:i}}sendTyping(t){return this.#e.sendTyping({channelId:t.channelId,signal:this.#A})}sendFile(t,o){return this.#e.createFileMessage({channelId:t.channelId,file:o,replyToMessageId:t.replyToMessageId,signal:this.#A})}addReaction(t,o,{signal:a}={}){return this.#e.addOwnReaction({channelId:t.channelId,messageId:t.messageId,emoji:o,signal:this.#r(a)})}removeReaction(t,o,{signal:a}={}){return this.#e.removeOwnReaction({channelId:t.channelId,messageId:t.messageId,emoji:o,signal:this.#r(a)})}async openStream(t){let o=!this.#t.has(t)&&t?.notice?String(t.notice):null,a=i=>o?`${o} -${i}`:i;return Ry({limit:o?1800:1900,create:async i=>{let A=await this.#e.createMessage({channelId:t.channelId,content:a(i),replyToMessageId:t.replyToMessageId,signal:this.#A});return o&&this.#t.add(t),A.id},edit:(i,A)=>this.#e.editMessage({channelId:t.channelId,messageId:i,content:a(A),signal:this.#A}),sendRemainder:i=>this.#e.createMessage({channelId:t.channelId,content:i,signal:this.#A}),messageIdForResult:i=>i?.id}).start()}#r(t){return t??this.#A}};function JQe(){return{startedAt:null,ready:!1,connectionState:"idle",harnessReachable:!1,lastCheckedAt:null,lastConnectedAt:null,lastError:null,...po()}}var Mu=class{#e;#A;#t;#r;#I;#o;#g;#i;#a;#s;#l;#c;#d;#n=JQe();#p=null;#h=null;#u=null;#C=null;#B=null;#f=null;#y=null;#w=null;#m=null;#Q=!0;#D=null;#E=0;#k=0;#M=!0;#O=null;#S=new Map;#_=new Map;constructor({config:t,token:o,harness:a,state:e,contextEnhancement:i,accessPolicy:A,groupSessionScope:r,logger:s=console,replyTimeoutMs:g=6e5,connectTimeoutMs:c=2e4,createApi:I=f=>new Ou(f),createWebSocket:d=f=>new WebSocket(f),random:B=Math.random}){if(!t||!o||!a||!e)throw new TypeError("DiscordRuntime requires config, token, Harness, and state");if(typeof d!="function")throw new TypeError("DiscordRuntime requires WebSocket");this.#e=t,this.#A=o,this.#t=a,this.#r=e,this.#I=i,this.#o=A,this.#g=r,this.#i=s,this.#a=g,this.#s=c,this.#l=I,this.#c=d,this.#d=B}get status(){return structuredClone(this.#n)}async sendConnectionTest(t){if(!this.#n.ready||!this.#h){let o=new Error("Discord bot is not connected");throw o.code="test-target-unavailable",o}return this.#h.sendConnectionTest(t)}async sendProactiveText(t,o,a={}){if(!this.#n.ready||!this.#h){let i=new Error("Discord bot is not connected");throw i.code="bot-not-connected",i}let e=typeof t?.route?.channelId=="string"?t.route.channelId.trim():"";if(t?.kind!=="channel"||!e){let i=new TypeError("Invalid Discord proactive delivery target");throw i.code="invalid-target",i}return this.#h.sendProactiveText({channelId:e},o,a)}async start(){return this.#n.ready&&this.#C?this.status:this.#O?this.#O:(this.#O=this.#T().finally(()=>{this.#O=null}),this.#O)}async#T(){await this.stop(),this.#M=!1,this.#y=null,this.#f=null,this.#w=null,this.#E=0,this.#S.clear(),this.#_.clear(),this.#n.startedAt=new Date().toISOString(),this.#n.connectionState="connecting",this.#n.lastError=null,await this.#t.ensureRunning(),this.#n.harnessReachable=!0;let t=new AbortController;this.#u=t;let o=this.#l({token:this.#A});this.#p=o;try{let[a,e]=await Promise.all([o.getCurrentUser({signal:t.signal}),o.getGatewayBot({signal:t.signal})]);if(String(a?.id??"")!==this.#e.platformId||a?.bot!==!0)throw new Error("Discord token identity does not match the saved bot");this.#B=e?.url;let i=new VT({api:o,signal:t.signal});this.#h=new Ty({bot:i,harness:this.#t,state:this.#r,contextEnhancement:this.#I,accessPolicy:this.#o,groupSessionScope:this.#g,status:this.#n,logger:this.#i,replyTimeoutMs:this.#a,signal:t.signal});let A;try{await Promise.race([this.#P(!1),new Promise((r,s)=>{A=setTimeout(()=>s(new Error("Discord Gateway did not become ready in time")),this.#s)})])}finally{clearTimeout(A)}return this.status}catch(a){throw this.#n.ready=!1,this.#n.connectionState="failed",this.#n.lastError=a?.message??String(a),await this.stop(),a}}#P(t){if(this.#M)return Promise.reject(new Error("Discord runtime is stopped"));let o=++this.#k,a=vQe(t&&this.#f?this.#f:this.#B),e=this.#c(a);this.#C=e;let i=!1;return new Promise((A,r)=>{let s=()=>{if(i||o!==this.#k)return;i=!0,this.#E=0;let g=Date.now();this.#n.ready=!0,this.#n.connectionState="connected",this.#n.lastCheckedAt=g,this.#n.lastConnectedAt=g,this.#n.lastError=null,A()};qT(e,"message",g=>{if(o!==this.#k||this.#M)return;let c=PQe(g);if(!c)return;let I;try{I=JSON.parse(c)}catch{this.#i.warn?.("[dsh-im:discord] ignored malformed Gateway JSON");return}if(Number.isSafeInteger(I.s)&&(this.#w=I.s),I.op===10){this.#x(I.d?.heartbeat_interval,e,o),t&&this.#y?this.#R(e,{op:6,d:{token:this.#A,session_id:this.#y,seq:this.#w}}):this.#R(e,{op:2,d:{token:this.#A,intents:wQe,properties:{os:process.platform,browser:"dsh-im",device:"dsh-im"}}});return}if(I.op===11){this.#Q=!0,this.#n.lastCheckedAt=Date.now();return}if(I.op===1){this.#K(e);return}if(I.op===7){e.close(4e3,"Reconnect requested");return}if(I.op===9){I.d!==!0&&(this.#y=null,this.#f=null,this.#w=null),e.close(4e3,"Invalid session");return}if(I.op===0){if(I.t==="READY")this.#y=I.d?.session_id??null,this.#f=I.d?.resume_gateway_url??null,s();else if(I.t==="RESUMED")s();else if(I.t==="GUILD_CREATE")for(let d of[...I.d?.channels??[],...I.d?.threads??[]])this.#N(d);else if(I.t==="CHANNEL_CREATE"||I.t==="CHANNEL_UPDATE"||I.t==="THREAD_CREATE"||I.t==="THREAD_UPDATE")this.#N(I.d);else if(I.t==="CHANNEL_DELETE"||I.t==="THREAD_DELETE")I.d?.id&&this.#S.delete(String(I.d.id));else if(I.t==="THREAD_LIST_SYNC")for(let d of I.d?.threads??[])this.#N(d);else if(I.t==="MESSAGE_CREATE"){let d=this.#h;I.d&&d&&this.#G(I.d,d).catch(B=>{o!==this.#k||this.#M||this.#i.error?.(`[dsh-im:discord] bot ${this.#e.botId} message handling failed:`,B)})}}}),qT(e,"close",(g={})=>{if(o!==this.#k)return;if(this.#J(),this.#C===e&&(this.#C=null),this.#M){i||r(new DOMException("Stopped","AbortError"));return}let c=GQe(Number(g.code)||0);if(this.#n.ready=!1,this.#n.connectionState="connecting",this.#n.lastError=c.message,i||(i=!0,r(c)),c.code==="discord-401"||c.code==="discord-intents"){this.#n.connectionState="failed";return}this.#U()}),qT(e,"error",()=>{o!==this.#k||this.#M||(this.#n.lastError="Discord Gateway WebSocket error")})})}#N(t){t?.id&&this.#S.set(String(t.id),t)}async#G(t,o){let a=String(t?.id??"");if(!a||this.#r.hasSeen(a))return;let e=Rj(t,this.#e.platformId),i;if(e?.kind==="group"&&e.addressed===!0&&e.senderIsBot!==!0&&(i=Ti(this.#o,{conversationType:"group",senderIds:[e.senderId],text:e.content,hasImages:e.images.length>0,hasFiles:e.files.length>0}),!i.allowed)){await o.accept(e,{accessDecision:i});return}let A=this.#_.get(a);if(!A){let r=ni(this.#I,t.guild_id?"group":"direct"),s=jQe(t,this.#e.platformId,{api:this.#p,channel:this.#S.get(String(t.channel_id)),signal:this.#u?.signal,onChannel:g=>this.#N(g)});A={pendingRoute:s,contextSnapshot:r},this.#_.set(a,A),s.finally(()=>{this.#_.get(a)===A&&this.#_.delete(a)}).catch(()=>{})}try{let r=await A.pendingRoute;r&&await o.accept(r,{contextSnapshot:A.contextSnapshot,...i?{accessDecision:i}:{}})}catch(r){throw r?.code==="discord-thread-create-uncertain"&&await this.#r.markSeen(a),r}}#R(t,o){t.readyState===1&&t.send(JSON.stringify(o))}#x(t,o,a){if(this.#J(),!Number.isFinite(t)||t<1e3){o.close(4e3,"Invalid heartbeat interval");return}this.#Q=!0;let e=i=>{this.#m=setTimeout(()=>{if(!(this.#M||a!==this.#k||this.#C!==o)){if(!this.#Q){o.close(4e3,"Heartbeat was not acknowledged");return}this.#K(o),e(t)}},i),this.#m?.unref?.()};e(Math.floor(t*this.#d()))}#K(t){this.#Q=!1,this.#R(t,{op:1,d:this.#w})}#J(){this.#m!==null&&clearTimeout(this.#m),this.#m=null,this.#Q=!0}#U(){if(this.#M||this.#D!==null)return;let t=Sj[Math.min(this.#E,Sj.length-1)];this.#E+=1,this.#D=setTimeout(()=>{this.#D=null,this.#P(!!this.#y).catch(o=>{this.#M||(this.#i.warn?.("[dsh-im:discord] Gateway reconnect failed:",o),this.#U())})},t),this.#D?.unref?.()}async stop(){this.#M=!0,this.#k+=1,this.#u?.abort(),this.#u=null,this.#D!==null&&clearTimeout(this.#D),this.#D=null,this.#J();let t=this.#C,o=this.#h;this.#C=null,this.#h=null,this.#p=null,this.#_.clear();try{t&&t.readyState<2&&t.close(1e3,"Plugin stopped")}catch(a){this.#i.warn?.(`[dsh-im:discord] bot ${this.#e.botId} failed to close Gateway:`,a)}return await Promise.race([o?.waitForIdle()??Promise.resolve(),new Promise(a=>setTimeout(a,2e3))]),this.#n.ready=!1,this.#n.connectionState="idle",this.status}};import{mkdir as qQe,readFile as zQe,rename as VQe,unlink as WQe,writeFile as ZQe}from"node:fs/promises";import{dirname as XQe}from"node:path";var ky=Object.freeze({version:1,sessions:{},seenMessageIds:[],cursor:null});function $Qe(n){if(!n||typeof n!="object")return structuredClone(ky);let t={};if(n.sessions&&typeof n.sessions=="object"&&!Array.isArray(n.sessions))for(let[o,a]of Object.entries(n.sessions))typeof o=="string"&&o&&typeof a=="string"&&a&&(t[o]=a);return{version:1,sessions:t,seenMessageIds:Array.isArray(n.seenMessageIds)?n.seenMessageIds.filter(o=>typeof o=="string"&&o).slice(-1e3):[],cursor:Number.isSafeInteger(n.cursor)&&n.cursor>=0?n.cursor:null}}var Ss=class{#e;#A=structuredClone(ky);#t=Promise.resolve();constructor(t){this.#e=t}async load(){try{this.#A=$Qe(JSON.parse(await zQe(this.#e,"utf8")))}catch(t){if(t?.code!=="ENOENT")throw t;this.#A=structuredClone(ky),await this.#r()}return this}sessionFor(t){return this.#A.sessions[t]??null}async setSession(t,o){this.#A.sessions[t]=o,await this.#r()}async clearSession(t){delete this.#A.sessions[t],await this.#r()}async clearSessions(){this.#A.sessions={},await this.#r()}hasSeen(t){return this.#A.seenMessageIds.includes(t)}async markSeen(t){this.hasSeen(t)||(this.#A.seenMessageIds.push(t),this.#A.seenMessageIds.length>1e3&&this.#A.seenMessageIds.splice(0,this.#A.seenMessageIds.length-1e3),await this.#r())}cursor(){return this.#A.cursor}async setCursor(t){if(!Number.isSafeInteger(t)||t<0)throw new TypeError("Invalid update cursor");this.#A.cursor=t,await this.#r()}snapshot(){return structuredClone(this.#A)}async remove(){try{await WQe(this.#e)}catch(t){if(t?.code!=="ENOENT")throw t}this.#A=structuredClone(ky)}async#r(){let t=`${JSON.stringify(this.#A,null,2)} -`,o=this.#t.then(async()=>{await qQe(XQe(this.#e),{recursive:!0,mode:448});let a=`${this.#e}.tmp`;await ZQe(a,t,{encoding:"utf8",mode:384}),await VQe(a,this.#e)});this.#t=o.then(()=>{},()=>{}),await o}};var vy=class extends Ss{};import{unlink as Aye}from"node:fs/promises";import{homedir as tye}from"node:os";import{join as _u,resolve as nl}from"node:path";var kj=Object.freeze([250,1e3,3e3,5e3,1e4,3e4]);function eye(n){if(!Array.isArray(n)||n.length===0)return[...kj];let t=n.filter(o=>Number.isFinite(o)&&o>=0);return t.length>0?t:[...kj]}var ZT=class{#e;#A;#t;#r;#I;#o;#g;#i;#a=null;#s=null;#l=0;#c=!1;#d=!1;#n;#p;constructor({channel:t,controller:o,harness:a,logger:e=console,retryDelaysMs:i,healthyIntervalMs:A=15e3,setTimeoutImpl:r=setTimeout,clearTimeoutImpl:s=clearTimeout}){if(!t)throw new TypeError("TokenConnectionSupervisor requires a channel");if(!o||typeof o.initialize!="function"||typeof o.status!="function")throw new TypeError("TokenConnectionSupervisor requires a controller");if(!a||typeof a.ensureRunning!="function")throw new TypeError("TokenConnectionSupervisor requires a Harness client");this.#e=t,this.#A=o,this.#t=a,this.#r=e,this.#I=eye(i),this.#o=Number.isFinite(A)&&A>=0?A:15e3,this.#g=r,this.#i=s,this.#n=new Promise(g=>{this.#p=g})}get ready(){return this.#n}start(){return this.#d||this.#c?this:(this.#d=!0,this.#h(0),this)}async close(){this.#c||(this.#c=!0,this.#a!==null&&this.#i(this.#a),this.#a=null,await this.#s?.catch(()=>{}),this.#p?.(null),this.#p=null)}#h(t){this.#c||(this.#a=this.#g(()=>{this.#a=null,this.#u()},t),this.#a?.unref?.())}async#u(){if(this.#c||this.#s)return;let t=this.#C();this.#s=t;try{await t}finally{this.#s===t&&(this.#s=null)}}async#C(){try{if(await this.#t.ensureRunning(),this.#c)return;let t=await this.#A.initialize();if(this.#c)return;this.#p?.(t),this.#p=null;let{configured:o,connected:a}=t.totals;if(apr(e==="telegram"?"telegram":"discord",Ne),R=typeof n.logger=="function"?n.logger(`dsh-im:${e}`):n.logger??console,L=()=>ji(n),U=XT(t,e),F=await new d(U.config).load(),z=nl(t.workspace??process.cwd()),J=o.WorkspaceStore??gi,K=o.workspaces??await new J(U.workspaces,{defaultWorkspace:z}).load(),G=F.list();await K.reconcile(G.map(Ne=>Ne.botId)),await Promise.all(G.map(Ne=>K.ensure(Ne.botId,{defaultAgentPreset:t.agentPreset,initialAccessPolicy:T(Ne)})));let V=typeof F.remove=="function"?Ji(F,{workspaces:K}):F,H=new Map,N=Ne=>nl(U.bots,Ne,"state.json"),k=async Ne=>{let Je=H.get(Ne);return Je||(Je=await new B(N(Ne)).load(),H.set(Ne,Je)),Je},q=Wi(n,o.commandExecutor),{controlExecutor:X,sessionMaintenanceExecutor:ie,fileIngressExecutor:De}=Zi(n,{controlExecutor:o.controlExecutor,sessionMaintenanceExecutor:o.sessionMaintenanceExecutor,fileIngressExecutor:o.fileIngressExecutor}),oe=new f({...I,workspace:z,autostart:!1,dshBin:t.dshBin??"dsh",...q?{commandExecutor:q}:{},...X?{controlExecutor:X}:{},...ie?{sessionMaintenanceExecutor:ie}:{},...De?{fileIngressExecutor:De}:{}}),Se=new Q({credentials:n.credentials,configStore:V,logger:R,...o.inspectToken?{inspectToken:o.inspectToken}:{},createRuntime:async({botId:Ne,config:Je,token:ve})=>{let tA=await k(Ne);await K.ensure(Ne,{defaultAgentPreset:t.agentPreset,initialAccessPolicy:T(Je)});let fe=qi(oe,{botId:Ne,workspaces:K,state:tA,agentPresetCatalog:L});return new y({...m,config:Je,token:ve,harness:fe.harness,state:fe.state,contextEnhancement:{botId:Ne,getSettings:()=>K.contextEnhancementFor(Ne)},accessPolicy:Xi(K,Ne,{channel:e,config:Je}),groupSessionScope:{getScope:()=>K.groupSessionScopeFor(Ne)},replyTimeoutMs:t.replyTimeoutMs??6e5,connectTimeoutMs:t.connectTimeoutMs??2e4,logger:{error:(...Ie)=>R.error?.(`[${Ne}]`,...Ie),warn:(...Ie)=>R.warn?.(`[${Ne}]`,...Ie),info:(...Ie)=>R.info?.(`[${Ne}]`,...Ie),debug:(...Ie)=>R.debug?.(`[${Ne}]`,...Ie)}})},deleteState:async({botId:Ne})=>{let Je=H.get(Ne);if(H.delete(Ne),Je&&typeof Je.remove=="function")await Je.remove();else try{await Aye(N(Ne))}catch(ve){if(ve?.code!=="ENOENT")throw ve}}}),Be=zi(Se,{workspaces:K,stateFor:k,agentPresetCatalog:L}),Re=_({channel:e,controller:Be,harness:oe,logger:R,retryDelaysMs:t.retryDelaysMs,healthyIntervalMs:t.healthyIntervalMs}).start();return{controller:Be,...Qy(e)?{deliveryAdapter:Vi({channel:e,workspaces:K,coreController:Se,stateFor:k})}:{},ready:Re.ready,async close(){await Re.close(),await Be.close(),oe.stopManagedProcess()}}}function $T(n,t={},o={}){return Py(n,t,o,{channel:"discord",ConfigStore:My,StateStore:vy,HarnessClient:Ny,Controller:bu,Runtime:Mu})}var Sr=Object.freeze({status:"connection.status",bindCredentials:"bot.bind-credentials",reconnectBot:"bot.reconnect",deleteBot:"bot.delete",setWorkspace:Ka,setAgentPreset:xa,setContextEnhancement:Ha,setAccessPolicy:ea,setGroupSessionScope:ta}),rye=Object.freeze(Object.values(Sr)),iye=new Set(["token","botToken","tokenRef","platformId","secret","secretRef"]),aye=new Set(["telegram-transport-error","telegram-timeout","telegram-response-invalid"]);function A0(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function Gy(n,t){return A0(n)&&Object.keys(n).every(o=>t.includes(o))}function vj(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n)}function oye(n){return typeof n=="string"&&n.trim().length>=20&&n.length<=4096}function nye(n,t){return A0(t)?n===Sr.status?Gy(t,[])?null:"connection.status does not accept fields.":n===Sr.bindCredentials?Gy(t,["token"])&&oye(t.token)?null:"bot.bind-credentials requires a Bot Token.":n===Sr.reconnectBot?Gy(t,["botId","sendTest"])&&vj(t.botId)&&(t.sendTest===void 0||typeof t.sendTest=="boolean")?null:"bot.reconnect requires a botId.":n===Sr.deleteBot?Gy(t,["botId","confirm"])&&vj(t.botId)&&t.confirm===!0?null:"bot.delete requires a botId and confirm=true.":n===Sr.setWorkspace?ia(t)?null:"\u8BF7\u8F93\u5165\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84\u3002":n===Sr.setAgentPreset?oa(t)?null:"\u8BF7\u9009\u62E9 Agent Preset\u3002":n===Sr.setContextEnhancement?$i(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002":n===Sr.setAccessPolicy?Aa(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u8BBF\u95EE\u8BBE\u7F6E\u3002":n===Sr.setGroupSessionScope?ra(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u7FA4\u4F1A\u8BDD\u7B56\u7565\u3002":"Unknown bot endpoint.":"Payload must be an object."}function e0(n){if(Array.isArray(n))return n.map(e0);if(!A0(n))return n;let t={};for(let[o,a]of Object.entries(n))iye.has(o)||(t[o]=e0(a));return t}function sye(n,t){let o=aa(t);return o||(t?.code==="webhook-configured"?{code:"webhook-configured",message:t.message}:t?.code==="telegram-401"||t?.code==="discord-401"?{code:"invalid-token",message:`${n} Bot Token \u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\u3002`}:n==="Telegram"&&aye.has(t?.code)?{code:"telegram-network-error",message:"\u65E0\u6CD5\u8BBF\u95EE Telegram Bot API\u3002\u8BF7\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\uFF1BNode.js 22.21+ \u53EF\u8BBE\u7F6E NODE_USE_ENV_PROXY=1\uFF0C\u5E76\u914D\u7F6E HTTPS_PROXY\u3001HTTP_PROXY \u548C NO_PROXY\uFF0C\u7136\u540E\u91CD\u542F dsh web\u3002"}:t?.code==="discord-intents"?{code:"discord-intents",message:t.message}:{code:`${n.toLowerCase()}-operation-failed`,message:`${n} \u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002`})}function Fy(n,{channel:t}){for(let o of["status","bindCredentials","reconnectBot","deleteBot"])if(typeof n?.[o]!="function")throw new TypeError(`A complete ${t} controller is required (${o})`);return async(o,a,e)=>{if(e?.aborted)return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}};if(!rye.includes(o))return{ok:!1,error:{code:"bad-request",message:`Unknown ${t} endpoint.`}};let i=nye(o,a);if(i)return{ok:!1,error:{code:"bad-request",message:i}};try{let A;if(o===Sr.status)A=await n.status();else if(o===Sr.bindCredentials)A=await n.bindCredentials(a);else if(o===Sr.reconnectBot){if(A=await n.reconnectBot(a.botId),e?.aborted)return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}};if(a.sendTest===!0){let r=null;try{if(A?.bots?.find(s=>s?.botId===a.botId)?.connected!==!0){let s=new Error("Bot is not connected");throw s.code="test-target-unavailable",s}if(typeof n.sendConnectionTest!="function"){let s=new Error("Connection test is unavailable");throw s.code="test-target-unavailable",s}await n.sendConnectionTest(a.botId)}catch(s){r=s}A={...A,testMessage:dr(r)}}}else if(o===Sr.setWorkspace){if(typeof n.updateWorkspace!="function")throw new Error("Workspace update is unavailable");A=await n.updateWorkspace(a.botId,a.workspace)}else if(o===Sr.setContextEnhancement){if(typeof n.updateContextEnhancement!="function")throw new Error("Context enhancement update is unavailable");A=await n.updateContextEnhancement(a.botId,a.config)}else if(o===Sr.setAccessPolicy){if(typeof n.updateAccessPolicy!="function")throw new Error("Access policy update is unavailable");A=await n.updateAccessPolicy(a.botId,a.policy)}else if(o===Sr.setGroupSessionScope){if(typeof n.updateGroupSessionScope!="function")throw new Error("Group session scope update is unavailable");A=await n.updateGroupSessionScope(a.botId,a.groupSessionScope)}else if(o===Sr.setAgentPreset){if(typeof n.updateAgentPreset!="function")throw new Error("Agent preset update is unavailable");A=await n.updateAgentPreset(a.botId,a.agentPreset)}else A=await n.deleteBot(a.botId);return e?.aborted?{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}:{ok:!0,value:e0(A)}}catch(A){return e?.aborted?{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}:{ok:!1,error:sye(t,A)}}}}function Pj(n,t,{channel:o,rpcChannel:a,authority:e}){if(!n?.connection?.rpc||typeof n.connection.rpc.handle!="function")throw new TypeError("DSH Host Connection RPC is required");return n.connection.rpc.handle(a,Fy(t,{channel:o}),{authority:mr(e)})}var Gj="/discord",Fj=Sr,gye=Object.freeze(Object.values(Fj));function Ly(n,t,o){return Pj(n,t,{channel:"Discord",rpcChannel:Gj,authority:o})}async function Lj(n,t={}){if(t?.controller)return Ly(n,t.controller,t.rpcAuthority);let o=await $T(n,t,t.internals??{}),a=t.deliveryService&&o.deliveryAdapter?t.deliveryService.registerAdapter(o.deliveryAdapter):void 0,e=Ly(n,o.controller,t.rpcAuthority);return n.effect(()=>async()=>{await a?.(),await o.close()},"dsh-im: close Discord bot connections"),e}import{homedir as Tye}from"node:os";import{join as a0,resolve as o0}from"node:path";import{mkdir as cye,readFile as Iye,rename as lye,unlink as dye,writeFile as pye}from"node:fs/promises";import{dirname as hye,isAbsolute as Eye}from"node:path";var Ep="office-harness.v1",Uj="/office",up=Object.freeze({status:"connection.status",configure:"connector.configure",reconnect:"connector.reconnect",test:"connector.test",remove:"connector.remove"}),Tn=Object.freeze({stream:"/api/harness/connector/stream",heartbeat:"/api/harness/connector/heartbeat",job:"/api/harness/connector/jobs/:id",accept:"/api/harness/connector/jobs/:id/accept",renew:"/api/harness/connector/jobs/:id/renew",progress:"/api/harness/connector/jobs/:id/progress",approval:"/api/harness/connector/jobs/:id/approval",result:"/api/harness/connector/jobs/:id/result",fail:"/api/harness/connector/jobs/:id/fail"});function Tu(n){let t=new URL(typeof n=="string"?n.trim():""),o=t.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(t.hostname);if(t.protocol!=="https:"&&!o)throw new TypeError("AI Office URL must use HTTPS (HTTP is allowed only for loopback testing)");if(t.username||t.password||t.search||t.hash)throw new TypeError("AI Office URL must be a bare origin");return t.pathname="/",t}function Uy(n){let t=Tu(n);return Object.fromEntries(Object.entries(Tn).map(([o,a])=>[o,new URL(a,t).toString()]))}var uye=/^[a-z][a-z0-9-]{1,63}$/,Cye=/^[a-z0-9][a-z0-9_-]{2,63}$/i;function Cp(n){return typeof n=="string"&&n.trim()?n.trim():null}function Hj(n,{kind:t}){if(!n||typeof n!="object"||Array.isArray(n))return null;let o={};for(let[a,e]of Object.entries(n)){let i=Cp(a),A=Cp(e);if(!i||!uye.test(i)||!A||t==="workspace"&&!Eye(A)||t==="preset"&&A.length>8e3)return null;o[i]=A}return Object.freeze(o)}function Hy(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let t;try{t=Tu(n.baseUrl).origin}catch{return null}let o=Cp(n.deviceId),a=Cp(n.deviceTokenRef),e=Hj(n.workspaces??{},{kind:"workspace"}),i=Hj(n.instructionPresets??{},{kind:"preset"}),A=Number(n.maxConcurrency??1),r=Number(n.heartbeatSeconds??30);return!o||!Cye.test(o)||!a||!/^DSH_OFFICE_DEVICE_TOKEN_[A-F0-9]{24}$/.test(a)||!e||!i||!Number.isInteger(A)||A<1||A>4||!Number.isInteger(r)||r<10||r>300?null:Object.freeze({version:1,protocolVersion:Ep,baseUrl:t,deviceId:o,deviceTokenRef:a,maxConcurrency:A,heartbeatSeconds:r,workspaces:e,instructionPresets:i,createdAt:Cp(n.createdAt)??new Date().toISOString(),updatedAt:Cp(n.updatedAt)??new Date().toISOString()})}var Ky=class{#e;#A=null;#t=Promise.resolve();constructor(t){this.#e=t}async load(){try{let t=Hy(JSON.parse(await Iye(this.#e,"utf8")));if(!t)throw new Error("dsh-im AI Office config is invalid");this.#A=t}catch(t){if(t?.code!=="ENOENT")throw t;this.#A=null}return this}get(){return this.#A?structuredClone(this.#A):null}async save(t){let o=Hy(t);if(!o)throw new Error("Refusing to persist invalid AI Office configuration");let a=this.#t.then(async()=>{await cye(hye(this.#e),{recursive:!0,mode:448});let e=`${this.#e}.tmp`;await pye(e,`${JSON.stringify(o,null,2)} -`,{mode:384}),await lye(e,this.#e),this.#A=o});return this.#t=a.then(()=>{},()=>{}),await a,this.get()}async clear(){let t=this.#t.then(async()=>{try{await dye(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#A=null});this.#t=t.then(()=>{},()=>{}),await t}};import{createHash as Mye}from"node:crypto";import{setTimeout as Oye}from"node:timers/promises";function t0(n,t){let o=new Error(`AI Office ${n} failed: HTTP ${t.status}`);return o.code=t.status===401?"invalid-device-token":t.status===404?"office-hook-unavailable":t.status===409?"office-job-conflict":"office-transport-failed",o}function Bp(n,t="office-transport-failed",o){let a=new Error(n,o===void 0?void 0:{cause:o});return a.code=t,a}function r0(n,t){return t?.aborted||n?.name==="AbortError"}function Bye(n){let t="message",o,a=[];for(let i of n.split(/\r?\n/))i.startsWith("event:")?t=i.slice(6).trim()||"message":i.startsWith("id:")?o=i.slice(3).trim()||void 0:i.startsWith("data:")&&a.push(i.slice(5).trimStart());if(a.length===0)return null;let e;try{e=JSON.parse(a.join(` -`))}catch{throw new Error("AI Office SSE returned invalid JSON")}return{id:o,type:typeof e?.type=="string"?e.type:t,data:e}}var xy=class{#e;#A;#t;#r;constructor({baseUrl:t,deviceId:o,token:a,fetchImpl:e=fetch}){this.#e=t,this.#A=o,this.#t=a,this.#r=e}hooks(){return Uy(this.#e)}#I(t={}){return{authorization:`Bearer ${this.#t}`,"x-harness-device-id":this.#A,...t}}async heartbeat(t,{signal:o}={}){let a;try{a=await this.#r(new URL(Tn.heartbeat,this.#e),{method:"POST",headers:this.#I({accept:"application/json","content-type":"application/json"}),body:JSON.stringify(t),signal:o,redirect:"error"})}catch(i){throw r0(i,o)?i:Bp("AI Office heartbeat request could not be completed",void 0,i)}if(!a.ok)throw t0("heartbeat",a);let e;try{e=await a.json()}catch(i){throw Bp("AI Office heartbeat returned invalid JSON","office-protocol-mismatch",i)}if(!e||typeof e!="object"||e.ok!==!0||e.protocolVersion!==Ep)throw Bp("AI Office heartbeat protocol does not match","office-protocol-mismatch");return e}async#o(t,{method:o="POST",body:a,leaseToken:e,signal:i}={}){let A=this.#I({accept:"application/json"});a!==void 0&&(A["content-type"]="application/json"),e&&(A["x-harness-lease-token"]=e);let r;try{r=await this.#r(new URL(t,this.#e),{method:o,headers:A,...a===void 0?{}:{body:JSON.stringify(a)},signal:i,redirect:"error",cache:"no-store"})}catch(s){throw r0(s,i)?s:Bp("AI Office Job request could not be completed",void 0,s)}if(!r.ok)throw t0("Job request",r);try{return await r.json()}catch(s){throw Bp("AI Office Job returned invalid JSON","office-protocol-mismatch",s)}}async getJob(t,o={}){return this.#o(Tn.job.replace(":id",t),{...o,method:"GET"})}async acceptJob(t,o={}){return this.#o(Tn.accept.replace(":id",t),o)}async renewJob(t,o,a={}){return this.#o(Tn.renew.replace(":id",t),{...a,leaseToken:o})}async progressJob(t,o,a,e={}){return this.#o(Tn.progress.replace(":id",t),{...e,leaseToken:o,body:a})}async requestApproval(t,o,a,e={}){return this.#o(Tn.approval.replace(":id",t),{...e,leaseToken:o,body:a})}async completeJob(t,o,a,e={}){return this.#o(Tn.result.replace(":id",t),{...e,leaseToken:o,body:a})}async failJob(t,o,a,e={}){return this.#o(Tn.fail.replace(":id",t),{...e,leaseToken:o,body:a})}async stream({signal:t,lastEventId:o,onOpen:a,onEvent:e}){let i=this.#I({accept:"text/event-stream"});o&&(i["last-event-id"]=o);let A;try{A=await this.#r(new URL(Tn.stream,this.#e),{method:"GET",headers:i,signal:t,redirect:"error",cache:"no-store"})}catch(c){throw r0(c,t)?c:Bp("AI Office SSE request could not be completed",void 0,c)}if(!A.ok)throw t0("stream",A);if(!A.headers.get("content-type")?.toLowerCase().includes("text/event-stream"))throw new Error("AI Office stream did not return text/event-stream");if(!A.body)throw new Error("AI Office stream returned no body");a?.();let r=A.body.getReader(),s=new TextDecoder,g="";for(;;){let{value:c,done:I}=await r.read();if(I)break;g=`${g}${s.decode(c,{stream:!0})}`.replaceAll(`\r +${i}`:i;return ky({limit:o?1800:1900,create:async i=>{let A=await this.#e.createMessage({channelId:t.channelId,content:a(i),replyToMessageId:t.replyToMessageId,signal:this.#A});return o&&this.#t.add(t),A.id},edit:(i,A)=>this.#e.editMessage({channelId:t.channelId,messageId:i,content:a(A),signal:this.#A}),sendRemainder:i=>this.#e.createMessage({channelId:t.channelId,content:i,signal:this.#A}),messageIdForResult:i=>i?.id}).start()}#r(t){return t??this.#A}};function ZQe(){return{startedAt:null,ready:!1,connectionState:"idle",harnessReachable:!1,lastCheckedAt:null,lastConnectedAt:null,lastError:null,...po()}}var Mu=class{#e;#A;#t;#r;#I;#o;#g;#i;#a;#s;#l;#c;#d;#n=ZQe();#p=null;#h=null;#u=null;#C=null;#B=null;#f=null;#y=null;#w=null;#m=null;#Q=!0;#D=null;#E=0;#k=0;#M=!0;#O=null;#S=new Map;#_=new Map;constructor({config:t,token:o,harness:a,state:e,contextEnhancement:i,accessPolicy:A,groupSessionScope:r,logger:s=console,replyTimeoutMs:g=6e5,connectTimeoutMs:c=2e4,createApi:I=f=>new Ou(f),createWebSocket:d=f=>new WebSocket(f),random:B=Math.random}){if(!t||!o||!a||!e)throw new TypeError("DiscordRuntime requires config, token, Harness, and state");if(typeof d!="function")throw new TypeError("DiscordRuntime requires WebSocket");this.#e=t,this.#A=o,this.#t=a,this.#r=e,this.#I=i,this.#o=A,this.#g=r,this.#i=s,this.#a=g,this.#s=c,this.#l=I,this.#c=d,this.#d=B}get status(){return structuredClone(this.#n)}async sendConnectionTest(t){if(!this.#n.ready||!this.#h){let o=new Error("Discord bot is not connected");throw o.code="test-target-unavailable",o}return this.#h.sendConnectionTest(t)}async sendProactiveText(t,o,a={}){if(!this.#n.ready||!this.#h){let i=new Error("Discord bot is not connected");throw i.code="bot-not-connected",i}let e=typeof t?.route?.channelId=="string"?t.route.channelId.trim():"";if(t?.kind!=="channel"||!e){let i=new TypeError("Invalid Discord proactive delivery target");throw i.code="invalid-target",i}return this.#h.sendProactiveText({channelId:e},o,a)}async start(){return this.#n.ready&&this.#C?this.status:this.#O?this.#O:(this.#O=this.#T().finally(()=>{this.#O=null}),this.#O)}async#T(){await this.stop(),this.#M=!1,this.#y=null,this.#f=null,this.#w=null,this.#E=0,this.#S.clear(),this.#_.clear(),this.#n.startedAt=new Date().toISOString(),this.#n.connectionState="connecting",this.#n.lastError=null,await this.#t.ensureRunning(),this.#n.harnessReachable=!0;let t=new AbortController;this.#u=t;let o=this.#l({token:this.#A});this.#p=o;try{let[a,e]=await Promise.all([o.getCurrentUser({signal:t.signal}),o.getGatewayBot({signal:t.signal})]);if(String(a?.id??"")!==this.#e.platformId||a?.bot!==!0)throw new Error("Discord token identity does not match the saved bot");this.#B=e?.url;let i=new VT({api:o,signal:t.signal});this.#h=new Ny({bot:i,harness:this.#t,state:this.#r,contextEnhancement:this.#I,accessPolicy:this.#o,groupSessionScope:this.#g,status:this.#n,logger:this.#i,replyTimeoutMs:this.#a,signal:t.signal});let A;try{await Promise.race([this.#P(!1),new Promise((r,s)=>{A=setTimeout(()=>s(new Error("Discord Gateway did not become ready in time")),this.#s)})])}finally{clearTimeout(A)}return this.status}catch(a){throw this.#n.ready=!1,this.#n.connectionState="failed",this.#n.lastError=a?.message??String(a),await this.stop(),a}}#P(t){if(this.#M)return Promise.reject(new Error("Discord runtime is stopped"));let o=++this.#k,a=UQe(t&&this.#f?this.#f:this.#B),e=this.#c(a);this.#C=e;let i=!1;return new Promise((A,r)=>{let s=()=>{if(i||o!==this.#k)return;i=!0,this.#E=0;let g=Date.now();this.#n.ready=!0,this.#n.connectionState="connected",this.#n.lastCheckedAt=g,this.#n.lastConnectedAt=g,this.#n.lastError=null,A()};qT(e,"message",g=>{if(o!==this.#k||this.#M)return;let c=HQe(g);if(!c)return;let I;try{I=JSON.parse(c)}catch{this.#i.warn?.("[dsh-im:discord] ignored malformed Gateway JSON");return}if(Number.isSafeInteger(I.s)&&(this.#w=I.s),I.op===10){this.#x(I.d?.heartbeat_interval,e,o),t&&this.#y?this.#R(e,{op:6,d:{token:this.#A,session_id:this.#y,seq:this.#w}}):this.#R(e,{op:2,d:{token:this.#A,intents:_Qe,properties:{os:process.platform,browser:"dsh-im",device:"dsh-im"}}});return}if(I.op===11){this.#Q=!0,this.#n.lastCheckedAt=Date.now();return}if(I.op===1){this.#K(e);return}if(I.op===7){e.close(4e3,"Reconnect requested");return}if(I.op===9){I.d!==!0&&(this.#y=null,this.#f=null,this.#w=null),e.close(4e3,"Invalid session");return}if(I.op===0){if(I.t==="READY")this.#y=I.d?.session_id??null,this.#f=I.d?.resume_gateway_url??null,s();else if(I.t==="RESUMED")s();else if(I.t==="GUILD_CREATE")for(let d of[...I.d?.channels??[],...I.d?.threads??[]])this.#N(d);else if(I.t==="CHANNEL_CREATE"||I.t==="CHANNEL_UPDATE"||I.t==="THREAD_CREATE"||I.t==="THREAD_UPDATE")this.#N(I.d);else if(I.t==="CHANNEL_DELETE"||I.t==="THREAD_DELETE")I.d?.id&&this.#S.delete(String(I.d.id));else if(I.t==="THREAD_LIST_SYNC")for(let d of I.d?.threads??[])this.#N(d);else if(I.t==="MESSAGE_CREATE"){let d=this.#h;I.d&&d&&this.#G(I.d,d).catch(B=>{o!==this.#k||this.#M||this.#i.error?.(`[dsh-im:discord] bot ${this.#e.botId} message handling failed:`,B)})}}}),qT(e,"close",(g={})=>{if(o!==this.#k)return;if(this.#J(),this.#C===e&&(this.#C=null),this.#M){i||r(new DOMException("Stopped","AbortError"));return}let c=KQe(Number(g.code)||0);if(this.#n.ready=!1,this.#n.connectionState="connecting",this.#n.lastError=c.message,i||(i=!0,r(c)),c.code==="discord-401"||c.code==="discord-intents"){this.#n.connectionState="failed";return}this.#U()}),qT(e,"error",()=>{o!==this.#k||this.#M||(this.#n.lastError="Discord Gateway WebSocket error")})})}#N(t){t?.id&&this.#S.set(String(t.id),t)}async#G(t,o){let a=String(t?.id??"");if(!a||this.#r.hasSeen(a))return;let e=Pj(t,this.#e.platformId),i;if(e?.kind==="group"&&e.addressed===!0&&e.senderIsBot!==!0&&(i=Ti(this.#o,{conversationType:"group",senderIds:[e.senderId],text:e.content,hasImages:e.images.length>0,hasFiles:e.files.length>0}),!i.allowed)){await o.accept(e,{accessDecision:i});return}let A=this.#_.get(a);if(!A){let r=ni(this.#I,t.guild_id?"group":"direct"),s=WQe(t,this.#e.platformId,{api:this.#p,channel:this.#S.get(String(t.channel_id)),signal:this.#u?.signal,onChannel:g=>this.#N(g)});A={pendingRoute:s,contextSnapshot:r},this.#_.set(a,A),s.finally(()=>{this.#_.get(a)===A&&this.#_.delete(a)}).catch(()=>{})}try{let r=await A.pendingRoute;r&&await o.accept(r,{contextSnapshot:A.contextSnapshot,...i?{accessDecision:i}:{}})}catch(r){throw r?.code==="discord-thread-create-uncertain"&&await this.#r.markSeen(a),r}}#R(t,o){t.readyState===1&&t.send(JSON.stringify(o))}#x(t,o,a){if(this.#J(),!Number.isFinite(t)||t<1e3){o.close(4e3,"Invalid heartbeat interval");return}this.#Q=!0;let e=i=>{this.#m=setTimeout(()=>{if(!(this.#M||a!==this.#k||this.#C!==o)){if(!this.#Q){o.close(4e3,"Heartbeat was not acknowledged");return}this.#K(o),e(t)}},i),this.#m?.unref?.()};e(Math.floor(t*this.#d()))}#K(t){this.#Q=!1,this.#R(t,{op:1,d:this.#w})}#J(){this.#m!==null&&clearTimeout(this.#m),this.#m=null,this.#Q=!0}#U(){if(this.#M||this.#D!==null)return;let t=Oj[Math.min(this.#E,Oj.length-1)];this.#E+=1,this.#D=setTimeout(()=>{this.#D=null,this.#P(!!this.#y).catch(o=>{this.#M||(this.#i.warn?.("[dsh-im:discord] Gateway reconnect failed:",o),this.#U())})},t),this.#D?.unref?.()}async stop(){this.#M=!0,this.#k+=1,this.#u?.abort(),this.#u=null,this.#D!==null&&clearTimeout(this.#D),this.#D=null,this.#J();let t=this.#C,o=this.#h;this.#C=null,this.#h=null,this.#p=null,this.#_.clear();try{t&&t.readyState<2&&t.close(1e3,"Plugin stopped")}catch(a){this.#i.warn?.(`[dsh-im:discord] bot ${this.#e.botId} failed to close Gateway:`,a)}return await Promise.race([o?.waitForIdle()??Promise.resolve(),new Promise(a=>setTimeout(a,2e3))]),this.#n.ready=!1,this.#n.connectionState="idle",this.status}};import{mkdir as XQe,readFile as $Qe,rename as eye,unlink as Aye,writeFile as tye}from"node:fs/promises";import{dirname as rye}from"node:path";var vy=Object.freeze({version:1,sessions:{},seenMessageIds:[],cursor:null});function iye(n){if(!n||typeof n!="object")return structuredClone(vy);let t={};if(n.sessions&&typeof n.sessions=="object"&&!Array.isArray(n.sessions))for(let[o,a]of Object.entries(n.sessions))typeof o=="string"&&o&&typeof a=="string"&&a&&(t[o]=a);return{version:1,sessions:t,seenMessageIds:Array.isArray(n.seenMessageIds)?n.seenMessageIds.filter(o=>typeof o=="string"&&o).slice(-1e3):[],cursor:Number.isSafeInteger(n.cursor)&&n.cursor>=0?n.cursor:null}}var Ss=class{#e;#A=structuredClone(vy);#t=Promise.resolve();constructor(t){this.#e=t}async load(){try{this.#A=iye(JSON.parse(await $Qe(this.#e,"utf8")))}catch(t){if(t?.code!=="ENOENT")throw t;this.#A=structuredClone(vy),await this.#r()}return this}sessionFor(t){return this.#A.sessions[t]??null}keyForSession(t){if(typeof t!="string"||!t)return null;for(let[o,a]of Object.entries(this.#A.sessions))if(a===t)return o;return null}async setSession(t,o){this.#A.sessions[t]=o,await this.#r()}async clearSession(t){delete this.#A.sessions[t],await this.#r()}async clearSessions(){this.#A.sessions={},await this.#r()}hasSeen(t){return this.#A.seenMessageIds.includes(t)}async markSeen(t){this.hasSeen(t)||(this.#A.seenMessageIds.push(t),this.#A.seenMessageIds.length>1e3&&this.#A.seenMessageIds.splice(0,this.#A.seenMessageIds.length-1e3),await this.#r())}cursor(){return this.#A.cursor}async setCursor(t){if(!Number.isSafeInteger(t)||t<0)throw new TypeError("Invalid update cursor");this.#A.cursor=t,await this.#r()}snapshot(){return structuredClone(this.#A)}async remove(){try{await Aye(this.#e)}catch(t){if(t?.code!=="ENOENT")throw t}this.#A=structuredClone(vy)}async#r(){let t=`${JSON.stringify(this.#A,null,2)} +`,o=this.#t.then(async()=>{await XQe(rye(this.#e),{recursive:!0,mode:448});let a=`${this.#e}.tmp`;await tye(a,t,{encoding:"utf8",mode:384}),await eye(a,this.#e)});this.#t=o.then(()=>{},()=>{}),await o}};var Py=class extends Ss{};import{unlink as oye}from"node:fs/promises";import{homedir as nye}from"node:os";import{join as _u,resolve as nl}from"node:path";var Gj=Object.freeze([250,1e3,3e3,5e3,1e4,3e4]);function aye(n){if(!Array.isArray(n)||n.length===0)return[...Gj];let t=n.filter(o=>Number.isFinite(o)&&o>=0);return t.length>0?t:[...Gj]}var ZT=class{#e;#A;#t;#r;#I;#o;#g;#i;#a=null;#s=null;#l=0;#c=!1;#d=!1;#n;#p;constructor({channel:t,controller:o,harness:a,logger:e=console,retryDelaysMs:i,healthyIntervalMs:A=15e3,setTimeoutImpl:r=setTimeout,clearTimeoutImpl:s=clearTimeout}){if(!t)throw new TypeError("TokenConnectionSupervisor requires a channel");if(!o||typeof o.initialize!="function"||typeof o.status!="function")throw new TypeError("TokenConnectionSupervisor requires a controller");if(!a||typeof a.ensureRunning!="function")throw new TypeError("TokenConnectionSupervisor requires a Harness client");this.#e=t,this.#A=o,this.#t=a,this.#r=e,this.#I=aye(i),this.#o=Number.isFinite(A)&&A>=0?A:15e3,this.#g=r,this.#i=s,this.#n=new Promise(g=>{this.#p=g})}get ready(){return this.#n}start(){return this.#d||this.#c?this:(this.#d=!0,this.#h(0),this)}async close(){this.#c||(this.#c=!0,this.#a!==null&&this.#i(this.#a),this.#a=null,await this.#s?.catch(()=>{}),this.#p?.(null),this.#p=null)}#h(t){this.#c||(this.#a=this.#g(()=>{this.#a=null,this.#u()},t),this.#a?.unref?.())}async#u(){if(this.#c||this.#s)return;let t=this.#C();this.#s=t;try{await t}finally{this.#s===t&&(this.#s=null)}}async#C(){try{if(await this.#t.ensureRunning(),this.#c)return;let t=await this.#A.initialize();if(this.#c)return;this.#p?.(t),this.#p=null;let{configured:o,connected:a}=t.totals;if(apr(e==="telegram"?"telegram":"discord",Ne),R=typeof n.logger=="function"?n.logger(`dsh-im:${e}`):n.logger??console,L=()=>Ji(n),U=XT(t,e),F=await new d(U.config).load(),J=nl(t.workspace??process.cwd()),V=o.WorkspaceStore??gi,H=o.workspaces??await new V(U.workspaces,{defaultWorkspace:J}).load(),G=F.list();await H.reconcile(G.map(Ne=>Ne.botId)),await Promise.all(G.map(Ne=>H.ensure(Ne.botId,{defaultAgentPreset:t.agentPreset,initialAccessPolicy:T(Ne)})));let q=typeof F.remove=="function"?qi(F,{workspaces:H}):F,K=new Map,N=Ne=>nl(U.bots,Ne,"state.json"),k=async Ne=>{let Je=K.get(Ne);return Je||(Je=await new B(N(Ne)).load(),K.set(Ne,Je)),Je},z=Zi(n,o.commandExecutor),{controlExecutor:X,sessionMaintenanceExecutor:ie,fileIngressExecutor:De}=Xi(n,{controlExecutor:o.controlExecutor,sessionMaintenanceExecutor:o.sessionMaintenanceExecutor,fileIngressExecutor:o.fileIngressExecutor}),oe=new f({...I,workspace:J,autostart:!1,dshBin:t.dshBin??"dsh",...z?{commandExecutor:z}:{},...X?{controlExecutor:X}:{},...ie?{sessionMaintenanceExecutor:ie}:{},...De?{fileIngressExecutor:De}:{}}),Se=new Q({credentials:n.credentials,configStore:q,logger:R,...o.inspectToken?{inspectToken:o.inspectToken}:{},createRuntime:async({botId:Ne,config:Je,token:ve})=>{let tA=await k(Ne);await H.ensure(Ne,{defaultAgentPreset:t.agentPreset,initialAccessPolicy:T(Je)});let fe=zi(oe,{botId:Ne,workspaces:H,state:tA,agentPresetCatalog:L});return new y({...m,config:Je,token:ve,harness:fe.harness,state:fe.state,contextEnhancement:{botId:Ne,getSettings:()=>H.contextEnhancementFor(Ne)},accessPolicy:$i(H,Ne,{channel:e,config:Je}),groupSessionScope:{getScope:()=>H.groupSessionScopeFor(Ne)},replyTimeoutMs:t.replyTimeoutMs??6e5,connectTimeoutMs:t.connectTimeoutMs??2e4,logger:{error:(...Ie)=>R.error?.(`[${Ne}]`,...Ie),warn:(...Ie)=>R.warn?.(`[${Ne}]`,...Ie),info:(...Ie)=>R.info?.(`[${Ne}]`,...Ie),debug:(...Ie)=>R.debug?.(`[${Ne}]`,...Ie)}})},deleteState:async({botId:Ne})=>{let Je=K.get(Ne);if(K.delete(Ne),Je&&typeof Je.remove=="function")await Je.remove();else try{await oye(N(Ne))}catch(ve){if(ve?.code!=="ENOENT")throw ve}}}),Be=Vi(Se,{workspaces:H,stateFor:k,agentPresetCatalog:L}),Re=_({channel:e,controller:Be,harness:oe,logger:R,retryDelaysMs:t.retryDelaysMs,healthyIntervalMs:t.healthyIntervalMs}).start();return{controller:Be,...yy(e)?{deliveryAdapter:Wi({channel:e,workspaces:H,coreController:Se,stateFor:k})}:{},ready:Re.ready,async close(){await Re.close(),await Be.close(),oe.stopManagedProcess()}}}function $T(n,t={},o={}){return Gy(n,t,o,{channel:"discord",ConfigStore:_y,StateStore:Py,HarnessClient:Ry,Controller:bu,Runtime:Mu})}var Sr=Object.freeze({status:"connection.status",bindCredentials:"bot.bind-credentials",reconnectBot:"bot.reconnect",deleteBot:"bot.delete",setWorkspace:Ka,setAgentPreset:xa,setContextEnhancement:Ha,setAccessPolicy:Aa,setGroupSessionScope:ra}),sye=Object.freeze(Object.values(Sr)),gye=new Set(["token","botToken","tokenRef","platformId","secret","secretRef"]),cye=new Set(["telegram-transport-error","telegram-timeout","telegram-response-invalid"]);function A0(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function Fy(n,t){return A0(n)&&Object.keys(n).every(o=>t.includes(o))}function Fj(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n)}function Iye(n){return typeof n=="string"&&n.trim().length>=20&&n.length<=4096}function lye(n,t){return A0(t)?n===Sr.status?Fy(t,[])?null:"connection.status does not accept fields.":n===Sr.bindCredentials?Fy(t,["token"])&&Iye(t.token)?null:"bot.bind-credentials requires a Bot Token.":n===Sr.reconnectBot?Fy(t,["botId","sendTest"])&&Fj(t.botId)&&(t.sendTest===void 0||typeof t.sendTest=="boolean")?null:"bot.reconnect requires a botId.":n===Sr.deleteBot?Fy(t,["botId","confirm"])&&Fj(t.botId)&&t.confirm===!0?null:"bot.delete requires a botId and confirm=true.":n===Sr.setWorkspace?aa(t)?null:"\u8BF7\u8F93\u5165\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84\u3002":n===Sr.setAgentPreset?na(t)?null:"\u8BF7\u9009\u62E9 Agent Preset\u3002":n===Sr.setContextEnhancement?ea(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002":n===Sr.setAccessPolicy?ta(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u8BBF\u95EE\u8BBE\u7F6E\u3002":n===Sr.setGroupSessionScope?ia(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u7FA4\u4F1A\u8BDD\u7B56\u7565\u3002":"Unknown bot endpoint.":"Payload must be an object."}function e0(n){if(Array.isArray(n))return n.map(e0);if(!A0(n))return n;let t={};for(let[o,a]of Object.entries(n))gye.has(o)||(t[o]=e0(a));return t}function dye(n,t){let o=oa(t);return o||(t?.code==="webhook-configured"?{code:"webhook-configured",message:t.message}:t?.code==="telegram-401"||t?.code==="discord-401"?{code:"invalid-token",message:`${n} Bot Token \u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\u3002`}:n==="Telegram"&&cye.has(t?.code)?{code:"telegram-network-error",message:"\u65E0\u6CD5\u8BBF\u95EE Telegram Bot API\u3002\u8BF7\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\uFF1BNode.js 22.21+ \u53EF\u8BBE\u7F6E NODE_USE_ENV_PROXY=1\uFF0C\u5E76\u914D\u7F6E HTTPS_PROXY\u3001HTTP_PROXY \u548C NO_PROXY\uFF0C\u7136\u540E\u91CD\u542F dsh web\u3002"}:t?.code==="discord-intents"?{code:"discord-intents",message:t.message}:{code:`${n.toLowerCase()}-operation-failed`,message:`${n} \u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002`})}function Ly(n,{channel:t}){for(let o of["status","bindCredentials","reconnectBot","deleteBot"])if(typeof n?.[o]!="function")throw new TypeError(`A complete ${t} controller is required (${o})`);return async(o,a,e)=>{if(e?.aborted)return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}};if(!sye.includes(o))return{ok:!1,error:{code:"bad-request",message:`Unknown ${t} endpoint.`}};let i=lye(o,a);if(i)return{ok:!1,error:{code:"bad-request",message:i}};try{let A;if(o===Sr.status)A=await n.status();else if(o===Sr.bindCredentials)A=await n.bindCredentials(a);else if(o===Sr.reconnectBot){if(A=await n.reconnectBot(a.botId),e?.aborted)return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}};if(a.sendTest===!0){let r=null;try{if(A?.bots?.find(s=>s?.botId===a.botId)?.connected!==!0){let s=new Error("Bot is not connected");throw s.code="test-target-unavailable",s}if(typeof n.sendConnectionTest!="function"){let s=new Error("Connection test is unavailable");throw s.code="test-target-unavailable",s}await n.sendConnectionTest(a.botId)}catch(s){r=s}A={...A,testMessage:dr(r)}}}else if(o===Sr.setWorkspace){if(typeof n.updateWorkspace!="function")throw new Error("Workspace update is unavailable");A=await n.updateWorkspace(a.botId,a.workspace)}else if(o===Sr.setContextEnhancement){if(typeof n.updateContextEnhancement!="function")throw new Error("Context enhancement update is unavailable");A=await n.updateContextEnhancement(a.botId,a.config)}else if(o===Sr.setAccessPolicy){if(typeof n.updateAccessPolicy!="function")throw new Error("Access policy update is unavailable");A=await n.updateAccessPolicy(a.botId,a.policy)}else if(o===Sr.setGroupSessionScope){if(typeof n.updateGroupSessionScope!="function")throw new Error("Group session scope update is unavailable");A=await n.updateGroupSessionScope(a.botId,a.groupSessionScope)}else if(o===Sr.setAgentPreset){if(typeof n.updateAgentPreset!="function")throw new Error("Agent preset update is unavailable");A=await n.updateAgentPreset(a.botId,a.agentPreset)}else A=await n.deleteBot(a.botId);return e?.aborted?{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}:{ok:!0,value:e0(A)}}catch(A){return e?.aborted?{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}:{ok:!1,error:dye(t,A)}}}}function Lj(n,t,{channel:o,rpcChannel:a,authority:e}){if(!n?.connection?.rpc||typeof n.connection.rpc.handle!="function")throw new TypeError("DSH Host Connection RPC is required");return n.connection.rpc.handle(a,Ly(t,{channel:o}),{authority:mr(e)})}var Uj="/discord",Hj=Sr,pye=Object.freeze(Object.values(Hj));function Uy(n,t,o){return Lj(n,t,{channel:"Discord",rpcChannel:Uj,authority:o})}async function Kj(n,t={}){if(t?.controller)return Uy(n,t.controller,t.rpcAuthority);let o=await $T(n,t,t.internals??{}),a=t.deliveryService&&o.deliveryAdapter?t.deliveryService.registerAdapter(o.deliveryAdapter):void 0,e=Uy(n,o.controller,t.rpcAuthority);return n.effect(()=>async()=>{await a?.(),await o.close()},"dsh-im: close Discord bot connections"),e}import{homedir as Pye}from"node:os";import{join as a0,resolve as o0}from"node:path";import{mkdir as hye,readFile as Eye,rename as uye,unlink as Cye,writeFile as Bye}from"node:fs/promises";import{dirname as fye,isAbsolute as Qye}from"node:path";var Ep="office-harness.v1",xj="/office",up=Object.freeze({status:"connection.status",configure:"connector.configure",reconnect:"connector.reconnect",test:"connector.test",remove:"connector.remove"}),Tn=Object.freeze({stream:"/api/harness/connector/stream",heartbeat:"/api/harness/connector/heartbeat",job:"/api/harness/connector/jobs/:id",accept:"/api/harness/connector/jobs/:id/accept",renew:"/api/harness/connector/jobs/:id/renew",progress:"/api/harness/connector/jobs/:id/progress",approval:"/api/harness/connector/jobs/:id/approval",result:"/api/harness/connector/jobs/:id/result",fail:"/api/harness/connector/jobs/:id/fail"});function Tu(n){let t=new URL(typeof n=="string"?n.trim():""),o=t.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(t.hostname);if(t.protocol!=="https:"&&!o)throw new TypeError("AI Office URL must use HTTPS (HTTP is allowed only for loopback testing)");if(t.username||t.password||t.search||t.hash)throw new TypeError("AI Office URL must be a bare origin");return t.pathname="/",t}function Hy(n){let t=Tu(n);return Object.fromEntries(Object.entries(Tn).map(([o,a])=>[o,new URL(a,t).toString()]))}var yye=/^[a-z][a-z0-9-]{1,63}$/,mye=/^[a-z0-9][a-z0-9_-]{2,63}$/i;function Cp(n){return typeof n=="string"&&n.trim()?n.trim():null}function Yj(n,{kind:t}){if(!n||typeof n!="object"||Array.isArray(n))return null;let o={};for(let[a,e]of Object.entries(n)){let i=Cp(a),A=Cp(e);if(!i||!yye.test(i)||!A||t==="workspace"&&!Qye(A)||t==="preset"&&A.length>8e3)return null;o[i]=A}return Object.freeze(o)}function Ky(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let t;try{t=Tu(n.baseUrl).origin}catch{return null}let o=Cp(n.deviceId),a=Cp(n.deviceTokenRef),e=Yj(n.workspaces??{},{kind:"workspace"}),i=Yj(n.instructionPresets??{},{kind:"preset"}),A=Number(n.maxConcurrency??1),r=Number(n.heartbeatSeconds??30);return!o||!mye.test(o)||!a||!/^DSH_OFFICE_DEVICE_TOKEN_[A-F0-9]{24}$/.test(a)||!e||!i||!Number.isInteger(A)||A<1||A>4||!Number.isInteger(r)||r<10||r>300?null:Object.freeze({version:1,protocolVersion:Ep,baseUrl:t,deviceId:o,deviceTokenRef:a,maxConcurrency:A,heartbeatSeconds:r,workspaces:e,instructionPresets:i,createdAt:Cp(n.createdAt)??new Date().toISOString(),updatedAt:Cp(n.updatedAt)??new Date().toISOString()})}var xy=class{#e;#A=null;#t=Promise.resolve();constructor(t){this.#e=t}async load(){try{let t=Ky(JSON.parse(await Eye(this.#e,"utf8")));if(!t)throw new Error("dsh-im AI Office config is invalid");this.#A=t}catch(t){if(t?.code!=="ENOENT")throw t;this.#A=null}return this}get(){return this.#A?structuredClone(this.#A):null}async save(t){let o=Ky(t);if(!o)throw new Error("Refusing to persist invalid AI Office configuration");let a=this.#t.then(async()=>{await hye(fye(this.#e),{recursive:!0,mode:448});let e=`${this.#e}.tmp`;await Bye(e,`${JSON.stringify(o,null,2)} +`,{mode:384}),await uye(e,this.#e),this.#A=o});return this.#t=a.then(()=>{},()=>{}),await a,this.get()}async clear(){let t=this.#t.then(async()=>{try{await Cye(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#A=null});this.#t=t.then(()=>{},()=>{}),await t}};import{createHash as kye}from"node:crypto";import{setTimeout as Nye}from"node:timers/promises";function t0(n,t){let o=new Error(`AI Office ${n} failed: HTTP ${t.status}`);return o.code=t.status===401?"invalid-device-token":t.status===404?"office-hook-unavailable":t.status===409?"office-job-conflict":"office-transport-failed",o}function Bp(n,t="office-transport-failed",o){let a=new Error(n,o===void 0?void 0:{cause:o});return a.code=t,a}function r0(n,t){return t?.aborted||n?.name==="AbortError"}function Sye(n){let t="message",o,a=[];for(let i of n.split(/\r?\n/))i.startsWith("event:")?t=i.slice(6).trim()||"message":i.startsWith("id:")?o=i.slice(3).trim()||void 0:i.startsWith("data:")&&a.push(i.slice(5).trimStart());if(a.length===0)return null;let e;try{e=JSON.parse(a.join(` +`))}catch{throw new Error("AI Office SSE returned invalid JSON")}return{id:o,type:typeof e?.type=="string"?e.type:t,data:e}}var Yy=class{#e;#A;#t;#r;constructor({baseUrl:t,deviceId:o,token:a,fetchImpl:e=fetch}){this.#e=t,this.#A=o,this.#t=a,this.#r=e}hooks(){return Hy(this.#e)}#I(t={}){return{authorization:`Bearer ${this.#t}`,"x-harness-device-id":this.#A,...t}}async heartbeat(t,{signal:o}={}){let a;try{a=await this.#r(new URL(Tn.heartbeat,this.#e),{method:"POST",headers:this.#I({accept:"application/json","content-type":"application/json"}),body:JSON.stringify(t),signal:o,redirect:"error"})}catch(i){throw r0(i,o)?i:Bp("AI Office heartbeat request could not be completed",void 0,i)}if(!a.ok)throw t0("heartbeat",a);let e;try{e=await a.json()}catch(i){throw Bp("AI Office heartbeat returned invalid JSON","office-protocol-mismatch",i)}if(!e||typeof e!="object"||e.ok!==!0||e.protocolVersion!==Ep)throw Bp("AI Office heartbeat protocol does not match","office-protocol-mismatch");return e}async#o(t,{method:o="POST",body:a,leaseToken:e,signal:i}={}){let A=this.#I({accept:"application/json"});a!==void 0&&(A["content-type"]="application/json"),e&&(A["x-harness-lease-token"]=e);let r;try{r=await this.#r(new URL(t,this.#e),{method:o,headers:A,...a===void 0?{}:{body:JSON.stringify(a)},signal:i,redirect:"error",cache:"no-store"})}catch(s){throw r0(s,i)?s:Bp("AI Office Job request could not be completed",void 0,s)}if(!r.ok)throw t0("Job request",r);try{return await r.json()}catch(s){throw Bp("AI Office Job returned invalid JSON","office-protocol-mismatch",s)}}async getJob(t,o={}){return this.#o(Tn.job.replace(":id",t),{...o,method:"GET"})}async acceptJob(t,o={}){return this.#o(Tn.accept.replace(":id",t),o)}async renewJob(t,o,a={}){return this.#o(Tn.renew.replace(":id",t),{...a,leaseToken:o})}async progressJob(t,o,a,e={}){return this.#o(Tn.progress.replace(":id",t),{...e,leaseToken:o,body:a})}async requestApproval(t,o,a,e={}){return this.#o(Tn.approval.replace(":id",t),{...e,leaseToken:o,body:a})}async completeJob(t,o,a,e={}){return this.#o(Tn.result.replace(":id",t),{...e,leaseToken:o,body:a})}async failJob(t,o,a,e={}){return this.#o(Tn.fail.replace(":id",t),{...e,leaseToken:o,body:a})}async stream({signal:t,lastEventId:o,onOpen:a,onEvent:e}){let i=this.#I({accept:"text/event-stream"});o&&(i["last-event-id"]=o);let A;try{A=await this.#r(new URL(Tn.stream,this.#e),{method:"GET",headers:i,signal:t,redirect:"error",cache:"no-store"})}catch(c){throw r0(c,t)?c:Bp("AI Office SSE request could not be completed",void 0,c)}if(!A.ok)throw t0("stream",A);if(!A.headers.get("content-type")?.toLowerCase().includes("text/event-stream"))throw new Error("AI Office stream did not return text/event-stream");if(!A.body)throw new Error("AI Office stream returned no body");a?.();let r=A.body.getReader(),s=new TextDecoder,g="";for(;;){let{value:c,done:I}=await r.read();if(I)break;g=`${g}${s.decode(c,{stream:!0})}`.replaceAll(`\r `,` `);let d;for(;(d=g.indexOf(` -`))!==-1;){let B=g.slice(0,d);g=g.slice(d+2);let f=Bye(B);f&&await e?.(f)}}throw new Error("AI Office SSE stream ended")}};import{setTimeout as fye}from"node:timers/promises";var Kj=/^job-[a-f0-9]{32}$/,Qye=3e4,yye=2048;function fp(){return new DOMException("Office Job was cancelled","AbortError")}function na(n,t=8e3){return typeof n=="string"?n.trim().slice(0,t):""}function mye(n){return n?.code==="office-job-alias-invalid"?n.message:n?.code==="turn-stopped"?w("\u672C\u673A Harness \u5DF2\u505C\u6B62\u8FD9\u6B21\u6267\u884C\u3002"):n?.code==="office-job-conflict"?w("Office Job \u5DF2\u88AB\u9886\u53D6\u3001\u53D6\u6D88\u6216\u7ED3\u675F\u3002"):w("\u672C\u673A Harness \u672A\u80FD\u5B8C\u6210\u4EFB\u52A1\uFF1B\u8BF7\u68C0\u67E5 Harness \u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002")}function Sye(n,t){return["# AI Office Handoff","",w("\u4F60\u6B63\u5728\u672C\u673A DeepSeek Harness \u4E2D\u7EE7\u7EED\u4E00\u4E2A\u6765\u81EA AI Office \u7684\u4EFB\u52A1\u3002"),w("\u53EA\u5728\u5F53\u524D Workspace \u5185\u884C\u52A8\u3002\u5B8C\u6210\u540E\u5FC5\u987B\u8FD4\u56DE\uFF1A\u7ED3\u679C\u6458\u8981\u3001\u6539\u52A8\u6587\u4EF6\u3001\u9A8C\u8BC1\u8BC1\u636E\u3001\u672A\u89E3\u51B3\u98CE\u9669\u3002"),"",w("## \u672C\u673A Instruction Preset"),t,"",...na(n.instruction)?[w("## \u672C\u8F6E\u8865\u5145\u6307\u4EE4"),na(n.instruction),""]:[],w("## Office \u65F6\u95F4\u7EBF"),na(n.markdown,2e5)].join(` -`)}function wye(n){let t=na(n?.interactionId||n?.rpcId,180);if(!t||typeof n?.respond!="function")return null;if(n.kind==="approval"){let a=Y_(n.payload,{toolCall:n.toolCall,maxArgumentsLength:1e4});return a?{id:t,kind:"approval",title:w("\u6279\u51C6 {tool}",{tool:na(n.payload?.toolName,120)||w("Harness \u5DE5\u5177")}),prompt:a,toolName:na(n.payload?.toolName,120)}:null}if(n.kind!=="question")return null;let o=n.payload?.questions;return!Array.isArray(o)||o.length===0||o.some(a=>!Ta(a))?null:{id:t,kind:"question",title:o.length>1?w("Harness \u9700\u8981 {count} \u9879\u8865\u5145\u4FE1\u606F",{count:o.length}):na(o[0].header||o[0].question,160),prompt:o.map((a,e)=>da(a,e,o.length)).join(` +`))!==-1;){let B=g.slice(0,d);g=g.slice(d+2);let f=Sye(B);f&&await e?.(f)}}throw new Error("AI Office SSE stream ended")}};import{setTimeout as wye}from"node:timers/promises";var jj=/^job-[a-f0-9]{32}$/,Dye=3e4,Oye=2048;function fp(){return new DOMException("Office Job was cancelled","AbortError")}function sa(n,t=8e3){return typeof n=="string"?n.trim().slice(0,t):""}function bye(n){return n?.code==="office-job-alias-invalid"?n.message:n?.code==="turn-stopped"?w("\u672C\u673A Harness \u5DF2\u505C\u6B62\u8FD9\u6B21\u6267\u884C\u3002"):n?.code==="office-job-conflict"?w("Office Job \u5DF2\u88AB\u9886\u53D6\u3001\u53D6\u6D88\u6216\u7ED3\u675F\u3002"):w("\u672C\u673A Harness \u672A\u80FD\u5B8C\u6210\u4EFB\u52A1\uFF1B\u8BF7\u68C0\u67E5 Harness \u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002")}function Mye(n,t){return["# AI Office Handoff","",w("\u4F60\u6B63\u5728\u672C\u673A DeepSeek Harness \u4E2D\u7EE7\u7EED\u4E00\u4E2A\u6765\u81EA AI Office \u7684\u4EFB\u52A1\u3002"),w("\u53EA\u5728\u5F53\u524D Workspace \u5185\u884C\u52A8\u3002\u5B8C\u6210\u540E\u5FC5\u987B\u8FD4\u56DE\uFF1A\u7ED3\u679C\u6458\u8981\u3001\u6539\u52A8\u6587\u4EF6\u3001\u9A8C\u8BC1\u8BC1\u636E\u3001\u672A\u89E3\u51B3\u98CE\u9669\u3002"),"",w("## \u672C\u673A Instruction Preset"),t,"",...sa(n.instruction)?[w("## \u672C\u8F6E\u8865\u5145\u6307\u4EE4"),sa(n.instruction),""]:[],w("## Office \u65F6\u95F4\u7EBF"),sa(n.markdown,2e5)].join(` +`)}function _ye(n){let t=sa(n?.interactionId||n?.rpcId,180);if(!t||typeof n?.respond!="function")return null;if(n.kind==="approval"){let a=Y_(n.payload,{toolCall:n.toolCall,maxArgumentsLength:1e4});return a?{id:t,kind:"approval",title:w("\u6279\u51C6 {tool}",{tool:sa(n.payload?.toolName,120)||w("Harness \u5DE5\u5177")}),prompt:a,toolName:sa(n.payload?.toolName,120)}:null}if(n.kind!=="question")return null;let o=n.payload?.questions;return!Array.isArray(o)||o.length===0||o.some(a=>!Ta(a))?null:{id:t,kind:"question",title:o.length>1?w("Harness \u9700\u8981 {count} \u9879\u8865\u5145\u4FE1\u606F",{count:o.length}):sa(o[0].header||o[0].question,160),prompt:o.map((a,e)=>pa(a,e,o.length)).join(` --- -`),questions:o}}function Dye(n,t){return new Promise((o,a)=>{if(n.controller.signal.aborted)return a(n.controller.signal.reason??fp());let e=()=>{n.approvals.delete(t),a(n.controller.signal.reason??fp())};n.controller.signal.addEventListener("abort",e,{once:!0}),n.approvals.set(t,{resolve(i){n.controller.signal.removeEventListener("abort",e),n.approvals.delete(t),o(i)}})})}var Yy=class{#e;#A;#t;#r;#I;#o=new Map;#g=new Set;#i=new Set;#a=!1;#s={running:0,completed:0,failed:0,lastJobId:null,lastJobAt:null};constructor({config:t,transport:o,createHarness:a,logger:e=console,sleepImpl:i=fye}){if(!t||!o||typeof a!="function")throw new TypeError("OfficeJobExecutor requires config, transport, and createHarness");this.#e=t,this.#A=o,this.#t=a,this.#r=e,this.#I=i}get status(){return structuredClone(this.#s)}offer(t){return this.#a||!Kj.test(t)||this.#o.has(t)||this.#g.has(t)||this.#i.has(t)?!1:(this.#g.add(t),this.#l(),!0)}handleEvent(t){let o=na(t?.data?.jobId,80);if(!Kj.test(o))return!1;if(t.type==="job.available")return this.offer(o);if(t.type==="job.cancel")return this.cancel(o);if(t.type==="approval.reply"){let a=this.#o.get(o),e=na(t.data?.approvalId,180),i=a?.approvals.get(e);return i?(i.resolve({decision:t.data?.decision==="approved"?"approved":"rejected",answer:na(t.data?.answer)}),!0):!1}return!1}cancel(t){this.#g.delete(t);let o=this.#o.get(t);return o?(o.cancelled=!0,o.controller.abort(fp()),o.sessionId&&o.harness&&o.harness.rpc("session.cancel",{sessionId:o.sessionId,keepInbox:!0},1e4).catch(()=>{}),!0):!1}async close(){this.#a=!0,this.#g.clear();for(let t of this.#o.values())t.controller.abort(fp());await Promise.allSettled([...this.#o.values()].map(t=>t.task))}#l(){for(;!this.#a&&this.#o.size0;){let t=this.#g.values().next().value;this.#g.delete(t);let o={controller:new AbortController,approvals:new Map,harness:null,sessionId:null,leaseToken:null,cancelled:!1,lastProgressAt:0,lastProgress:"",task:null};o.task=this.#c(t,o).finally(()=>{this.#o.delete(t),this.#s.running=this.#o.size,this.#l()}),this.#o.set(t,o),this.#s.running=this.#o.size,o.task.catch(a=>this.#r.warn?.("[dsh-im:office] Job task ended:",a.message))}}async#c(t,o){let a=o.controller.signal,e=null;try{let A=(await this.#A.getJob(t,{signal:a}))?.job;if(!A||A.id!==t)throw new Error("Office returned an invalid Job payload");let r=await this.#A.acceptJob(t,{signal:a});if(!na(r?.leaseToken,200))throw new Error("Office returned an invalid Job lease");o.leaseToken=r.leaseToken,e=this.#d(t,o);let s=this.#e.workspaces[A.workspaceAlias],g=this.#e.instructionPresets[A.instructionPreset];if(!s||!g){let I=new Error(w("Office Job \u5F15\u7528\u4E86\u672C\u673A\u672A\u914D\u7F6E\u7684 Workspace/Preset alias\u3002"));throw I.code="office-job-alias-invalid",I}o.harness=this.#t({workspace:s}),await this.#p(t,o,{kind:"status",message:w("\u5DF2\u9886\u53D6 Job\uFF0C\u51C6\u5907 Workspace alias\uFF1A{alias}",{alias:A.workspaceAlias})},!0),o.sessionId=await o.harness.createSession({signal:a,workspace:s}),await this.#p(t,o,{kind:"status",message:w("Harness Session \u5DF2\u521B\u5EFA\u3002"),sessionId:o.sessionId},!0);let c=await o.harness.ask(o.sessionId,Sye(A,g),{timeoutMs:30*6e4,signal:a,onUpdate:I=>this.#n(t,o,I),onInteraction:I=>this.#h(t,o,I),onInteractionResolved:I=>{let d=na(I?.interactionId,180);o.approvals.get(d)?.resolve({decision:"rejected",answer:""})}});if(a.aborted)throw a.reason??fp();await this.#A.completeJob(t,o.leaseToken,{resultMarkdown:c,sessionId:o.sessionId},{signal:a}),this.#s.completed+=1,this.#u(t)}catch(i){if(!o.cancelled&&o.leaseToken&&(await this.#A.failJob(t,o.leaseToken,{error:mye(i),...o.sessionId?{sessionId:o.sessionId}:{}}).catch(()=>{}),this.#s.failed+=1),i?.code==="office-job-conflict"||i?.code==="office-hook-unavailable"){this.#u(t);return}!o.cancelled&&!a.aborted&&this.#r.warn?.(`[dsh-im:office] Job ${t} failed:`,i.message)}finally{o.controller.abort(fp()),await e?.catch(()=>{}),this.#s.lastJobId=t,this.#s.lastJobAt=new Date().toISOString()}}async#d(t,o){for(;!o.controller.signal.aborted;){try{await this.#I(Qye,void 0,{signal:o.controller.signal})}catch{return}try{await this.#A.renewJob(t,o.leaseToken,{signal:o.controller.signal})}catch(a){if(o.controller.signal.aborted)return;o.cancelled=!0,o.controller.abort(a),o.sessionId&&o.harness&&o.harness.rpc("session.cancel",{sessionId:o.sessionId,keepInbox:!0},1e4).catch(()=>{});return}try{let e=(await this.#A.getJob(t,{signal:o.controller.signal}))?.job?.approval;e&&(e.status==="approved"||e.status==="rejected")&&o.approvals.get(e.id)?.resolve({decision:e.status,answer:na(e.answer)})}catch(a){if(o.controller.signal.aborted)return;this.#r.warn?.(`[dsh-im:office] Job ${t} approval poll failed; will retry after the next renewal:`,a.message)}}}async#n(t,o,a){let e=a?.type==="tool"?w("\u6B63\u5728\u4F7F\u7528 {tool}\u2026",{tool:na(a.name,160)||w("Harness \u5DE5\u5177")}):na(a?.text,4e3);if(!e)return;let i=`${a.type}:${e}`;if(i===o.lastProgress)return;let A=Date.now();a.type==="text"&&A-o.lastProgressAt<1e3||(o.lastProgress=i,o.lastProgressAt=A,await this.#p(t,o,{kind:a.type==="tool"?"tool":a.type==="text"?"text":"status",message:e,...o.sessionId?{sessionId:o.sessionId}:{}}))}#p(t,o,a,e=!1){let i=this.#A.progressJob(t,o.leaseToken,a,{signal:o.controller.signal});return e?i:i.catch(A=>{this.#r.debug?.("[dsh-im:office] ignored a progress delivery failure:",A.message)})}async#h(t,o,a){let e=wye(a);if(!e){a?.kind==="approval"&&typeof a.respond=="function"&&await a.respond({ok:!0,value:{sessionId:a.sessionId,approvalId:a.payload?.approvalId,outcome:"rejected"}});return}let i=Dye(o,e.id);try{await this.#A.requestApproval(t,o.leaseToken,e,{signal:o.controller.signal});let A=await i;if(e.kind==="approval"){await a.respond({ok:!0,value:{sessionId:a.sessionId,approvalId:a.payload.approvalId,outcome:A.decision==="approved"?"allowed-once":"rejected"}});return}if(A.decision!=="approved"){await a.respond({ok:!1,error:{code:"cancelled",message:"The AI Office user rejected this question.",details:{}}});return}let r=na(A.answer).split(/\r?\n/);await a.respond({ok:!0,value:{sessionId:a.sessionId,answer:{answers:e.questions.map((s,g)=>Na(s,r[g]||r[0]||""))}}})}catch(A){throw o.approvals.delete(e.id),A}}#u(t){this.#i.add(t),!(this.#i.size<=yye)&&this.#i.delete(this.#i.values().next().value)}};var xj=Object.freeze([1e3,3e3,1e4,3e4]);function bye(n){let t=typeof n?.code=="string"?n.code:"office-connection-failed",o={"invalid-device-token":w("AI Office \u62D2\u7EDD\u4E86 Device Token\u3002"),"office-hook-unavailable":w("AI Office Connector Hook \u5C1A\u672A\u5C31\u7EEA\u3002"),"office-protocol-mismatch":w("AI Office Connector \u534F\u8BAE\u7248\u672C\u4E0D\u517C\u5BB9\u3002"),"office-transport-failed":w("\u672C\u673A\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE AI Office\u3002")};return{code:t,message:o[t]??w("AI Office \u8FDE\u63A5\u5DF2\u4E2D\u65AD\u3002")}}var Qp=class{#e;#A;#t;#r;#I;#o=null;#g=null;#i;#a;constructor({config:t,token:o,logger:a=console,transport:e,createHarness:i,jobExecutor:A,sleepImpl:r=Oye}){this.#e=t,this.#A=o,this.#t=a,this.#I=r,this.#r=e??new xy({baseUrl:t.baseUrl,deviceId:t.deviceId,token:o}),this.#i={state:"idle",connected:!1,startedAt:null,lastHeartbeatAt:null,lastEventAt:null,lastEventId:null,lastEventType:null,reconnects:0,jobsOffered:0,error:null},this.#a=A??(i?new Yy({config:t,transport:this.#r,createHarness:i,logger:a}):null)}get status(){return structuredClone({...this.#i,...this.#a?{jobs:this.#a.status}:{}})}capabilities(){return{protocolVersion:Ep,deviceId:this.#e.deviceId,workspaces:Object.keys(this.#e.workspaces),instructionPresets:Object.keys(this.#e.instructionPresets),maxConcurrency:this.#e.maxConcurrency}}async testConnection(t){return await this.#r.heartbeat({...this.capabilities(),probe:!0},{signal:t}),{ok:!0}}start(){return this.#g?this.status:(this.#o=new AbortController,this.#i.startedAt=new Date().toISOString(),this.#i.state="connecting",this.#g=this.#s(this.#o.signal).finally(()=>{this.#g=null}),this.#g.catch(t=>{this.#o?.signal.aborted||this.#t.error?.("[dsh-im:office] connector stopped:",t)}),this.status)}async#s(t){let o=0;for(;!t.aborted;){let a=new AbortController,e=AbortSignal.any([t,a.signal]);try{let i=await this.#r.heartbeat(this.capabilities(),{signal:e});this.#c(i?.jobs),this.#i.lastHeartbeatAt=new Date().toISOString();let A=!1,r=this.#l(e,()=>{A&&!e.aborted&&(o=0)}),s=this.#r.stream({signal:e,lastEventId:this.#i.lastEventId,onOpen:()=>{this.#i.connected=!0,this.#i.state="connected",this.#i.error=null,A=!0},onEvent:async g=>{this.#i.lastEventAt=new Date().toISOString(),this.#i.lastEventId=g.id??this.#i.lastEventId,this.#i.lastEventType=g.type,g.type==="job.available"&&(this.#i.jobsOffered+=1),this.#a?.handleEvent(g)}});await Promise.race([s,r])}catch(i){if(t.aborted)break;a.abort(),this.#i.connected=!1,this.#i.state="reconnecting",this.#i.error=bye(i),this.#i.reconnects+=1;let A=xj[Math.min(o,xj.length-1)];o+=1;try{await this.#I(A,void 0,{signal:t})}catch{break}}finally{a.abort()}}this.#i.connected=!1,this.#i.state="idle"}async#l(t,o){for(;!t.aborted;){await this.#I(this.#e.heartbeatSeconds*1e3,void 0,{signal:t});let a=await this.#r.heartbeat(this.capabilities(),{signal:t});this.#c(a?.jobs),this.#i.lastHeartbeatAt=new Date().toISOString(),o?.()}}#c(t){if(Array.isArray(t))for(let o of t)typeof o?.id=="string"&&this.#a?.offer(o.id)&&(this.#i.jobsOffered+=1)}async stop(){let t=this.#g;return this.#o?.abort(),this.#o=null,t&&await t.catch(()=>{}),await this.#a?.close(),this.#i.connected=!1,this.#i.state="idle",this.status}};function i0(n){return typeof n=="string"&&n.trim()?n.trim():null}function _ye(n,t){return`DSH_OFFICE_DEVICE_TOKEN_${Mye("sha256").update(`${n} -${t}`).digest("hex").slice(0,24).toUpperCase()}`}var jy=class{#e;#A;#t;#r;#I=null;#o=Promise.resolve();constructor({credentials:t,configStore:o,logger:a=console,createRuntime:e}){if(!t?.resolve||!t?.set||!t?.unset)throw new TypeError("AI Office requires the Harness credential provider");if(!o?.get||!o?.save||!o?.clear)throw new TypeError("AI Office requires a config store");this.#e=t,this.#A=o,this.#t=a,this.#r=e??(i=>new Qp(i))}async initialize(){let t=this.#A.get();if(t){let o=await this.#e.resolve(t.deviceTokenRef).catch(()=>{});o?.value&&await this.#i(t,o.value)}return this.status()}async configure(t={}){return this.#s(async()=>{let o=this.#A.get(),a=i0(t.baseUrl),e=i0(t.deviceId);if(!a||!e)throw new TypeError("Office URL and Device ID are required");let i=Tu(a).origin,A=_ye(i,e),r=i0(t.deviceToken),s=await this.#e.resolve(A).catch(()=>{}),g=r??s?.value;if(!g||g.length<32)throw new TypeError("Device Token must contain at least 32 characters");let c=new Date().toISOString(),I=Hy({version:1,baseUrl:i,deviceId:e,deviceTokenRef:A,maxConcurrency:t.maxConcurrency,heartbeatSeconds:t.heartbeatSeconds,workspaces:t.workspaces,instructionPresets:t.instructionPresets,createdAt:o?.createdAt??c,updatedAt:c});if(!I)throw new TypeError("AI Office connector configuration is invalid");await this.#e.set(A,g);try{await this.#A.save(I)}catch(d){throw s?.value?await this.#e.set(A,s.value).catch(()=>{}):await this.#e.unset(A).catch(()=>{}),d}return o?.deviceTokenRef&&o.deviceTokenRef!==A&&await this.#e.unset(o.deviceTokenRef).catch(()=>{}),await this.#i(I,g),this.status()})}async reconnect(){return this.#s(async()=>{let t=this.#A.get();if(!t)throw new Error("AI Office connector is not configured");return await this.#i(t),this.status()})}async test(){let t=this.#A.get();if(!t)throw new Error("AI Office connector is not configured");let o=await this.#g(t),a=this.#r({config:t,token:o,logger:this.#t});try{await a.testConnection(AbortSignal.timeout(1e4))}finally{await a.stop().catch(()=>{})}return{tested:!0,snapshot:await this.status()}}async remove(){return this.#s(async()=>{let t=this.#A.get();return await this.#a(),t?.deviceTokenRef&&await this.#e.unset(t.deviceTokenRef).catch(()=>{}),await this.#A.clear(),this.status()})}async status(){let t=this.#A.get();if(!t)return{schemaVersion:1,configured:!1,connected:!1,state:"unconfigured"};let o=await this.#e.resolve(t.deviceTokenRef).catch(()=>{}),a=this.#I?.status??null;return{schemaVersion:1,configured:!0,connected:a?.connected===!0,state:a?.state??(o?.value?"idle":"missing-token"),config:{protocolVersion:t.protocolVersion,baseUrl:t.baseUrl,deviceId:t.deviceId,maxConcurrency:t.maxConcurrency,heartbeatSeconds:t.heartbeatSeconds,workspaces:t.workspaces,instructionPresets:t.instructionPresets,hooks:Uy(t.baseUrl)},health:a,tokenConfigured:!!o?.value}}async close(){await this.#o.catch(()=>{}),await this.#a()}async#g(t){let o=await this.#e.resolve(t.deviceTokenRef).catch(()=>{});if(!o?.value)throw new Error("AI Office Device Token is missing");return o.value}async#i(t,o){await this.#a();let a=o??await this.#g(t),e=this.#r({config:t,token:a,logger:this.#t});this.#I=e,e.start()}async#a(){let t=this.#I;this.#I=null,t&&await t.stop()}#s(t){let o=this.#o.then(t,t);return this.#o=o.then(()=>{},()=>{}),o}};function Nye(n={}){let t=o0(n.dshHome??process.env.DSH_HOME??a0(Tye(),".dsh")),o=o0(n.dataDir??a0(t,"integrations","dsh-office"));return{root:o,config:o0(n.configPath??a0(o,"config.json"))}}async function Yj(n,t={},o={}){let a=ci(n,t),e=o.ConfigStore??Ky,i=o.Controller??jy,A=o.Runtime??Qp,r=o.HarnessClient??yr,s=Nye(t),g=await new e(s.config).load(),c=typeof n.logger=="function"?n.logger("dsh-im:office"):n.logger??console,I=o.createHarness??(({workspace:B})=>new r({...a,workspace:B,autostart:!1,dshBin:t.dshBin??"dsh",rpcIdPrefix:"office",logPrefix:"dsh-im:office"})),d=new i({credentials:n.credentials,configStore:g,logger:c,createRuntime:B=>new A({...B,createHarness:I,...o.transport?{transport:o.transport}:{}})});return await d.initialize(),{controller:d,close:()=>d.close(),paths:s}}function n0(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function Nu(n,t){return n0(n)&&Object.keys(n).every(o=>t.includes(o))}function Rye(n){return Nu(n,["baseUrl","deviceId","deviceToken","maxConcurrency","heartbeatSeconds","workspaces","instructionPresets"])&&typeof n.baseUrl=="string"&&typeof n.deviceId=="string"&&(n.deviceToken===void 0||typeof n.deviceToken=="string")&&n0(n.workspaces)&&n0(n.instructionPresets)}function kye(n){for(let t of["status","configure","reconnect","test","remove"])if(typeof n?.[t]!="function")throw new TypeError(`AI Office controller requires ${t}()`);return async(t,o,a)=>{if(a?.aborted)return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}};try{let e;if(t===up.status&&Nu(o,[]))e=await n.status();else if(t===up.configure&&Rye(o))e=await n.configure(o);else if(t===up.reconnect&&Nu(o,[]))e=await n.reconnect();else if(t===up.test&&Nu(o,[]))e=await n.test();else if(t===up.remove&&Nu(o,["confirm"])&&o.confirm===!0)e=await n.remove();else return{ok:!1,error:{code:"bad-request",message:"Invalid AI Office connector request."}};return{ok:!0,value:e}}catch(e){let i=e?.code==="invalid-device-token"?"invalid-device-token":e?.code==="office-hook-unavailable"?"office-hook-unavailable":"office-operation-failed",A=i==="invalid-device-token"?"AI Office Device Token \u65E0\u6548\u3002":i==="office-hook-unavailable"?"AI Office Hook \u5C1A\u672A\u4E0A\u7EBF\u6216\u5730\u5740\u4E0D\u6B63\u786E\u3002":e instanceof TypeError?e.message:"AI Office \u8FDE\u63A5\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002";return{ok:!1,error:{code:i,message:A}}}}}function s0(n,t,o){return n.connection.rpc.handle(Uj,kye(t),{authority:mr(o)})}async function jj(n,t={}){if(t.controller)return s0(n,t.controller,t.rpcAuthority);let o=await Yj(n,t,t.internals??{}),a=s0(n,o.controller,t.rpcAuthority);return n.effect(()=>async()=>o.close(),"dsh-im: close AI Office connector"),a}var vye=new Set(["starting","qr_ready","polling","slow_down","domain_switched"]);function Pye(n){let t=n?.client_id??n?.appId,o=n?.client_secret??n?.appSecret;if(typeof t!="string"||t.length===0||typeof o!="string"||o.length===0)throw new TypeError("Feishu registration returned invalid credentials");return{appId:t,appSecret:o,userInfo:n?.user_info??n?.userInfo}}async function Gye(n){return typeof n.status!="function"?{}:await n.status()}function Fye(n){return n?.connected===!0?!0:n?.ready===!0&&n?.feishuLongConnectionState==="connected"&&n?.harnessReachable===!0}var Jy=class{#e;#A;#t;#r;#I=!1;#o=null;constructor({createProvisioningManager:t,credentialStore:o,connectionManager:a,registrationOptions:e={}}={}){if(typeof t!="function")throw new TypeError("createProvisioningManager is required");if(!o||typeof o.save!="function"||typeof o.clear!="function")throw new TypeError("credentialStore.save/clear are required");if(!a||typeof a.connect!="function"||typeof a.disconnect!="function")throw new TypeError("connectionManager.connect/disconnect are required");if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError("registrationOptions must be an object");if(this.#e=o,this.#A=a,this.#t=structuredClone(e),this.#r=t({onCredentials:i=>this.#g(i)}),!this.#r||typeof this.#r.start!="function"||typeof this.#r.status!="function"||typeof this.#r.cancel!="function")throw new TypeError("The provisioning manager must implement start/status/cancel")}async startRegistration(){return this.#o=null,await this.#r.start(structuredClone(this.#t)),this.status()}async cancelRegistration(){return await this.#r.cancel(),this.status()}async disconnect(){await this.#r.cancel(),await this.#A.disconnect();try{await this.#e.clear(),this.#I=!1,this.#o=null}catch{this.#o={code:"credential_removal_failed",message:"Unable to remove the Feishu credentials."}}return this.status()}async status(){let t=await this.#r.status(),o=await Gye(this.#A),a=Fye(o),e=this.#I;if(typeof this.#e.configured=="function")try{e=await this.#e.configured()}catch{e=this.#I}let i="unconfigured";return a?i="connected":vye.has(t?.state)?i="registering":t?.state==="saving"?i="connecting":this.#o||t?.state==="error"?i="error":e&&(i="disconnected"),{phase:i,connected:a,configured:e,registration:t,connection:o,error:this.#o??t?.error??null}}async close(){await this.#r.cancel(),await this.#A.disconnect()}async#g(t){let o=Pye(t);try{await this.#e.save(o),this.#I=!0,await this.#A.connect(o),this.#o=null}catch{throw this.#o={code:"connection_failed",message:"The bot was created, but its connection could not be started."},new Error("Unable to activate the Feishu connection.")}}};function g0(n){return new Jy(n)}import{homedir as fFe}from"node:os";import{join as Eh,resolve as $c}from"node:path";import{unlink as QFe}from"node:fs/promises";var aG={};Ur(aG,{AESCipher:()=>YC,AccessTokenError:()=>sh,Aily:()=>vP,AppType:()=>Rs,CAppTicket:()=>xC,CTenantAccessToken:()=>FC,CardActionHandler:()=>TP,Client:()=>bS,ClientAssertionError:()=>ga,DefaultCache:()=>wS,Domain:()=>ks,EventDispatcher:()=>_S,LarkChannel:()=>PS,LarkChannelError:()=>Kt,LoggerLevel:()=>Bo,LoggerProxy:()=>Vc,WSClient:()=>NS,adaptDefault:()=>bke,adaptExpress:()=>Mke,adaptKoa:()=>_ke,adaptKoaRouter:()=>Tke,createLarkChannel:()=>hPe,defaultHttpInstance:()=>gh,defaultLogger:()=>Kg,generateChallenge:()=>JC,internalCache:()=>jC,messageCard:()=>Rke,normalize:()=>N5,normalizeBotAdded:()=>_5,normalizeCardAction:()=>M5,normalizeComment:()=>T5,normalizeReaction:()=>zP,registerApp:()=>Yke,withAll:()=>yke,withHelpDeskCredential:()=>Ske,withTenantKey:()=>mke,withTenantToken:()=>wke,withUserAccessToken:()=>Dke});function Ru(n,t){return function(){return n.apply(t,arguments)}}var{toString:Lye}=Object.prototype,{getPrototypeOf:yp}=Object,{iterator:vu,toStringTag:zj}=Symbol,zy=(({hasOwnProperty:n})=>(t,o)=>n.call(t,o))(Object.prototype),ku=(n,t)=>{let o=n,a=[];for(;o!=null&&o!==Object.prototype;){if(a.indexOf(o)!==-1)return!1;if(a.push(o),zy(o,t))return!0;o=yp(o)}return!1},Uye=(n,t)=>n!=null&&ku(n,t)?n[t]:void 0,I0=(n=>t=>{let o=Lye.call(t);return n[o]||(n[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),jo=n=>(n=n.toLowerCase(),t=>I0(t)===n),Vy=n=>t=>typeof t===n,{isArray:gl}=Array,cl=Vy("undefined");function mp(n){return n!==null&&!cl(n)&&n.constructor!==null&&!cl(n.constructor)&&Ya(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}var Vj=jo("ArrayBuffer");function Hye(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Vj(n.buffer),t}var Kye=Vy("string"),Ya=Vy("function"),Wj=Vy("number"),Sp=n=>n!==null&&typeof n=="object",xye=n=>n===!0||n===!1,qy=n=>{if(!Sp(n))return!1;let t=yp(n);return(t===null||t===Object.prototype||yp(t)===null)&&!ku(n,zj)&&!ku(n,vu)},Yye=n=>{if(!Sp(n)||mp(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},jye=jo("Date"),Jye=jo("File"),qye=n=>!!(n&&typeof n.uri<"u"),zye=n=>n&&typeof n.getParts<"u",Vye=jo("Blob"),Wye=jo("FileList"),Zye=jo("Set"),Xye=n=>Sp(n)&&Ya(n.pipe);function $ye(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var Jj=$ye(),qj=typeof Jj.FormData<"u"?Jj.FormData:void 0,eme=n=>{if(!n)return!1;if(qj&&n instanceof qj)return!0;let t=yp(n);if(!t||t===Object.prototype||!Ya(n.append))return!1;let o=I0(n);return o==="formdata"||o==="object"&&Ya(n.toString)&&n.toString()==="[object FormData]"},Ame=jo("URLSearchParams"),[tme,rme,ime,ame]=["ReadableStream","Request","Response","Headers"].map(jo),ome=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Pu(n,t,{allOwnKeys:o=!1}={}){if(n===null||typeof n>"u")return;let a,e;if(typeof n!="object"&&(n=[n]),gl(n))for(a=0,e=n.length;a0;)if(e=o[a],t===e.toLowerCase())return e;return null}var sl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Xj=n=>!cl(n)&&n!==sl;function c0(...n){let{caseless:t,skipUndefined:o}=Xj(this)&&this||{},a={},e=(i,A)=>{if(A==="__proto__"||A==="constructor"||A==="prototype")return;let r=t&&typeof A=="string"&&Zj(a,A)||A,s=zy(a,r)?a[r]:void 0;qy(s)&&qy(i)?a[r]=c0(s,i):qy(i)?a[r]=c0({},i):gl(i)?a[r]=i.slice():(!o||!cl(i))&&(a[r]=i)};for(let i=0,A=n.length;i(Pu(t,(e,i)=>{o&&Ya(e)?Object.defineProperty(n,i,{__proto__:null,value:Ru(e,o),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,i,{__proto__:null,value:e,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:a}),n),sme=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),gme=(n,t,o,a)=>{n.prototype=Object.create(t.prototype,a),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),o&&Object.assign(n.prototype,o)},cme=(n,t,o,a)=>{let e,i,A,r={};if(t=t||{},n==null)return t;do{for(e=Object.getOwnPropertyNames(n),i=e.length;i-- >0;)A=e[i],(!a||a(A,n,t))&&!r[A]&&(t[A]=n[A],r[A]=!0);n=o!==!1&&yp(n)}while(n&&(!o||o(n,t))&&n!==Object.prototype);return t},Ime=(n,t,o)=>{n=String(n),(o===void 0||o>n.length)&&(o=n.length),o-=t.length;let a=n.indexOf(t,o);return a!==-1&&a===o},lme=n=>{if(!n)return null;if(gl(n))return n;let t=n.length;if(!Wj(t))return null;let o=new Array(t);for(;t-- >0;)o[t]=n[t];return o},dme=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&yp(Uint8Array)),pme=(n,t)=>{let a=(n&&n[vu]).call(n),e;for(;(e=a.next())&&!e.done;){let i=e.value;t.call(n,i[0],i[1])}},hme=(n,t)=>{let o,a=[];for(;(o=n.exec(t))!==null;)a.push(o);return a},Eme=jo("HTMLFormElement"),ume=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,a,e){return a.toUpperCase()+e}),{propertyIsEnumerable:Cme}=Object.prototype,Bme=jo("RegExp"),$j=(n,t)=>{let o=Object.getOwnPropertyDescriptors(n),a={};Pu(o,(e,i)=>{let A;(A=t(e,i,n))!==!1&&(a[i]=A||e)}),Object.defineProperties(n,a)},fme=n=>{$j(n,(t,o)=>{if(Ya(n)&&["arguments","caller","callee"].includes(o))return!1;let a=n[o];if(Ya(a)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},Qme=(n,t)=>{let o={},a=e=>{e.forEach(i=>{o[i]=!0})};return gl(n)?a(n):a(String(n).split(t)),o},yme=()=>{},mme=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function Sme(n){return!!(n&&Ya(n.append)&&n[zj]==="FormData"&&n[vu])}var wme=n=>{let t=new WeakSet,o=a=>{if(Sp(a)){if(t.has(a))return;if(mp(a))return a;if(!("toJSON"in a)){t.add(a);let e;if(Zye(a)){e=[];for(let i of a){let A=o(i);!cl(A)&&e.push(A)}}else e=gl(a)?[]:{},Pu(a,(i,A)=>{let r=o(i);!cl(r)&&(e[A]=r)});return t.delete(a),e}}return a};return o(n)},Dme=jo("AsyncFunction"),Ome=n=>n&&(Sp(n)||Ya(n))&&Ya(n.then)&&Ya(n.catch),eJ=((n,t)=>n?setImmediate:t?((o,a)=>(sl.addEventListener("message",({source:e,data:i})=>{e===sl&&i===o&&a.length&&a.shift()()},!1),e=>{a.push(e),sl.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",Ya(sl.postMessage)),bme=typeof queueMicrotask<"u"?queueMicrotask.bind(sl):typeof process<"u"&&process.nextTick||eJ,AJ=n=>n!=null&&Ya(n[vu]),Mme=n=>n!=null&&ku(n,vu)&&AJ(n),Z={isArray:gl,isArrayBuffer:Vj,isBuffer:mp,isFormData:eme,isArrayBufferView:Hye,isString:Kye,isNumber:Wj,isBoolean:xye,isObject:Sp,isPlainObject:qy,isEmptyObject:Yye,isReadableStream:tme,isRequest:rme,isResponse:ime,isHeaders:ame,isUndefined:cl,isDate:jye,isFile:Jye,isReactNativeBlob:qye,isReactNative:zye,isBlob:Vye,isRegExp:Bme,isFunction:Ya,isStream:Xye,isURLSearchParams:Ame,isTypedArray:dme,isFileList:Wye,forEach:Pu,merge:c0,extend:nme,trim:ome,stripBOM:sme,inherits:gme,toFlatObject:cme,kindOf:I0,kindOfTest:jo,endsWith:Ime,toArray:lme,forEachEntry:pme,matchAll:hme,isHTMLForm:Eme,hasOwnProperty:zy,hasOwnProp:zy,hasOwnInPrototypeChain:ku,getSafeProp:Uye,reduceDescriptors:$j,freezeMethods:fme,toObjectSet:Qme,toCamelCase:ume,noop:yme,toFiniteNumber:mme,findKey:Zj,global:sl,isContextDefined:Xj,isSpecCompliantForm:Sme,toJSONObject:wme,isAsyncFn:Dme,isThenable:Ome,setImmediate:eJ,asap:bme,isIterable:AJ,isSafeIterable:Mme};var _me=Z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),tJ=n=>{let t={},o,a,e;return n&&n.split(` -`).forEach(function(A){e=A.indexOf(":"),o=A.substring(0,e).trim().toLowerCase(),a=A.substring(e+1).trim();let r=Z.hasOwnProp(t,o);!o||r&&Z.hasOwnProp(_me,o)||(o==="set-cookie"?r?t[o].push(a):t[o]=[a]:t[o]=r?t[o]+", "+a:a)}),t};function Tme(n){let t=0,o=n.length;for(;tt;){let a=n.charCodeAt(o-1);if(a!==9&&a!==32)break;o-=1}return t===0&&o===n.length?n:n.slice(t,o)}var Nme=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Rme=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function l0(n,t){return Z.isArray(n)?n.map(o=>l0(o,t)):Tme(String(n).replace(t,""))}var rJ=n=>l0(n,Nme),kme=n=>l0(n,Rme);function wp(n){let t=Object.create(null);return Z.forEach(n.toJSON(),(o,a)=>{t[a]=kme(o)}),t}var iJ=Symbol("internals");function Gu(n){return n&&String(n).trim().toLowerCase()}function Wy(n){return n===!1||n==null?n:Z.isArray(n)?n.map(Wy):rJ(String(n))}function vme(n){let t=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,a;for(;a=o.exec(n);)t[a[1]]=a[2];return t}var Pme=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function d0(n){let t=0,o=n.length;for(;tt;){let a=n.charCodeAt(o-1);if(a!==9&&a!==32)break;o-=1}return t===0&&o===n.length?n:n.slice(t,o)}function Gme(n){let t=n.length-1;if(t<1||n.charCodeAt(0)!==34||n.charCodeAt(t)!==34)return n;let o="";for(let a=1;a=t))return n;o+=n[a]}return o}function Fme(n){let t=Object.create(null),o=String(n),a=0,e=!1,i=!1;function A(r){let s=d0(o.slice(a,r)),g=s.indexOf("=");if(g<1)return;let c=d0(s.slice(0,g));if(!Pme.test(c))return;let I=c.toLowerCase();if(I==="__proto__"||I==="constructor"||I==="prototype")return;let d=d0(s.slice(g+1));t[I]=Gme(d)}for(let r=0;r/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function p0(n,t,o,a,e){if(Z.isFunction(a))return a.call(this,t,o);if(e&&(t=o),!!Z.isString(t)){if(Z.isString(a))return t.indexOf(a)!==-1;if(Z.isRegExp(a))return a.test(t)}}function Ume(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,o,a)=>o.toUpperCase()+a)}function Hme(n,t){let o=Z.toCamelCase(" "+t);["get","set","has"].forEach(a=>{Object.defineProperty(n,a+o,{__proto__:null,value:function(e,i,A){return this[a].call(this,t,e,i,A)},configurable:!0})})}var Dp=class{constructor(t){t&&this.set(t)}set(t,o,a){let e=this;function i(r,s,g){let c=Gu(s);if(!c)return;let I=Z.findKey(e,c);(!I||e[I]===void 0||g===!0||g===void 0&&e[I]!==!1)&&(e[I||s]=Wy(r))}let A=(r,s)=>Z.forEach(r,(g,c)=>i(g,c,s));if(Z.isPlainObject(t)||t instanceof this.constructor)A(t,o);else if(Z.isString(t)&&(t=t.trim())&&!Lme(t))A(tJ(t),o);else if(Z.isObject(t)&&Z.isSafeIterable(t)){let r=Object.create(null),s,g;for(let c of t){if(!Z.isArray(c))throw new TypeError("Object iterator must return a key-value pair");g=c[0],Z.hasOwnProp(r,g)?(s=r[g],r[g]=Z.isArray(s)?[...s,c[1]]:[s,c[1]]):r[g]=c[1]}A(r,o)}else t!=null&&i(o,t,a);return this}get(t,o){if(t=Gu(t),t){let a=Z.findKey(this,t);if(a){let e=this[a];if(!o)return e;if(o===!0)return vme(e);if(Z.isFunction(o))return o.call(this,e,a);if(Z.isRegExp(o))return o.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,o){if(t=Gu(t),t){let a=Z.findKey(this,t);return!!(a&&this[a]!==void 0&&(!o||p0(this,this[a],a,o)))}return!1}delete(t,o){let a=this,e=!1;function i(A){if(A=Gu(A),A){let r=Z.findKey(a,A);r&&(!o||p0(a,a[r],r,o))&&(delete a[r],e=!0)}}return Z.isArray(t)?t.forEach(i):i(t),e}clear(t){let o=Object.keys(this),a=o.length,e=!1;for(;a--;){let i=o[a];(!t||p0(this,this[i],i,t,!0))&&(delete this[i],e=!0)}return e}normalize(t){let o=this,a={};return Z.forEach(this,(e,i)=>{let A=Z.findKey(a,i);if(A){o[A]=Wy(e),delete o[i];return}let r=t?Ume(i):String(i).trim();r!==i&&delete o[i],o[r]=Wy(e),a[r]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let o=Object.create(null);return Z.forEach(this,(a,e)=>{a!=null&&a!==!1&&(o[e]=t&&Z.isArray(a)?a.join(", "):a)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,o])=>t+": "+o).join(` -`)}getSetCookie(){let t=this.get("set-cookie");return Z.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return Fme(t)}static concat(t,...o){let a=new this(t);return o.forEach(e=>a.set(e)),a}static accessor(t){let a=(this[iJ]=this[iJ]={accessors:{}}).accessors,e=this.prototype;function i(A){let r=Gu(A);a[r]||(Hme(e,A),a[r]=!0)}return Z.isArray(t)?t.forEach(i):i(t),this}};Dp.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Z.reduceDescriptors(Dp.prototype,({value:n},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(a){this[o]=a}}});Z.freezeMethods(Dp);var jt=Dp;var Fu="[REDACTED ****]";function Kme(n){if(Z.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(Z.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function xme(n,t){let o=new Set(t.map(i=>String(i).toLowerCase())),a=[],e=i=>{if(i===null||typeof i!="object"||Z.isBuffer(i))return i;if(a.indexOf(i)!==-1)return;i instanceof jt&&(i=i.toJSON()),a.push(i);let A;if(Z.isArray(i))A=[],i.forEach((r,s)=>{let g=e(r);Z.isUndefined(g)||(A[s]=g)});else{if(!Z.isPlainObject(i)&&Kme(i))return a.pop(),i;A=Object.create(null);for(let[r,s]of Object.entries(i)){let g=o.has(r.toLowerCase())?Fu:e(s);Z.isUndefined(g)||(A[r]=g)}}return a.pop(),A};return e(n)}function aJ(n){try{return String(n)}catch{return""}}function Yme(n){return n.errors.map(o=>{try{return o&&o.message?aJ(o.message):aJ(o)}catch{return""}}).filter(Boolean).join("; ")||n.name||"AggregateError"}var Ni=class n extends Error{static from(t,o,a,e,i,A){let r=t.message;!r&&Z.isArray(t.errors)&&t.errors.length&&(r=Yme(t));let s=new n(r,o||t.code,a,e,i);return Object.defineProperty(s,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),A&&Object.assign(s,A),s}constructor(t,o,a,e,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,o&&(this.code=o),a&&(this.config=a),e&&(this.request=e),i&&(this.response=i,this.status=i.status)}toJSON(){let t=this.config,o=t&&Z.hasOwnProp(t,"redact")?t.redact:void 0,a=Z.isArray(o)&&o.length>0?xme(t,o):Z.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a,code:this.code,status:this.status}}};Ni.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Ni.ERR_BAD_OPTION="ERR_BAD_OPTION";Ni.ECONNABORTED="ECONNABORTED";Ni.ETIMEDOUT="ETIMEDOUT";Ni.ECONNREFUSED="ECONNREFUSED";Ni.ERR_NETWORK="ERR_NETWORK";Ni.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Ni.ERR_DEPRECATED="ERR_DEPRECATED";Ni.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Ni.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Ni.ERR_CANCELED="ERR_CANCELED";Ni.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Ni.ERR_INVALID_URL="ERR_INVALID_URL";Ni.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var Oe=Ni;var n4=ze(o4(),1),om=n4.default;var nm={isBufferAvailable(){return typeof Buffer<"u"},from(n){return Buffer.from(n)}};var F0=100;function G0(n){return Z.isPlainObject(n)||Z.isArray(n)}function s4(n){return Z.endsWith(n,"[]")?n.slice(0,-2):n}function P0(n,t,o){return n?n.concat(t).map(function(e,i){return e=s4(e),!o&&i?"["+e+"]":e}).join(o?".":""):t}function Mwe(n){return Z.isArray(n)&&!n.some(G0)}var _we=Z.toFlatObject(Z,{},null,function(t){return/^is[A-Z]/.test(t)});function Twe(n,t,o){if(!Z.isObject(n))throw new TypeError("target must be an object");t=t||new(om||FormData),o=Z.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,T){return!Z.isUndefined(T[_])});let a=o.metaTokens,e=o.visitor||f,i=o.dots,A=o.indexes,r=o.Blob||typeof Blob<"u"&&Blob,s=o.maxDepth===void 0?F0:o.maxDepth,g=r&&Z.isSpecCompliantForm(t),c=[];if(!Z.isFunction(e))throw new TypeError("visitor must be a function");function I(m){if(m===null)return"";if(Z.isDate(m))return m.toISOString();if(Z.isBoolean(m))return m.toString();if(!g&&Z.isBlob(m))throw new Oe("Blob is not supported. Use a Buffer instead.");if(Z.isArrayBuffer(m)||Z.isTypedArray(m)){if(g&&typeof r=="function")return new r([m]);if(nm&&nm.isBufferAvailable())return nm.from(m);throw new Oe("Blob is not supported. Use a Buffer instead.",Oe.ERR_NOT_SUPPORT)}return m}function d(m){if(m>s)throw new Oe("Object is too deeply nested ("+m+" levels). Max depth: "+s,Oe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function B(m,_){if(s===1/0)return JSON.stringify(m);let T=[];return JSON.stringify(m,function(L,U){if(!Z.isObject(U))return U;for(;T.length&&T[T.length-1]!==this;)T.pop();return T.push(U),d(_+T.length-1),U})}function f(m,_,T){let R=m;if(Z.isReactNative(t)&&Z.isReactNativeBlob(m))return t.append(P0(T,_,i),I(m)),!1;if(m&&!T&&typeof m=="object"){if(Z.endsWith(_,"{}"))_=a?_:_.slice(0,-2),m=B(m,1);else if(Z.isArray(m)&&Mwe(m)||(Z.isFileList(m)||Z.endsWith(_,"[]"))&&(R=Z.toArray(m)))return _=s4(_),R.forEach(function(U,F){!(Z.isUndefined(U)||U===null)&&t.append(A===!0?P0([_],F,i):A===null?_:_+"[]",I(U))}),!1}return G0(m)?!0:(t.append(P0(T,_,i),I(m)),!1)}let Q=Object.assign(_we,{defaultVisitor:f,convertValue:I,isVisitable:G0});function y(m,_,T=0){if(!Z.isUndefined(m)){if(d(T),c.indexOf(m)!==-1)throw new Error("Circular reference detected in "+_.join("."));c.push(m),Z.forEach(m,function(L,U){(!(Z.isUndefined(L)||L===null)&&e.call(t,L,Z.isString(U)?U.trim():U,_,Q))===!0&&y(L,_?_.concat(U):[U],T+1)}),c.pop()}}if(!Z.isObject(n))throw new TypeError("data must be an object");return y(n),t}var Pc=Twe;function g4(n){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(a){return t[a]})}function c4(n,t){this._pairs=[],n&&Pc(n,this,t)}var I4=c4.prototype;I4.append=function(t,o){this._pairs.push([t,o])};I4.toString=function(t){let o=t?a=>t.call(this,a,g4):g4;return this._pairs.map(function(e){return o(e[0])+"="+o(e[1])},"").join("&")};var l4=c4;function Nwe(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ll(n,t,o){if(!t)return n;n=n||"";let a=Z.isFunction(o)?{serialize:o}:o,e=Z.getSafeProp(a,"encode")||Nwe,i=Z.getSafeProp(a,"serialize"),A;if(i?A=i(t,a):A=Z.isURLSearchParams(t)?t.toString():new l4(t,a).toString(e),A){let r=n.indexOf("#");r!==-1&&(n=n.slice(0,r)),n+=(n.indexOf("?")===-1?"?":"&")+A}return n}var L0=class{constructor(){this.handlers=[]}use(t,o,a){return this.handlers.push({fulfilled:t,rejected:o,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Z.forEach(this.handlers,function(a){a!==null&&t(a)})}},U0=L0;var Gc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0};import kwe from"crypto";import Rwe from"url";var d4=Rwe.URLSearchParams;var H0="abcdefghijklmnopqrstuvwxyz",p4="0123456789",h4={DIGIT:p4,ALPHA:H0,ALPHA_DIGIT:H0+H0.toUpperCase()+p4},vwe=(n=16,t=h4.ALPHA_DIGIT)=>{let o="",{length:a}=t,e=new Uint32Array(n);kwe.randomFillSync(e);for(let i=0;ix0,hasStandardBrowserEnv:()=>Pwe,hasStandardBrowserWebWorkerEnv:()=>Gwe,navigator:()=>K0,origin:()=>Fwe});var x0=typeof window<"u"&&typeof document<"u",K0=typeof navigator=="object"&&navigator||void 0,Pwe=x0&&(!K0||["ReactNative","NativeScript","NS"].indexOf(K0.product)<0),Gwe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Fwe=x0&&window.location.href||"http://localhost";var yt={...Y0,...E4};function j0(n,t){return Pc(n,new yt.classes.URLSearchParams,{visitor:function(o,a,e,i){return yt.isNode&&Z.isBuffer(o)?(this.append(a,o.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}var u4=F0;function C4(n){if(n>u4)throw new Oe("FormData field is too deeply nested ("+n+" levels). Max depth: "+u4,Oe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Lwe(n){let t=[],o=/[^.[\]]+|\[([^.[\]]*)]/g,a;for(;(a=o.exec(n))!==null;)C4(t.length),t.push(a[0]==="[]"?"":a[1]||a[0]);return t}function Uwe(n){let t={},o=Object.keys(n),a,e=o.length,i;for(a=0;a=o.length;return A=!A&&Z.isArray(e)?e.length:A,s?(Z.hasOwnProp(e,A)?e[A]=Z.isArray(e[A])?e[A].concat(a):[e[A],a]:e[A]=a,!r):((!Z.hasOwnProp(e,A)||!Z.isObject(e[A]))&&(e[A]=[]),t(o,a,e[A],i)&&Z.isArray(e[A])&&(e[A]=Uwe(e[A])),!r)}if(Z.isFormData(n)&&Z.isFunction(n.entries)){let o={};return Z.forEachEntry(n,(a,e)=>{t(Lwe(a),e,o,0)}),o}return null}var sm=Hwe;var Tp=(n,t)=>n!=null&&Z.hasOwnProp(n,t)?n[t]:void 0;function Kwe(n,t,o){if(Z.isString(n))try{return(t||JSON.parse)(n),Z.trim(n)}catch(a){if(a.name!=="SyntaxError")throw a}return(o||JSON.stringify)(n)}var J0={transitional:Gc,adapter:["xhr","http","fetch"],transformRequest:[function(t,o){let a=o.getContentType()||"",e=a.indexOf("application/json")>-1,i=Z.isObject(t);if(i&&Z.isHTMLForm(t)&&(t=new FormData(t)),Z.isFormData(t))return e?JSON.stringify(sm(t)):t;if(Z.isArrayBuffer(t)||Z.isBuffer(t)||Z.isStream(t)||Z.isFile(t)||Z.isBlob(t)||Z.isReadableStream(t))return t;if(Z.isArrayBufferView(t))return t.buffer;if(Z.isURLSearchParams(t))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let r;if(i){let s=Tp(this,"formSerializer");if(a.indexOf("application/x-www-form-urlencoded")>-1)return j0(t,s).toString();if((r=Z.isFileList(t))||a.indexOf("multipart/form-data")>-1){let g=Tp(this,"env"),c=g&&g.FormData;return Pc(r?{"files[]":t}:t,c&&new c,s)}}return i||e?(o.setContentType("application/json",!1),Kwe(t)):t}],transformResponse:[function(t){let o=Tp(this,"transitional")||J0.transitional,a=o&&o.forcedJSONParsing,e=Tp(this,"responseType"),i=e==="json";if(Z.isResponse(t)||Z.isReadableStream(t))return t;if(t&&Z.isString(t)&&(a&&!e||i)){let r=!(o&&o.silentJSONParsing)&&i;try{return JSON.parse(t,Tp(this,"parseReviver"))}catch(s){if(r)throw s.name==="SyntaxError"?Oe.from(s,Oe.ERR_BAD_RESPONSE,this,null,Tp(this,"response")):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yt.classes.FormData,Blob:yt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Z.forEach(["delete","get","head","post","put","patch","query"],n=>{J0.headers[n]={}});var Np=J0;function Yu(n,t){let o=this||Np,a=t||o,e=jt.from(a.headers),i=a.data;return Z.forEach(n,function(r){i=r.call(o,i,e.normalize(),t?t.status:void 0)}),e.normalize(),i}function ju(n){return!!(n&&n.__CANCEL__)}var q0=class extends Oe{constructor(t,o,a){super(t??"canceled",Oe.ERR_CANCELED,o,a),this.name="CanceledError",this.__CANCEL__=!0}},ho=q0;function ws(n,t,o){let a=o.config.validateStatus;!o.status||!a||a(o.status)?n(o):t(new Oe("Request failed with status code "+o.status,o.status>=400&&o.status<500?Oe.ERR_BAD_REQUEST:Oe.ERR_BAD_RESPONSE,o.config,o.request,o))}function z0(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function V0(n,t){if(!t)return n;let o=n.length;for(;o>0&&n.charCodeAt(o-1)===47;)o--;return n.slice(0,o)+"/"+t.replace(/^\/+/,"")}var xwe=/^https?:(?!\/\/)/i,Ywe=/[\t\n\r]/g;function jwe(n){let t=0;for(;t`${o}${a}${Fu}`)}function zwe(n){let t=n.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Fu}@`),o=t.indexOf("#"),e=(o===-1?t:t.slice(0,o)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Fu}`);return o===-1?e:`${e}#${qwe(t.slice(o+1))}`}function B4(n,t){if(typeof n=="string"){let o=Jwe(n);if(xwe.test(o))throw new Oe(`Invalid URL ${JSON.stringify(zwe(o))}: missing "//" after protocol`,Oe.ERR_INVALID_URL,t)}}function dl(n,t,o,a){B4(t,a);let e=!z0(t);return n&&(e||o===!1)?(B4(n,a),V0(n,t)):t}var Vwe={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function Wwe(n){try{return new URL(n)}catch{return null}}function f4(n){var t=(typeof n=="string"?Wwe(n):n)||{},o=t.protocol,a=t.host,e=t.port;if(typeof a!="string"||!a||typeof o!="string"||(o=o.split(":",1)[0],a=a.replace(/:\d*$/,""),e=parseInt(e)||Vwe[o]||0,!Zwe(a,e)))return"";var i=W0(o+"_proxy")||W0("all_proxy");return i&&i.indexOf("://")===-1&&(i=o+"://"+i),i}function Zwe(n,t){var o=W0("no_proxy").toLowerCase();return o?o==="*"?!1:o.split(/[,\s]/).every(function(a){if(!a)return!0;var e=a.match(/^(.+):(\d+)$/),i=e?e[1]:a,A=e?parseInt(e[2]):0;return A&&A!==t?!0:/^[.*]/.test(i)?(i.charAt(0)==="*"&&(i=i.slice(1)),!n.endsWith(i)):n!==i}):!0}function W0(n){return process.env[n.toLowerCase()]||process.env[n.toUpperCase()]||""}var _N=ze(oN(),1),u8=ze(K4(),1);import h8 from"http";import E8 from"https";import DOe from"http2";import OOe from"util";import{resolve as a8}from"path";import Jo from"zlib";var Mg="1.19.0";function eC(n){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}var ZDe=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function BN(n,t,o){let a=o&&o.Blob||yt.classes.Blob,e=eC(n);if(t===void 0&&a&&(t=!0),e==="data"){n=e.length?n.slice(e.length+1):n;let i=ZDe.exec(n);if(!i)throw new Oe("Invalid URL",Oe.ERR_INVALID_URL);let A=i[1],r=i[2],s=i[3]?"base64":"utf8",g=i[4],c="";A?c=r?A+r:A:r&&(c="text/plain"+r);let I=s==="base64"?Buffer.from(g,"base64"):Buffer.from(decodeURIComponent(g),s);if(t){if(!a)throw new Oe("Blob is not supported",Oe.ERR_NOT_SUPPORT);return new a([I],{type:c})}return I}throw new Oe("Unsupported protocol "+e,Oe.ERR_NOT_SUPPORT)}import Rn from"stream";var XDe=["content-type","content-length"];function AC(n,t,o){if(o!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([a,e])=>{XDe.includes(a.toLowerCase())&&n.set(a,e)})}import $De from"stream";var fN=Symbol("internals"),QN=class extends $De.Transform{constructor(t){t=Z.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(a,e)=>!Z.isUndefined(e[a])),super({readableHighWaterMark:t.chunkSize});let o=this[fN]={timeWindow:t.timeWindow,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",a=>{a==="progress"&&(o.isCaptured||(o.isCaptured=!0))})}_read(t){let o=this[fN];return o.onReadCallback&&o.onReadCallback(),super._read(t)}_transform(t,o,a){let e=this[fN],i=e.maxRate,A=this.readableHighWaterMark,r=e.timeWindow,s=1e3/r,g=i/s,c=e.minChunkSize!==!1?Math.max(e.minChunkSize,g*.01):0,I=(B,f)=>{let Q=Buffer.byteLength(B);e.bytesSeen+=Q,e.bytes+=Q,e.isCaptured&&this.emit("progress",e.bytesSeen),this.push(B)?process.nextTick(f):e.onReadCallback=()=>{e.onReadCallback=null,process.nextTick(f)}},d=(B,f)=>{let Q=Buffer.byteLength(B),y=null,m=A,_,T=0;if(i){let R=Date.now();(!e.ts||(T=R-e.ts)>=r)&&(e.ts=R,_=g-e.bytes,e.bytes=_<0?-_:0,T=0),_=g-e.bytes}if(i){if(_<=0)return setTimeout(()=>{f(null,B)},r-T);_m&&Q-m>c&&(y=B.subarray(m),B=B.subarray(0,m)),I(B,y?()=>{process.nextTick(f,null,y)}:f)};d(t,function B(f,Q){if(f)return a(f);Q?d(Q,B):a(null)})}},yN=QN;import{EventEmitter as bOe}from"events";import AOe from"util";import{Readable as tOe}from"stream";var{asyncIterator:x4}=Symbol,eOe=async function*(n){n.stream?yield*n.stream():n.arrayBuffer?yield await n.arrayBuffer():n[x4]?yield*n[x4]():yield n},pm=eOe;var rOe=yt.ALPHABET.ALPHA_DIGIT+"-_",tC=typeof TextEncoder=="function"?new TextEncoder:new AOe.TextEncoder,Cl=`\r -`,iOe=tC.encode(Cl),aOe=2,mN=class{constructor(t,o){let{escapeName:a}=this.constructor,e=Z.isString(o),i=`Content-Disposition: form-data; name="${a(t)}"${!e&&o.name?`; filename="${a(o.name)}"`:""}${Cl}`;if(e)o=tC.encode(String(o).replace(/\r?\n|\r\n?/g,Cl));else{let A=String(o.type||"application/octet-stream").replace(/[\r\n]/g,"");i+=`Content-Type: ${A}${Cl}`}this.headers=tC.encode(i+Cl),this.contentLength=e?o.byteLength:o.size,this.size=this.headers.byteLength+this.contentLength+aOe,this.name=t,this.value=o}async*encode(){yield this.headers;let{value:t}=this;Z.isTypedArray(t)?yield t:yield*pm(t),yield iOe}static escapeName(t){return String(t).replace(/[\r\n"]/g,o=>({"\r":"%0D","\n":"%0A",'"':"%22"})[o])}},oOe=(n,t,o)=>{let{tag:a="form-data-boundary",size:e=25,boundary:i=a+"-"+yt.generateString(e,rOe)}=o||{};if(!Z.isFormData(n))throw new TypeError("FormData instance required");if(i.length<1||i.length>70)throw new Error("boundary must be 1-70 characters long");let A=tC.encode("--"+i+Cl),r=tC.encode("--"+i+"--"+Cl),s=r.byteLength,g=Array.from(n.entries()).map(([I,d])=>{let B=new mN(I,d);return s+=B.size,B});s+=A.byteLength*g.length,s=Z.toFiniteNumber(s);let c={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(s)&&(c["Content-Length"]=s),t&&t(c),tOe.from((async function*(){for(let I of g)yield A,yield*I.encode();yield r})())},Y4=oOe;import nOe from"stream";var SN=class extends nOe.Transform{__transform(t,o,a){this.push(t),a()}_transform(t,o,a){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let e=Buffer.alloc(2);e[0]=120,e[1]=156,this.push(e,o)}this.__transform(t,o,a)}},j4=SN;import sOe from"http2";import gOe from"util";var wN=class{constructor(){this.sessions=Object.create(null)}getSession(t,o){o=Object.assign({sessionTimeout:1e3},o);let a=this.sessions[t];if(a){let I=a.length;for(let d=0;d{if(i)return;i=!0,A&&(clearTimeout(A),A=null);let I=a,d=I.length,B=d;for(;B--;)if(I[B][0]===e){d===1?delete this.sessions[t]:I.splice(B,1),e.closed||e.close();return}},s=e.request,{sessionTimeout:g}=o;if(g!=null){let I=0;e.request=function(){let d=s.apply(this,arguments);return I++,A&&(clearTimeout(A),A=null),d.once("close",()=>{--I||(A=setTimeout(()=>{A=null,r()},g))}),d}}e.once("close",r);let c=[e,o];return a?a.push(c):a=this.sessions[t]=[c],e}},J4=wN;var cOe=(n,t)=>Z.isAsyncFn(n)?function(...o){let a=o.pop();n.apply(this,o).then(e=>{try{t?a(null,...t(e)):a(null,e)}catch(i){a(i)}},a)}:n,q4=cOe;var IOe=new Set(["localhost","0.0.0.0"]),W4=n=>{let t=n.split(".");return t.length!==4||t[0]!=="127"?!1:t.every(o=>/^\d+$/.test(o)&&Number(o)>=0&&Number(o)<=255)},DN=n=>{if(/^0[xX][0-9a-fA-F]+$/.test(n)){let t=parseInt(n.slice(2),16);return Number.isFinite(t)?t:null}if(n.length>1&&/^0[0-7]+$/.test(n)){let t=parseInt(n,8);return Number.isFinite(t)?t:null}if(n.length>1&&/^0[0-9]+$/.test(n))return null;if(/^[0-9]+$/.test(n)){let t=parseInt(n,10);return Number.isFinite(t)?t:null}return null},lOe=n=>{if(typeof n!="string"||!n||n.indexOf(":")!==-1)return n;let t=n;if(t.charAt(0)==="["&&t.charAt(t.length-1)==="]"&&(t=t.slice(1,-1)),t=t.replace(/\.+$/,""),!/^[0-9.xXa-fA-F]+$/.test(t))return n;let o=t.split(".");if(o.some(c=>c===""))return n;if(o.length===4){let c=o.map(DN);return c.some(I=>I===null||I<0||I>255)?n:c.join(".")}if(o.length>4||o.length===1)return n;let a=o.slice(0,-1),e=o[o.length-1],i=4-a.length,A=DN(e);if(A===null)return n;let r=(1<<8*i)-1;if(A<0||A>r)return n;let s=new Array(i).fill(0);for(let c=i-1,I=A;c>=0;c--,I>>=8)s[c]=I&255;let g=a.map(DN);return g.some(c=>c===null||c<0||c>255)?n:[...g,...s].join(".")},ON=n=>/^0{1,4}$/.test(n),dOe=n=>{if(n==="::")return!0;let t=n.indexOf("::");if(t!==-1){if(t!==n.lastIndexOf("::"))return!1;let a=n.slice(0,t),e=n.slice(t+2),i=a?a.split(":"):[],A=e?e.split(":"):[];return i.length+A.length<8&&i.every(ON)&&A.every(ON)}let o=n.split(":");return o.length===8&&o.every(ON)},pOe=n=>{if(n==="::1")return!0;let t=n.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(t)return W4(t[1]);let o=n.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(o){let e=parseInt(o[1],16);return e>=32512&&e<=32767}let a=n.split(":");if(a.length===8){for(let e=0;e<7;e++)if(!/^0+$/.test(a[e]))return!1;return/^0*1$/.test(a[7])}return!1},z4=n=>n?IOe.has(n)||W4(n)||dOe(n)?!0:pOe(n):!1,hOe={http:80,https:443,ws:80,wss:443,ftp:21},EOe=n=>{let t=n,o=0;if(t.charAt(0)==="["){let i=t.indexOf("]");if(i!==-1){let A=t.slice(1,i),r=t.slice(i+1);return r.charAt(0)===":"&&/^\d+$/.test(r.slice(1))&&(o=Number.parseInt(r.slice(1),10)),[A,o]}}let a=t.indexOf(":"),e=t.lastIndexOf(":");return a!==-1&&a===e&&/^\d+$/.test(t.slice(e+1))&&(o=Number.parseInt(t.slice(e+1),10),t=t.slice(0,e)),[t,o]},uOe=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,COe=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,BOe=n=>{if(typeof n!="string"||n.indexOf(":")===-1)return n;let t=n.match(uOe);if(t)return t[1];let o=n.match(COe);if(o){let a=parseInt(o[1],16),e=parseInt(o[2],16);return`${a>>8}.${a&255}.${e>>8}.${e&255}`}return n},V4=n=>{if(!n)return n;n.charAt(0)==="["&&n.charAt(n.length-1)==="]"&&(n=n.slice(1,-1));let t=n.replace(/\.+$/,""),o=lOe(t);return o!==t?o:BOe(t)};function bN(n){let t;try{t=new URL(n)}catch{return!1}let o=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!o)return!1;if(o==="*")return!0;let a=Number.parseInt(t.port,10)||hOe[t.protocol.split(":",1)[0]]||0,e=V4(t.hostname.toLowerCase());return o.split(/[\s,]+/).some(i=>{if(!i)return!1;if(i==="*")return!0;let[A,r]=EOe(i);return A=V4(A),!A||r&&r!==a?!1:(A.charAt(0)==="*"&&(A=A.slice(1)),A.charAt(0)==="."?e.endsWith(A):e===A||z4(e)&&z4(A))})}function fOe(n,t){n=n||10;let o=new Array(n),a=new Array(n),e=0,i=0,A;return t=t!==void 0?t:1e3,function(s){let g=Date.now(),c=a[i];A||(A=g),o[e]=s,a[e]=g;let I=i,d=0;for(;I!==e;)d+=o[I++],I=I%n;if(e=(e+1)%n,e===i&&(i=(i+1)%n),g-A{o=c,e=null,i&&(clearTimeout(i),i=null),n(...g)};return[(...g)=>{let c=Date.now(),I=c-o;I>=a?A(g,c):(e=g,i||(i=setTimeout(()=>{i=null,A(e)},a-I)))},()=>e&&A(e)]}var X4=QOe;var _g=(n,t,o=3)=>{let a=0,e=Z4(50,250);return X4(i=>{if(!i||typeof i.loaded!="number")return;let A=i.loaded,r=i.lengthComputable?i.total:void 0,s=Math.max(0,r!=null?Math.min(A,r):A),g=Math.max(0,s-a),c=e(g);a=Math.max(a,s);let I={loaded:s,total:r,progress:r?s/r:void 0,bytes:g,rate:c||void 0,estimated:c&&r?(r-s)/c:void 0,event:i,lengthComputable:r!=null,[t?"download":"upload"]:!0};n(I)},o)},Gp=(n,t)=>{let o=n!=null;return[a=>t[0]({lengthComputable:o,total:n,loaded:a}),t[1]]},Fp=(n,t=Z.asap)=>(...o)=>t(()=>n(...o));var $4=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,A8=(n,t,o)=>t+2n<=57?n-48:(n&223)-55,yOe=n=>n>=65&&n<=90||n>=97&&n<=122||n>=48&&n<=57||n===43||n===47||n===45||n===95,mOe=n=>n===9||n===10||n===12||n===13||n===32,SOe=n=>{let t=Math.floor(n/4),o=n%4;return t*3+(o===2?1:o===3?2:0)},t8=n=>{let t=n.length,o=0;return t>0&&n.charCodeAt(t-1)===61&&(o++,t>1&&n.charCodeAt(t-2)===61&&o++),Math.floor((t-o)*3/4)},wOe=n=>{let t=n.length,o=0,a=0,e=!1;for(let i=0;i0){e=!0;continue}o++}}return e||a>2||a>0&&(o+a)%4!==0||o%4===1?t8(n):SOe(o)},r8=(n,t)=>{if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;let o=n.indexOf(",");if(o<0)return 0;let a=n.slice(5,o),e=n.slice(o+1);if(/;base64/i.test(a))return t(e);let A=0;for(let r=0,s=e.length;r=55296&&g<=56319&&r+1=56320&&c<=57343?(A+=4,r++):A+=3}else A+=3}return A};function MN(n){let t=typeof n=="string"?n.indexOf("#"):-1;return r8(t===-1?n:n.slice(0,t),wOe)}function i8(n){return r8(n,t8)}var o8={flush:Jo.constants.Z_SYNC_FLUSH,finishFlush:Jo.constants.Z_SYNC_FLUSH},MOe={flush:Jo.constants.BROTLI_OPERATION_FLUSH,finishFlush:Jo.constants.BROTLI_OPERATION_FLUSH},_Oe={flush:Jo.constants.ZSTD_e_flush,finishFlush:Jo.constants.ZSTD_e_flush},C8=Z.isFunction(Jo.createBrotliDecompress),B8=Z.isFunction(Jo.createZstdDecompress),f8="gzip, compress, deflate"+(C8?", br":""),TOe=f8+(B8?", zstd":""),n8=typeof process<"u"&&process.nextTick?process.nextTick.bind(process):Z.asap,{http:NOe,https:ROe}=u8.default,TN=/https:?/,s8=Symbol("axios.http.socketListener"),hm=Symbol("axios.http.currentReq"),Q8=Symbol("axios.http.installedTunnel"),kOe=new Map,g8=new WeakMap,c8={22:21,24:5};function vOe(n=process.versions&&process.versions.node){if(!n)return!1;let[t,o]=n.split(".").map(a=>Number(a));return!Number.isInteger(t)||!Number.isInteger(o)?!1:t>24?!0:c8[t]!=null&&o>=c8[t]}function POe(n,t=process.versions&&process.versions.node){if(!vOe(t))return!1;let o=n&&n.options;return!!(o&&Z.hasOwnProp(o,"proxyEnv")&&o.proxyEnv!=null)}function GOe(n,t,o){return TN.test(n.protocol)?o||E8.globalAgent:t||h8.globalAgent}function FOe(n,t){let o=n.protocol+"//"+n.hostname+":"+(n.port||"")+"#"+(n.auth||""),a=t?g8.get(t)||g8.set(t,new Map).get(t):kOe,e=a.get(o);if(e)return e;let i=t&&t.options?{...t.options,...n}:n;if(e=new _N.default(i),t&&t.options){let A={...t.options},r=e.callback;e.callback=function(g,c){return r.call(this,g,{...A,...c})}}return e[Q8]=!0,a.set(o,e),e}var I8=yt.protocols.map(n=>n+":"),l8=n=>{if(!Z.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},d8=(n,[t,o])=>(n.on("end",o).on("error",o),t),LOe=new J4;function UOe(n,t,o){n.beforeRedirects.proxy&&n.beforeRedirects.proxy(n),n.beforeRedirects.auth&&n.beforeRedirects.auth(n),n.beforeRedirects.sensitiveHeaders&&n.beforeRedirects.sensitiveHeaders(n,o),n.beforeRedirects.config&&n.beforeRedirects.config(n,t,o)}function HOe(n,t){n&&Object.keys(n).forEach(o=>{t.has(o.toLowerCase())&&delete n[o]})}function KOe(n,t){if(!t)return!1;try{return new URL(t.url).origin===new URL(n.href).origin}catch{return!1}}function y8(n,t,o,a,e,i){let A=t,r=GOe(n,i,e);if(!A&&A!==!1&&!POe(r)){let s=f4(o);s&&(bN(o)||(A=new URL(s)))}if(a&&n.headers)for(let s of Object.keys(n.headers))s.toLowerCase()==="proxy-authorization"&&delete n.headers[s];if(a&&n.agent&&n.agent[Q8]&&(n.agent=void 0),A){let s=A instanceof URL,g=f=>s||Z.hasOwnProp(A,f)?A[f]:void 0,c=g("username"),I=g("password"),d=Z.hasOwnProp(A,"auth")?A.auth:void 0;if(c&&(d=(c||"")+":"+(I||"")),d){let f=typeof d=="object",Q=f&&Z.hasOwnProp(d,"username")?d.username:void 0,y=f&&Z.hasOwnProp(d,"password")?d.password:void 0;if(!!(Q||y))d=(Q||"")+":"+(y||"");else if(f)throw new Oe("Invalid proxy authorization",Oe.ERR_BAD_OPTION,{proxy:A})}if(TN.test(n.protocol)){if(!(e instanceof _N.default)){let f=g("hostname")||g("host"),Q=g("port"),y=g("protocol"),m=y?y.includes(":")?y:`${y}:`:"http:",_=f&&f.includes(":")&&!f.startsWith("[")?`[${f}]`:f,T=new URL(`${m}//${_}${Q?":"+Q:""}`),R={protocol:T.protocol,hostname:T.hostname.replace(/^\[|\]$/g,""),port:T.port,auth:d&&typeof d=="string"?d:void 0};T.protocol==="https:"&&(R.ALPNProtocols=["http/1.1"]);let L=FOe(R,e);n.agent=L,n.agents&&(n.agents.https=L)}}else{if(d){let m=Buffer.from(d,"utf8").toString("base64");n.headers["Proxy-Authorization"]="Basic "+m}let f=!1;for(let m of Object.keys(n.headers))if(m.toLowerCase()==="host"){f=!0;break}f||(n.headers.host=n.hostname+(n.port?":"+n.port:""));let Q=g("hostname")||g("host");n.hostname=Q,n.host=Q,n.port=g("port"),n.path=o;let y=g("protocol");y&&(n.protocol=y.includes(":")?y:`${y}:`)}}n.beforeRedirects.proxy=function(g){y8(g,t,g.href,!0,e,i)}}var xOe=typeof process<"u"&&Z.kindOf(process)==="process",YOe=n=>new Promise((t,o)=>{let a,e,i=(s,g)=>{e||(e=!0,a&&a(s,g))},A=s=>{i(s),t(s)},r=s=>{i(s,!0),o(s)};n(A,r,s=>a=s).catch(r)}),jOe=({address:n,family:t})=>{if(!Z.isString(n))throw TypeError("address must be a string");return{address:n,family:t||(n.indexOf(".")<0?6:4)}},p8=(n,t)=>jOe(Z.isObject(n)?n:{address:n,family:t}),JOe={request(n,t){let o=n.protocol+"//"+n.hostname+":"+(n.port||(n.protocol==="https:"?443:80)),{http2Options:a,headers:e}=n,i=LOe.getSession(o,a),{HTTP2_HEADER_SCHEME:A,HTTP2_HEADER_METHOD:r,HTTP2_HEADER_PATH:s,HTTP2_HEADER_STATUS:g}=DOe.constants,c={[A]:n.protocol.replace(":",""),[r]:n.method,[s]:n.path};Z.forEach(e,(d,B)=>{B.charAt(0)!==":"&&(c[B]=d)});let I=i.request(c);return I.once("response",d=>{let B=I;d=Object.assign({},d);let f=d[g];delete d[g],B.headers=d,B.statusCode=+f,t(B)}),I}},m8=xOe&&function(t){return YOe(async function(a,e,i){let A=Ce=>Z.getSafeProp(t,Ce),r=A("transitional")||Gc,s=A("data"),g=A("lookup"),c=A("family"),I=A("httpVersion");I===void 0&&(I=1);let d=A("http2Options"),B=A("httpAgent"),f=A("httpsAgent"),Q=A("proxy"),y=A("responseType"),m=A("responseEncoding"),_=A("socketPath"),T=A("method").toUpperCase(),R=A("maxRedirects"),L=A("maxBodyLength"),U=A("maxContentLength"),F=A("decompress"),z,J=!1,K,G;if(I=+I,Number.isNaN(I))throw TypeError(`Invalid protocol version: '${t.httpVersion}' is not a number`);if(I!==1&&I!==2)throw TypeError(`Unsupported protocol version '${I}'`);let V=I===2;if(g){let Ce=q4(g,ke=>Z.isArray(ke)?ke:[ke]);g=(ke,Ue,MA)=>{Ce(ke,Ue,(Ke,_A,ot)=>{if(Ke)return MA(Ke);let wA=Z.isArray(_A)?_A.map(ht=>p8(ht)):[p8(_A,ot)];Ue.all?MA(Ke,wA):MA(Ke,wA[0].address,wA[0].family)})}}let H=new bOe;function N(Ce){try{H.emit("abort",!Ce||Ce.type?new ho(null,t,K):Ce)}catch{}}function k(){G&&(clearTimeout(G),G=null)}function q(){let Ce=A("timeout"),ke=Ce?"timeout of "+Ce+"ms exceeded":"timeout exceeded",Ue=A("timeoutErrorMessage");return Ue&&(ke=Ue),new Oe(ke,r.clarifyTimeoutError?Oe.ETIMEDOUT:Oe.ECONNABORTED,t,K)}H.once("abort",e);let X=()=>{k(),t.cancelToken&&t.cancelToken.unsubscribe(N),t.signal&&t.signal.removeEventListener("abort",N),H.removeAllListeners()};(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(N),t.signal&&(t.signal.aborted?N():t.signal.addEventListener("abort",N))),i((Ce,ke)=>{if(z=!0,k(),ke){J=!0,X();return}let{data:Ue}=Ce;if(Ue instanceof Rn.Readable||Ue instanceof Rn.Duplex){let MA=Rn.finished(Ue,()=>{MA(),X()})}else X()});let ie=dl(A("baseURL"),A("url"),A("allowAbsoluteUrls"),t),De=_?"http://localhost":yt.hasBrowserEnv?yt.origin:void 0,oe=new URL(ie,De),Se=oe.protocol||I8[0];if(Se==="data:"){if(U>-1){let ke=String(A("url")||ie||"");if(i8(ke)>U)return e(new Oe("maxContentLength size of "+U+" exceeded",Oe.ERR_BAD_RESPONSE,t))}let Ce;if(T!=="GET")return ws(a,e,{status:405,statusText:"method not allowed",headers:{},config:t});try{Ce=BN(A("url"),y==="blob",{Blob:t.env&&t.env.Blob})}catch(ke){throw Oe.from(ke,Oe.ERR_BAD_REQUEST,t)}return y==="text"?(Ce=Ce.toString(m),(!m||m==="utf8")&&(Ce=Z.stripBOM(Ce))):y==="stream"&&(Ce=Rn.Readable.from(Ce)),ws(a,e,{data:Ce,status:200,statusText:"OK",headers:new jt,config:t})}if(I8.indexOf(Se)===-1)return e(new Oe("Unsupported protocol "+Se,Oe.ERR_BAD_REQUEST,t));let Be=jt.from(t.headers).normalize();Be.set("User-Agent","axios/"+Mg,!1);let{onUploadProgress:Re,onDownloadProgress:Ne}=t,Je=t.maxRate,ve,tA;if(Z.isSpecCompliantForm(s)){let Ce=Be.getContentType(/boundary=([-_\w\d]{10,70})/i);s=Y4(s,ke=>{Be.set(ke)},{tag:`axios-${Mg}-boundary`,boundary:Ce&&Ce[1]||void 0})}else if(Z.isFormData(s)&&Z.isFunction(s.getHeaders)&&s.getHeaders!==Object.prototype.getHeaders){if(AC(Be,s.getHeaders(),A("formDataHeaderPolicy")),!Be.hasContentLength())try{let Ce=await OOe.promisify(s.getLength).call(s);Number.isFinite(Ce)&&Ce>=0&&Be.setContentLength(Ce)}catch{}}else if(Z.isBlob(s)||Z.isFile(s))s.size&&Be.setContentType(s.type||"application/octet-stream"),Be.setContentLength(s.size||0),s=Rn.Readable.from(pm(s));else if(s&&!Z.isStream(s)){if(!Buffer.isBuffer(s))if(Z.isArrayBuffer(s))s=Buffer.from(new Uint8Array(s));else if(Z.isString(s))s=Buffer.from(s,"utf-8");else return e(new Oe("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Oe.ERR_BAD_REQUEST,t));if(Be.setContentLength(s.length,!1),L>-1&&s.length>L)return e(new Oe("Request body larger than maxBodyLength limit",Oe.ERR_BAD_REQUEST,t))}let fe=Z.toFiniteNumber(Be.getContentLength());Z.isArray(Je)?(ve=Je[0],tA=Je[1]):ve=tA=Je,s&&(Re||ve)&&(Z.isStream(s)||(s=Rn.Readable.from(s,{objectMode:!1})),s=Rn.pipeline([s,new yN({maxRate:Z.toFiniteNumber(ve)})],Z.noop),Re&&s.on("progress",d8(s,Gp(fe,_g(Fp(Re,n8),!1,3)))));let Ie,Xe=A("auth");if(Xe){let Ce=Z.getSafeProp(Xe,"username")||"",ke=Z.getSafeProp(Xe,"password")||"";Ie=Ce+":"+ke}if(!Ie&&(oe.username||oe.password)){let Ce=l8(oe.username),ke=l8(oe.password);Ie=Ce+":"+ke}Ie&&Be.delete("authorization");let je;try{je=ll(oe.pathname+oe.search,A("params"),A("paramsSerializer")).replace(/^\?/,"")}catch(Ce){return e(Oe.from(Ce,Oe.ERR_BAD_REQUEST,t,null,null,{url:A("url"),exists:!0}))}Be.set("Accept-Encoding",Z.hasOwnProp(r,"advertiseZstdAcceptEncoding")&&r.advertiseZstdAcceptEncoding===!0?TOe:f8,!1);let be=Object.assign(Object.create(null),{path:je,method:T,headers:wp(Be),agents:{http:B,https:f},auth:Ie,protocol:Se,family:c,beforeRedirect:UOe,beforeRedirects:Object.create(null),http2Options:d});if(!Z.isUndefined(g)&&(be.lookup=g),_){if(typeof _!="string")return e(new Oe("socketPath must be a string",Oe.ERR_BAD_OPTION_VALUE,t));let Ce=A("allowedSocketPaths");if(Ce!=null){let ke=Array.isArray(Ce)?Ce:[Ce],Ue=a8(_);if(!ke.some(Ke=>typeof Ke=="string"&&a8(Ke)===Ue))return e(new Oe(`socketPath "${_}" is not permitted by allowedSocketPaths`,Oe.ERR_BAD_OPTION_VALUE,t))}be.socketPath=_}else be.hostname=oe.hostname.startsWith("[")?oe.hostname.slice(1,-1):oe.hostname,be.port=oe.port,y8(be,Q,Se+"//"+oe.hostname+(oe.port?":"+oe.port:"")+be.path,!1,f,B);let uA,EA=!1,aA=!1,Ze=TN.test(be.protocol);if(be.agent==null&&(be.agent=Ze?f:B),V)uA=JOe;else{let Ce=A("transport");if(Ce)uA=Ce;else if(R===0)uA=Ze?E8:h8,EA=!0;else{aA=!0,be.sensitiveHeaders=[],R&&(be.maxRedirects=R);let ke=A("beforeRedirect");if(ke&&(be.beforeRedirects.config=ke),Ie){let MA=oe.origin,Ke=Ie;be.beforeRedirects.auth=function(ot){try{new URL(ot.href).origin===MA&&(ot.auth=Ke)}catch{}}}let Ue=A("sensitiveHeaders");if(Ue!=null){if(!Z.isArray(Ue))return e(new Oe("sensitiveHeaders must be an array of strings",Oe.ERR_BAD_OPTION_VALUE,t));let MA=new Set;for(let Ke of Ue){if(!Z.isString(Ke))return e(new Oe("sensitiveHeaders must be an array of strings",Oe.ERR_BAD_OPTION_VALUE,t));MA.add(Ke.toLowerCase())}MA.size&&(be.sensitiveHeaders=Array.from(MA),be.beforeRedirects.sensitiveHeaders=function(_A,ot){KOe(_A,ot)||HOe(_A.headers,MA)})}uA=Ze?ROe:NOe}}L>-1?be.maxBodyLength=L:be.maxBodyLength=1/0,be.insecureHTTPParser=!!A("insecureHTTPParser"),K=uA.request(be,function(ke){if(k(),K.destroyed)return;let Ue=[ke],MA=Z.toFiniteNumber(ke.headers["content-length"]);if(Ne||tA){let wA=new yN({maxRate:Z.toFiniteNumber(tA)});Ne&&wA.on("progress",d8(wA,Gp(MA,_g(Fp(Ne,n8),!0,3)))),Ue.push(wA)}let Ke=ke,_A=ke.req||K;if(F!==!1&&ke.headers["content-encoding"])switch((T==="HEAD"||ke.statusCode===204)&&delete ke.headers["content-encoding"],(ke.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":Ue.push(Jo.createUnzip(o8)),delete ke.headers["content-encoding"];break;case"deflate":Ue.push(new j4),Ue.push(Jo.createUnzip(o8)),delete ke.headers["content-encoding"];break;case"br":C8&&(Ue.push(Jo.createBrotliDecompress(MOe)),delete ke.headers["content-encoding"]);break;case"zstd":B8&&(Ue.push(Jo.createZstdDecompress(_Oe)),delete ke.headers["content-encoding"]);break}Ke=Ue.length>1?Rn.pipeline(Ue,Z.noop):Ue[0];let ot={status:ke.statusCode,statusText:ke.statusMessage,headers:new jt(ke.headers),config:t,request:_A};if(y==="stream"){if(U>-1){let wA=U,ht=Ke;async function*fr(){let UA=0;for await(let de of ht){if(UA+=de.length,UA>wA)throw new Oe("maxContentLength size of "+wA+" exceeded",Oe.ERR_BAD_RESPONSE,t,_A);yield de}}Ke=Rn.Readable.from(fr(),{objectMode:!1})}ot.data=Ke,ws(a,e,ot)}else{let wA=[],ht=0;Ke.on("data",function(UA){wA.push(UA),ht+=UA.length,U>-1&&ht>U&&(J=!0,Ke.destroy(),N(new Oe("maxContentLength size of "+U+" exceeded",Oe.ERR_BAD_RESPONSE,t,_A)))}),Ke.on("aborted",function(){if(J)return;let UA=new Oe("stream has been aborted",Oe.ERR_BAD_RESPONSE,t,_A,ot);Ke.destroy(UA),e(UA)}),Ke.on("error",function(UA){J||e(Oe.from(UA,null,t,_A,ot))}),Ke.on("end",function(){try{let UA=wA.length===1?wA[0]:Buffer.concat(wA);y!=="arraybuffer"&&(UA=UA.toString(m),(!m||m==="utf8")&&(UA=Z.stripBOM(UA))),ot.data=UA}catch(UA){return e(Oe.from(UA,null,t,ot.request,ot))}ws(a,e,ot)})}H.once("abort",wA=>{Ke.destroyed||(Ke.emit("error",wA),Ke.destroy())})}),H.once("abort",Ce=>{K.close?K.close():K.destroy(Ce)}),K.on("error",function(ke){e(Oe.from(ke,null,t,K))});let bA=new Set;if(K.on("socket",function(ke){typeof ke.setKeepAlive=="function"&&ke.setKeepAlive(!0,1e3*60),ke[s8]||(ke.on("error",function(MA){let Ke=ke[hm];Ke&&!Ke.destroyed&&Ke.destroy(MA)}),ke[s8]=!0),ke[hm]=K,bA.add(ke)}),K.once("close",function(){k();for(let ke of bA)ke[hm]===K&&(ke[hm]=null);bA.clear()}),A("timeout")){let Ce=parseInt(A("timeout"),10);if(Number.isNaN(Ce)){N(new Oe("error trying to parse `config.timeout` to int",Oe.ERR_BAD_OPTION_VALUE,t,K));return}let ke=function(){z||N(q())};EA&&Ce>0&&(G=setTimeout(ke,Ce)),K.setTimeout(Ce,ke)}else K.setTimeout(0);if(Z.isStream(s)){let Ce=!1,ke=!1;s.on("end",()=>{Ce=!0}),s.once("error",MA=>{ke=!0,K.destroy(MA)}),s.on("close",()=>{!Ce&&!ke&&N(new ho("Request stream has been aborted",t,K))});let Ue=s;if(L>-1&&!aA){let MA=L,Ke=0;Ue=Rn.pipeline([s,new Rn.Transform({transform(_A,ot,wA){if(Ke+=_A.length,Ke>MA)return wA(new Oe("Request body larger than maxBodyLength limit",Oe.ERR_BAD_REQUEST,t,K));wA(null,_A)}})],Z.noop),Ue.on("error",_A=>{K.destroyed||K.destroy(_A)})}Ue.pipe(K)}else s&&K.write(s),K.end()})};var S8=yt.hasStandardBrowserEnv?((n,t)=>o=>(o=new URL(o,yt.origin),n.protocol===o.protocol&&n.host===o.host&&(t||n.port===o.port)))(new URL(yt.origin),yt.navigator&&/(msie|trident)/i.test(yt.navigator.userAgent)):()=>!0;var w8=yt.hasStandardBrowserEnv?{write(n,t,o,a,e,i,A){if(typeof document>"u")return;let r=[`${n}=${encodeURIComponent(t)}`];Z.isNumber(o)&&r.push(`expires=${new Date(o).toUTCString()}`),Z.isString(a)&&r.push(`path=${a}`),Z.isString(e)&&r.push(`domain=${e}`),i===!0&&r.push("secure"),Z.isString(A)&&r.push(`SameSite=${A}`),document.cookie=r.join("; ")},read(n){if(typeof document>"u")return null;let t=document.cookie.split(";");for(let o=0;on instanceof jt?{...n}:n,qOe=n=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(n).concat(Object.getOwnPropertySymbols(n).filter(t=>Object.getOwnPropertyDescriptor(n,t).enumerable)):Object.keys(n);function kn(n,t){n=n||{},t=t||{};let o=Object.create(null);Object.defineProperty(o,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function a(c,I,d,B){return Z.isPlainObject(c)&&Z.isPlainObject(I)?Z.merge.call({caseless:B},c,I):Z.isPlainObject(I)?Z.merge({},I):Z.isArray(I)?I.slice():I}function e(c,I,d,B){if(Z.isUndefined(I)){if(!Z.isUndefined(c))return a(void 0,c,d,B)}else return a(c,I,d,B)}function i(c,I){if(!Z.isUndefined(I))return a(void 0,I)}function A(c,I){if(Z.isUndefined(I)){if(!Z.isUndefined(c))return a(void 0,c)}else return a(void 0,I)}function r(c){let I=Z.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!Z.isUndefined(I))if(Z.isPlainObject(I)){if(Z.hasOwnProp(I,c))return I[c]}else return;let d=Z.hasOwnProp(n,"transitional")?n.transitional:void 0;if(Z.isPlainObject(d)&&Z.hasOwnProp(d,c))return d[c]}function s(c,I,d){if(Z.hasOwnProp(t,d))return a(c,I);if(Z.hasOwnProp(n,d))return a(void 0,c)}let g={url:i,method:i,data:i,baseURL:A,transformRequest:A,transformResponse:A,paramsSerializer:A,timeout:A,timeoutMessage:A,withCredentials:A,withXSRFToken:A,adapter:A,responseType:A,xsrfCookieName:A,xsrfHeaderName:A,onUploadProgress:A,onDownloadProgress:A,decompress:A,maxContentLength:A,maxBodyLength:A,beforeRedirect:A,transport:A,httpAgent:A,httpsAgent:A,cancelToken:A,socketPath:A,allowedSocketPaths:A,responseEncoding:A,validateStatus:s,headers:(c,I,d)=>e(D8(c),D8(I),d,!0)};return Z.forEach(qOe({...n,...t}),function(I){if(I==="__proto__"||I==="constructor"||I==="prototype")return;let d=Z.hasOwnProp(g,I)?g[I]:e,B=Z.hasOwnProp(n,I)?n[I]:void 0,f=Z.hasOwnProp(t,I)?t[I]:void 0,Q=d(B,f,I);Z.isUndefined(Q)&&d!==s||(o[I]=Q)}),Z.hasOwnProp(t,"validateStatus")&&Z.isUndefined(t.validateStatus)&&r("validateStatusUndefinedResolves")===!1&&(Z.hasOwnProp(n,"validateStatus")?o.validateStatus=a(void 0,n.validateStatus):delete o.validateStatus),o}var zOe=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16)));function VOe(n){let t=kn({},n),o=d=>Z.hasOwnProp(t,d)?t[d]:void 0,a=o("data"),e=o("withXSRFToken"),i=o("xsrfHeaderName"),A=o("xsrfCookieName"),r=o("headers"),s=o("auth"),g=o("baseURL"),c=o("allowAbsoluteUrls"),I=o("url");if(t.headers=r=jt.from(r),t.url=ll(dl(g,I,c,t),o("params"),o("paramsSerializer")),s){let d=Z.getSafeProp(s,"username")||"",B=Z.getSafeProp(s,"password")||"";try{r.set("Authorization","Basic "+btoa(d+":"+(B?zOe(B):"")))}catch(f){throw Oe.from(f,Oe.ERR_BAD_OPTION_VALUE,n)}}if(Z.isFormData(a)&&(yt.hasStandardBrowserEnv||yt.hasStandardBrowserWebWorkerEnv||Z.isReactNative(a)?r.setContentType(void 0):Z.isFunction(a.getHeaders)&&AC(r,a.getHeaders(),o("formDataHeaderPolicy"))),yt.hasStandardBrowserEnv&&(Z.isFunction(e)&&(e=e(t)),e===!0||e==null&&S8(t.url))){let B=i&&A&&w8.read(A);B&&r.set(i,B)}return t}var Em=VOe;var WOe=typeof XMLHttpRequest<"u",O8=WOe&&function(n){return new Promise(function(o,a){let e=Em(n),i=e.data,A=jt.from(e.headers).normalize(),{responseType:r,onUploadProgress:s,onDownloadProgress:g}=e,c,I,d,B,f;function Q(){B&&B(),f&&f(),e.cancelToken&&e.cancelToken.unsubscribe(c),e.signal&&e.signal.removeEventListener("abort",c)}let y=new XMLHttpRequest;y.open(e.method.toUpperCase(),e.url,!0),y.timeout=e.timeout;function m(){if(!y)return;let T=jt.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),L={data:!r||r==="text"||r==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:T,config:n,request:y};ws(function(F){o(F),Q()},function(F){a(F),Q()},L),y=null}"onloadend"in y?y.onloadend=m:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.startsWith("file:"))||setTimeout(m)},y.onabort=function(){y&&(a(new Oe("Request aborted",Oe.ECONNABORTED,n,y)),Q(),y=null)},y.onerror=function(R){let L=R&&R.message?R.message:"Network Error",U=new Oe(L,Oe.ERR_NETWORK,n,y);U.event=R||null,a(U),Q(),y=null},y.ontimeout=function(){let R=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",L=e.transitional||Gc;e.timeoutErrorMessage&&(R=e.timeoutErrorMessage),a(new Oe(R,L.clarifyTimeoutError?Oe.ETIMEDOUT:Oe.ECONNABORTED,n,y)),Q(),y=null},i===void 0&&A.setContentType(null),"setRequestHeader"in y&&Z.forEach(wp(A),function(R,L){y.setRequestHeader(L,R)}),Z.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),r&&r!=="json"&&(y.responseType=e.responseType),g&&([d,f]=_g(g,!0),y.addEventListener("progress",d)),s&&y.upload&&([I,B]=_g(s),y.upload.addEventListener("progress",I),y.upload.addEventListener("loadend",B)),(e.cancelToken||e.signal)&&(c=T=>{y&&(a(!T||T.type?new ho(null,n,y):T),y.abort(),Q(),y=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));let _=eC(e.url);if(_&&!yt.protocols.includes(_)){a(new Oe("Unsupported protocol "+_+":",Oe.ERR_BAD_REQUEST,n)),Q();return}y.send(i||null)})};var ZOe=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;let o=new AbortController,a=!1,e=function(s){if(!a){a=!0,A();let g=s instanceof Error?s:this.reason;o.abort(g instanceof Oe?g:new ho(g instanceof Error?g.message:g))}},i=t&&setTimeout(()=>{i=null,e(new Oe(`timeout of ${t}ms exceeded`,Oe.ETIMEDOUT))},t),A=()=>{n&&(i&&clearTimeout(i),i=null,n.forEach(s=>{s.unsubscribe?s.unsubscribe(e):s.removeEventListener("abort",e)}),n=null)};n.forEach(s=>{if(!a){if(s.aborted){e.call(s);return}s.addEventListener("abort",e,{once:!0})}});let{signal:r}=o;return r.unsubscribe=()=>Z.asap(A),r},b8=ZOe;var XOe=function*(n,t){let o=n.byteLength;if(!t||o{let e=$Oe(n,t),i=0,A,r=s=>{A||(A=!0,a&&a(s))};return new ReadableStream({async pull(s){try{let{done:g,value:c}=await e.next();if(g){r(),s.close();return}let I=c.byteLength;if(o){let d=i+=I;o(d)}s.enqueue(new Uint8Array(c))}catch(g){throw r(g),g}},cancel(s){return r(s),e.return()}},{highWaterMark:2})};var M8=64*1024,{isFunction:um}=Z,Abe=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16))),_8=n=>{if(!Z.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},T8=(n,...t)=>{try{return!!n(...t)}catch{return!1}},tbe=n=>{let t=n.indexOf("://"),o=n;return t!==-1&&(o=o.slice(t+3)),o.includes("@")||o.includes(":")},rbe=n=>{let t=Z.global!==void 0&&Z.global!==null?Z.global:globalThis,{ReadableStream:o,TextEncoder:a}=t;n=Z.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);let{fetch:e,Request:i,Response:A}=n,r=e?um(e):typeof fetch=="function",s=um(i),g=um(A);if(!r)return!1;let c=r&&um(o),I=r&&(typeof a=="function"?(m=>_=>m.encode(_))(new a):async m=>new Uint8Array(await new i(m).arrayBuffer())),d=s&&c&&T8(()=>{let m=!1,_=new i(yt.origin,{body:new o,method:"POST",get duplex(){return m=!0,"half"}}),T=_.headers.has("Content-Type");return _.body!=null&&_.body.cancel(),m&&!T}),B=g&&c&&T8(()=>Z.isReadableStream(new A("").body)),f={stream:B&&(m=>m.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!f[m]&&(f[m]=(_,T)=>{let R=_&&_[m];if(R)return R.call(_);throw new Oe(`Response type '${m}' is not supported`,Oe.ERR_NOT_SUPPORT,T)})});let Q=async m=>{if(m==null)return 0;if(Z.isBlob(m))return m.size;if(Z.isSpecCompliantForm(m))return(await new i(yt.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(Z.isArrayBufferView(m)||Z.isArrayBuffer(m))return m.byteLength;if(Z.isURLSearchParams(m)&&(m=m+""),Z.isString(m))return(await I(m)).byteLength},y=async(m,_)=>{let T=Z.toFiniteNumber(m.getContentLength());return T??Q(_)};return async m=>{let{url:_,method:T,data:R,signal:L,cancelToken:U,timeout:F,onDownloadProgress:z,onUploadProgress:J,responseType:K,headers:G,withCredentials:V="same-origin",fetchOptions:H,maxContentLength:N,maxBodyLength:k}=Em(m),q=Z.isNumber(N)&&N>-1,X=Z.isNumber(k)&&k>-1,ie=ve=>Z.hasOwnProp(m,ve)?m[ve]:void 0,De=e||fetch;K=K?(K+"").toLowerCase():"text";let oe=b8([L,U&&U.toAbortSignal()],F),Se=null,Be=oe&&oe.unsubscribe&&(()=>{oe.unsubscribe()}),Re,Ne=null,Je=()=>new Oe("Request body larger than maxBodyLength limit",Oe.ERR_BAD_REQUEST,m,Se);try{let ve,tA=ie("auth");if(tA){let Ze=Z.getSafeProp(tA,"username")||"",bA=Z.getSafeProp(tA,"password")||"";ve={username:Ze,password:bA}}if(tbe(_)){let Ze=new URL(_,yt.origin);if(!ve&&(Ze.username||Ze.password)){let bA=_8(Ze.username),Ce=_8(Ze.password);ve={username:bA,password:Ce}}(Ze.username||Ze.password)&&(Ze.username="",Ze.password="",_=Ze.href)}if(ve&&(G.delete("authorization"),G.set("Authorization","Basic "+btoa(Abe((ve.username||"")+":"+(ve.password||""))))),q&&typeof _=="string"&&_.startsWith("data:")&&MN(_)>N)throw new Oe("maxContentLength size of "+N+" exceeded",Oe.ERR_BAD_RESPONSE,m,Se);if(X&&T!=="get"&&T!=="head"){let Ze=await Q(R);if(typeof Ze=="number"&&isFinite(Ze)&&(Re=Ze,Ze>k))throw Je()}let fe=X&&(Z.isReadableStream(R)||Z.isStream(R)),Ie=(Ze,bA,Ce)=>NN(Ze,M8,ke=>{if(X&&ke>k)throw Ne=Je();bA&&bA(ke)},Ce);if(d&&T!=="get"&&T!=="head"&&(J||fe)){if(Re=Re??await y(G,R),Re!==0||fe){let Ze=new i(_,{method:"POST",body:R,duplex:"half"}),bA;if(Z.isFormData(R)&&(bA=Ze.headers.get("content-type"))&&G.setContentType(bA),Ze.body){let[Ce,ke]=J&&Gp(Re,_g(Fp(J)))||[];R=Ie(Ze.body,Ce,ke)}}}else if(fe&&!s&&c&&T!=="get"&&T!=="head")R=Ie(R);else if(fe&&s&&!d&&T!=="get"&&T!=="head")throw new Oe("Stream request bodies are not supported by the current fetch implementation",Oe.ERR_NOT_SUPPORT,m,Se);Z.isString(V)||(V=V?"include":"omit");let Xe=s&&"credentials"in i.prototype;if(Z.isFormData(R)){let Ze=G.getContentType();Ze&&/^multipart\/form-data/i.test(Ze)&&!/boundary=/i.test(Ze)&&G.delete("content-type")}G.set("User-Agent","axios/"+Mg,!1);let je={...H,signal:oe,method:T.toUpperCase(),headers:wp(G.normalize()),body:R,duplex:"half",credentials:Xe?V:void 0};Se=s&&new i(_,je);let be=await(s?De(Se,H):De(_,je)),uA=jt.from(be.headers);if(q){let Ze=Z.toFiniteNumber(uA.getContentLength());if(Ze!=null&&Ze>N)throw new Oe("maxContentLength size of "+N+" exceeded",Oe.ERR_BAD_RESPONSE,m,Se)}let EA=B&&(K==="stream"||K==="response");if(B&&be.body&&(z||q||EA&&Be)){let Ze={};["status","statusText","headers"].forEach(Ke=>{Ze[Ke]=be[Ke]});let bA=Z.toFiniteNumber(uA.getContentLength()),[Ce,ke]=z&&Gp(bA,_g(Fp(z),!0))||[],Ue=0,MA=Ke=>{if(q&&(Ue=Ke,Ue>N))throw new Oe("maxContentLength size of "+N+" exceeded",Oe.ERR_BAD_RESPONSE,m,Se);Ce&&Ce(Ke)};be=new A(NN(be.body,M8,MA,()=>{ke&&ke(),Be&&Be()}),Ze)}K=K||"text";let aA=await f[Z.findKey(f,K)||"text"](be,m);if(q&&!B&&!EA){let Ze;if(aA!=null&&(typeof aA.byteLength=="number"?Ze=aA.byteLength:typeof aA.size=="number"?Ze=aA.size:typeof aA=="string"&&(Ze=typeof a=="function"?new a().encode(aA).byteLength:aA.length)),typeof Ze=="number"&&Ze>N)throw new Oe("maxContentLength size of "+N+" exceeded",Oe.ERR_BAD_RESPONSE,m,Se)}return!EA&&Be&&Be(),await new Promise((Ze,bA)=>{ws(Ze,bA,{data:aA,headers:jt.from(be.headers),status:be.status,statusText:be.statusText,config:m,request:Se})})}catch(ve){if(Be&&Be(),oe&&oe.aborted&&oe.reason instanceof Oe){let tA=oe.reason;throw tA.config=m,Se&&(tA.request=Se),ve!==tA&&Object.defineProperty(tA,"cause",{__proto__:null,value:ve,writable:!0,enumerable:!1,configurable:!0}),tA}if(Ne)throw Se&&!Ne.request&&(Ne.request=Se),Ne;if(ve instanceof Oe)throw Se&&!ve.request&&(ve.request=Se),ve;if(ve&&ve.name==="TypeError"&&/Load failed|fetch/i.test(ve.message)){let tA=new Oe("Network Error",Oe.ERR_NETWORK,m,Se,ve&&ve.response);throw Object.defineProperty(tA,"cause",{__proto__:null,value:ve.cause||ve,writable:!0,enumerable:!1,configurable:!0}),tA}throw Oe.from(ve,ve&&ve.code,m,Se,ve&&ve.response)}}},ibe=new Map,RN=n=>{let t=n&&n.env||{},{fetch:o,Request:a,Response:e}=t,i=[a,e,o],A=i.length,r=A,s,g,c=ibe;for(;r--;)s=i[r],g=c.get(s),g===void 0&&c.set(s,g=r?new Map:rbe(t)),c=g;return g},flA=RN();var kN={http:m8,xhr:O8,fetch:{get:RN}};Z.forEach(kN,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});var N8=n=>`- ${n}`,obe=n=>Z.isFunction(n)||n===null||n===!1;function nbe(n,t){n=Z.isArray(n)?n:[n];let{length:o}=n,a,e,i={};for(let A=0;A`adapter ${s} `+(g===!1?"is not supported by the environment":"is not available in the build")),r=o?A.length>1?`since : -`+A.map(N8).join(` -`):" "+N8(A[0]):"as no adapter specified";throw new Oe("There is no suitable adapter to dispatch the request "+r,Oe.ERR_NOT_SUPPORT)}return e}var Cm={getAdapter:nbe,adapters:kN};function vN(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new ho(null,n)}function rC(n){return vN(n),n.headers=jt.from(n.headers),n.data=Yu.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Cm.getAdapter(n.adapter||Np.adapter,n)(n).then(function(a){vN(n),n.response=a;try{a.data=Yu.call(n,n.transformResponse,a)}finally{delete n.response}return a.headers=jt.from(a.headers),a},function(a){if(!ju(a)&&(vN(n),a&&a.response)){n.response=a.response;try{a.response.data=Yu.call(n,n.transformResponse,a.response)}finally{delete n.response}a.response.headers=jt.from(a.response.headers)}return Promise.reject(a)})}var Bm={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Bm[n]=function(a){return typeof a===n||"a"+(t<1?"n ":" ")+n}});var R8={};Bm.transitional=function(t,o,a){function e(i,A){return"[Axios v"+Mg+"] Transitional option '"+i+"'"+A+(a?". "+a:"")}return(i,A,r)=>{if(t===!1)throw new Oe(e(A," has been removed"+(o?" in "+o:"")),Oe.ERR_DEPRECATED);return o&&!R8[A]&&(R8[A]=!0,console.warn(e(A," has been deprecated since v"+o+" and will be removed in the near future"))),t?t(i,A,r):!0}};Bm.spelling=function(t){return(o,a)=>(console.warn(`${a} is likely a misspelling of ${t}`),!0)};function sbe(n,t,o){if(typeof n!="object"||n===null)throw new Oe("options must be an object",Oe.ERR_BAD_OPTION_VALUE);let a=Object.keys(n),e=a.length;for(;e-- >0;){let i=a[e],A=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(A){let r=n[i],s=r===void 0||A(r,i,n);if(s!==!0)throw new Oe("option "+i+" must be "+s,Oe.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new Oe("Unknown option "+i,Oe.ERR_BAD_OPTION)}}var iC={assertOptions:sbe,validators:Bm};var sa=iC.validators,Lp=class{constructor(t){this.defaults=t||{},this.interceptors={request:new U0,response:new U0}}async request(t,o){try{return await this._request(t,o)}catch(a){if(a instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;let i=(()=>{if(!e.stack)return"";let A=e.stack.indexOf(` +`),questions:o}}function Tye(n,t){return new Promise((o,a)=>{if(n.controller.signal.aborted)return a(n.controller.signal.reason??fp());let e=()=>{n.approvals.delete(t),a(n.controller.signal.reason??fp())};n.controller.signal.addEventListener("abort",e,{once:!0}),n.approvals.set(t,{resolve(i){n.controller.signal.removeEventListener("abort",e),n.approvals.delete(t),o(i)}})})}var jy=class{#e;#A;#t;#r;#I;#o=new Map;#g=new Set;#i=new Set;#a=!1;#s={running:0,completed:0,failed:0,lastJobId:null,lastJobAt:null};constructor({config:t,transport:o,createHarness:a,logger:e=console,sleepImpl:i=wye}){if(!t||!o||typeof a!="function")throw new TypeError("OfficeJobExecutor requires config, transport, and createHarness");this.#e=t,this.#A=o,this.#t=a,this.#r=e,this.#I=i}get status(){return structuredClone(this.#s)}offer(t){return this.#a||!jj.test(t)||this.#o.has(t)||this.#g.has(t)||this.#i.has(t)?!1:(this.#g.add(t),this.#l(),!0)}handleEvent(t){let o=sa(t?.data?.jobId,80);if(!jj.test(o))return!1;if(t.type==="job.available")return this.offer(o);if(t.type==="job.cancel")return this.cancel(o);if(t.type==="approval.reply"){let a=this.#o.get(o),e=sa(t.data?.approvalId,180),i=a?.approvals.get(e);return i?(i.resolve({decision:t.data?.decision==="approved"?"approved":"rejected",answer:sa(t.data?.answer)}),!0):!1}return!1}cancel(t){this.#g.delete(t);let o=this.#o.get(t);return o?(o.cancelled=!0,o.controller.abort(fp()),o.sessionId&&o.harness&&o.harness.rpc("session.cancel",{sessionId:o.sessionId,keepInbox:!0},1e4).catch(()=>{}),!0):!1}async close(){this.#a=!0,this.#g.clear();for(let t of this.#o.values())t.controller.abort(fp());await Promise.allSettled([...this.#o.values()].map(t=>t.task))}#l(){for(;!this.#a&&this.#o.size0;){let t=this.#g.values().next().value;this.#g.delete(t);let o={controller:new AbortController,approvals:new Map,harness:null,sessionId:null,leaseToken:null,cancelled:!1,lastProgressAt:0,lastProgress:"",task:null};o.task=this.#c(t,o).finally(()=>{this.#o.delete(t),this.#s.running=this.#o.size,this.#l()}),this.#o.set(t,o),this.#s.running=this.#o.size,o.task.catch(a=>this.#r.warn?.("[dsh-im:office] Job task ended:",a.message))}}async#c(t,o){let a=o.controller.signal,e=null;try{let A=(await this.#A.getJob(t,{signal:a}))?.job;if(!A||A.id!==t)throw new Error("Office returned an invalid Job payload");let r=await this.#A.acceptJob(t,{signal:a});if(!sa(r?.leaseToken,200))throw new Error("Office returned an invalid Job lease");o.leaseToken=r.leaseToken,e=this.#d(t,o);let s=this.#e.workspaces[A.workspaceAlias],g=this.#e.instructionPresets[A.instructionPreset];if(!s||!g){let I=new Error(w("Office Job \u5F15\u7528\u4E86\u672C\u673A\u672A\u914D\u7F6E\u7684 Workspace/Preset alias\u3002"));throw I.code="office-job-alias-invalid",I}o.harness=this.#t({workspace:s}),await this.#p(t,o,{kind:"status",message:w("\u5DF2\u9886\u53D6 Job\uFF0C\u51C6\u5907 Workspace alias\uFF1A{alias}",{alias:A.workspaceAlias})},!0),o.sessionId=await o.harness.createSession({signal:a,workspace:s}),await this.#p(t,o,{kind:"status",message:w("Harness Session \u5DF2\u521B\u5EFA\u3002"),sessionId:o.sessionId},!0);let c=await o.harness.ask(o.sessionId,Mye(A,g),{timeoutMs:30*6e4,signal:a,onUpdate:I=>this.#n(t,o,I),onInteraction:I=>this.#h(t,o,I),onInteractionResolved:I=>{let d=sa(I?.interactionId,180);o.approvals.get(d)?.resolve({decision:"rejected",answer:""})}});if(a.aborted)throw a.reason??fp();await this.#A.completeJob(t,o.leaseToken,{resultMarkdown:c,sessionId:o.sessionId},{signal:a}),this.#s.completed+=1,this.#u(t)}catch(i){if(!o.cancelled&&o.leaseToken&&(await this.#A.failJob(t,o.leaseToken,{error:bye(i),...o.sessionId?{sessionId:o.sessionId}:{}}).catch(()=>{}),this.#s.failed+=1),i?.code==="office-job-conflict"||i?.code==="office-hook-unavailable"){this.#u(t);return}!o.cancelled&&!a.aborted&&this.#r.warn?.(`[dsh-im:office] Job ${t} failed:`,i.message)}finally{o.controller.abort(fp()),await e?.catch(()=>{}),this.#s.lastJobId=t,this.#s.lastJobAt=new Date().toISOString()}}async#d(t,o){for(;!o.controller.signal.aborted;){try{await this.#I(Dye,void 0,{signal:o.controller.signal})}catch{return}try{await this.#A.renewJob(t,o.leaseToken,{signal:o.controller.signal})}catch(a){if(o.controller.signal.aborted)return;o.cancelled=!0,o.controller.abort(a),o.sessionId&&o.harness&&o.harness.rpc("session.cancel",{sessionId:o.sessionId,keepInbox:!0},1e4).catch(()=>{});return}try{let e=(await this.#A.getJob(t,{signal:o.controller.signal}))?.job?.approval;e&&(e.status==="approved"||e.status==="rejected")&&o.approvals.get(e.id)?.resolve({decision:e.status,answer:sa(e.answer)})}catch(a){if(o.controller.signal.aborted)return;this.#r.warn?.(`[dsh-im:office] Job ${t} approval poll failed; will retry after the next renewal:`,a.message)}}}async#n(t,o,a){let e=a?.type==="tool"?w("\u6B63\u5728\u4F7F\u7528 {tool}\u2026",{tool:sa(a.name,160)||w("Harness \u5DE5\u5177")}):sa(a?.text,4e3);if(!e)return;let i=`${a.type}:${e}`;if(i===o.lastProgress)return;let A=Date.now();a.type==="text"&&A-o.lastProgressAt<1e3||(o.lastProgress=i,o.lastProgressAt=A,await this.#p(t,o,{kind:a.type==="tool"?"tool":a.type==="text"?"text":"status",message:e,...o.sessionId?{sessionId:o.sessionId}:{}}))}#p(t,o,a,e=!1){let i=this.#A.progressJob(t,o.leaseToken,a,{signal:o.controller.signal});return e?i:i.catch(A=>{this.#r.debug?.("[dsh-im:office] ignored a progress delivery failure:",A.message)})}async#h(t,o,a){let e=_ye(a);if(!e){a?.kind==="approval"&&typeof a.respond=="function"&&await a.respond({ok:!0,value:{sessionId:a.sessionId,approvalId:a.payload?.approvalId,outcome:"rejected"}});return}let i=Tye(o,e.id);try{await this.#A.requestApproval(t,o.leaseToken,e,{signal:o.controller.signal});let A=await i;if(e.kind==="approval"){await a.respond({ok:!0,value:{sessionId:a.sessionId,approvalId:a.payload.approvalId,outcome:A.decision==="approved"?"allowed-once":"rejected"}});return}if(A.decision!=="approved"){await a.respond({ok:!1,error:{code:"cancelled",message:"The AI Office user rejected this question.",details:{}}});return}let r=sa(A.answer).split(/\r?\n/);await a.respond({ok:!0,value:{sessionId:a.sessionId,answer:{answers:e.questions.map((s,g)=>Na(s,r[g]||r[0]||""))}}})}catch(A){throw o.approvals.delete(e.id),A}}#u(t){this.#i.add(t),!(this.#i.size<=Oye)&&this.#i.delete(this.#i.values().next().value)}};var Jj=Object.freeze([1e3,3e3,1e4,3e4]);function Rye(n){let t=typeof n?.code=="string"?n.code:"office-connection-failed",o={"invalid-device-token":w("AI Office \u62D2\u7EDD\u4E86 Device Token\u3002"),"office-hook-unavailable":w("AI Office Connector Hook \u5C1A\u672A\u5C31\u7EEA\u3002"),"office-protocol-mismatch":w("AI Office Connector \u534F\u8BAE\u7248\u672C\u4E0D\u517C\u5BB9\u3002"),"office-transport-failed":w("\u672C\u673A\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE AI Office\u3002")};return{code:t,message:o[t]??w("AI Office \u8FDE\u63A5\u5DF2\u4E2D\u65AD\u3002")}}var Qp=class{#e;#A;#t;#r;#I;#o=null;#g=null;#i;#a;constructor({config:t,token:o,logger:a=console,transport:e,createHarness:i,jobExecutor:A,sleepImpl:r=Nye}){this.#e=t,this.#A=o,this.#t=a,this.#I=r,this.#r=e??new Yy({baseUrl:t.baseUrl,deviceId:t.deviceId,token:o}),this.#i={state:"idle",connected:!1,startedAt:null,lastHeartbeatAt:null,lastEventAt:null,lastEventId:null,lastEventType:null,reconnects:0,jobsOffered:0,error:null},this.#a=A??(i?new jy({config:t,transport:this.#r,createHarness:i,logger:a}):null)}get status(){return structuredClone({...this.#i,...this.#a?{jobs:this.#a.status}:{}})}capabilities(){return{protocolVersion:Ep,deviceId:this.#e.deviceId,workspaces:Object.keys(this.#e.workspaces),instructionPresets:Object.keys(this.#e.instructionPresets),maxConcurrency:this.#e.maxConcurrency}}async testConnection(t){return await this.#r.heartbeat({...this.capabilities(),probe:!0},{signal:t}),{ok:!0}}start(){return this.#g?this.status:(this.#o=new AbortController,this.#i.startedAt=new Date().toISOString(),this.#i.state="connecting",this.#g=this.#s(this.#o.signal).finally(()=>{this.#g=null}),this.#g.catch(t=>{this.#o?.signal.aborted||this.#t.error?.("[dsh-im:office] connector stopped:",t)}),this.status)}async#s(t){let o=0;for(;!t.aborted;){let a=new AbortController,e=AbortSignal.any([t,a.signal]);try{let i=await this.#r.heartbeat(this.capabilities(),{signal:e});this.#c(i?.jobs),this.#i.lastHeartbeatAt=new Date().toISOString();let A=!1,r=this.#l(e,()=>{A&&!e.aborted&&(o=0)}),s=this.#r.stream({signal:e,lastEventId:this.#i.lastEventId,onOpen:()=>{this.#i.connected=!0,this.#i.state="connected",this.#i.error=null,A=!0},onEvent:async g=>{this.#i.lastEventAt=new Date().toISOString(),this.#i.lastEventId=g.id??this.#i.lastEventId,this.#i.lastEventType=g.type,g.type==="job.available"&&(this.#i.jobsOffered+=1),this.#a?.handleEvent(g)}});await Promise.race([s,r])}catch(i){if(t.aborted)break;a.abort(),this.#i.connected=!1,this.#i.state="reconnecting",this.#i.error=Rye(i),this.#i.reconnects+=1;let A=Jj[Math.min(o,Jj.length-1)];o+=1;try{await this.#I(A,void 0,{signal:t})}catch{break}}finally{a.abort()}}this.#i.connected=!1,this.#i.state="idle"}async#l(t,o){for(;!t.aborted;){await this.#I(this.#e.heartbeatSeconds*1e3,void 0,{signal:t});let a=await this.#r.heartbeat(this.capabilities(),{signal:t});this.#c(a?.jobs),this.#i.lastHeartbeatAt=new Date().toISOString(),o?.()}}#c(t){if(Array.isArray(t))for(let o of t)typeof o?.id=="string"&&this.#a?.offer(o.id)&&(this.#i.jobsOffered+=1)}async stop(){let t=this.#g;return this.#o?.abort(),this.#o=null,t&&await t.catch(()=>{}),await this.#a?.close(),this.#i.connected=!1,this.#i.state="idle",this.status}};function i0(n){return typeof n=="string"&&n.trim()?n.trim():null}function vye(n,t){return`DSH_OFFICE_DEVICE_TOKEN_${kye("sha256").update(`${n} +${t}`).digest("hex").slice(0,24).toUpperCase()}`}var Jy=class{#e;#A;#t;#r;#I=null;#o=Promise.resolve();constructor({credentials:t,configStore:o,logger:a=console,createRuntime:e}){if(!t?.resolve||!t?.set||!t?.unset)throw new TypeError("AI Office requires the Harness credential provider");if(!o?.get||!o?.save||!o?.clear)throw new TypeError("AI Office requires a config store");this.#e=t,this.#A=o,this.#t=a,this.#r=e??(i=>new Qp(i))}async initialize(){let t=this.#A.get();if(t){let o=await this.#e.resolve(t.deviceTokenRef).catch(()=>{});o?.value&&await this.#i(t,o.value)}return this.status()}async configure(t={}){return this.#s(async()=>{let o=this.#A.get(),a=i0(t.baseUrl),e=i0(t.deviceId);if(!a||!e)throw new TypeError("Office URL and Device ID are required");let i=Tu(a).origin,A=vye(i,e),r=i0(t.deviceToken),s=await this.#e.resolve(A).catch(()=>{}),g=r??s?.value;if(!g||g.length<32)throw new TypeError("Device Token must contain at least 32 characters");let c=new Date().toISOString(),I=Ky({version:1,baseUrl:i,deviceId:e,deviceTokenRef:A,maxConcurrency:t.maxConcurrency,heartbeatSeconds:t.heartbeatSeconds,workspaces:t.workspaces,instructionPresets:t.instructionPresets,createdAt:o?.createdAt??c,updatedAt:c});if(!I)throw new TypeError("AI Office connector configuration is invalid");await this.#e.set(A,g);try{await this.#A.save(I)}catch(d){throw s?.value?await this.#e.set(A,s.value).catch(()=>{}):await this.#e.unset(A).catch(()=>{}),d}return o?.deviceTokenRef&&o.deviceTokenRef!==A&&await this.#e.unset(o.deviceTokenRef).catch(()=>{}),await this.#i(I,g),this.status()})}async reconnect(){return this.#s(async()=>{let t=this.#A.get();if(!t)throw new Error("AI Office connector is not configured");return await this.#i(t),this.status()})}async test(){let t=this.#A.get();if(!t)throw new Error("AI Office connector is not configured");let o=await this.#g(t),a=this.#r({config:t,token:o,logger:this.#t});try{await a.testConnection(AbortSignal.timeout(1e4))}finally{await a.stop().catch(()=>{})}return{tested:!0,snapshot:await this.status()}}async remove(){return this.#s(async()=>{let t=this.#A.get();return await this.#a(),t?.deviceTokenRef&&await this.#e.unset(t.deviceTokenRef).catch(()=>{}),await this.#A.clear(),this.status()})}async status(){let t=this.#A.get();if(!t)return{schemaVersion:1,configured:!1,connected:!1,state:"unconfigured"};let o=await this.#e.resolve(t.deviceTokenRef).catch(()=>{}),a=this.#I?.status??null;return{schemaVersion:1,configured:!0,connected:a?.connected===!0,state:a?.state??(o?.value?"idle":"missing-token"),config:{protocolVersion:t.protocolVersion,baseUrl:t.baseUrl,deviceId:t.deviceId,maxConcurrency:t.maxConcurrency,heartbeatSeconds:t.heartbeatSeconds,workspaces:t.workspaces,instructionPresets:t.instructionPresets,hooks:Hy(t.baseUrl)},health:a,tokenConfigured:!!o?.value}}async close(){await this.#o.catch(()=>{}),await this.#a()}async#g(t){let o=await this.#e.resolve(t.deviceTokenRef).catch(()=>{});if(!o?.value)throw new Error("AI Office Device Token is missing");return o.value}async#i(t,o){await this.#a();let a=o??await this.#g(t),e=this.#r({config:t,token:a,logger:this.#t});this.#I=e,e.start()}async#a(){let t=this.#I;this.#I=null,t&&await t.stop()}#s(t){let o=this.#o.then(t,t);return this.#o=o.then(()=>{},()=>{}),o}};function Gye(n={}){let t=o0(n.dshHome??process.env.DSH_HOME??a0(Pye(),".dsh")),o=o0(n.dataDir??a0(t,"integrations","dsh-office"));return{root:o,config:o0(n.configPath??a0(o,"config.json"))}}async function qj(n,t={},o={}){let a=ci(n,t),e=o.ConfigStore??xy,i=o.Controller??Jy,A=o.Runtime??Qp,r=o.HarnessClient??yr,s=Gye(t),g=await new e(s.config).load(),c=typeof n.logger=="function"?n.logger("dsh-im:office"):n.logger??console,I=o.createHarness??(({workspace:B})=>new r({...a,workspace:B,autostart:!1,dshBin:t.dshBin??"dsh",rpcIdPrefix:"office",logPrefix:"dsh-im:office"})),d=new i({credentials:n.credentials,configStore:g,logger:c,createRuntime:B=>new A({...B,createHarness:I,...o.transport?{transport:o.transport}:{}})});return await d.initialize(),{controller:d,close:()=>d.close(),paths:s}}function n0(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function Nu(n,t){return n0(n)&&Object.keys(n).every(o=>t.includes(o))}function Fye(n){return Nu(n,["baseUrl","deviceId","deviceToken","maxConcurrency","heartbeatSeconds","workspaces","instructionPresets"])&&typeof n.baseUrl=="string"&&typeof n.deviceId=="string"&&(n.deviceToken===void 0||typeof n.deviceToken=="string")&&n0(n.workspaces)&&n0(n.instructionPresets)}function Lye(n){for(let t of["status","configure","reconnect","test","remove"])if(typeof n?.[t]!="function")throw new TypeError(`AI Office controller requires ${t}()`);return async(t,o,a)=>{if(a?.aborted)return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}};try{let e;if(t===up.status&&Nu(o,[]))e=await n.status();else if(t===up.configure&&Fye(o))e=await n.configure(o);else if(t===up.reconnect&&Nu(o,[]))e=await n.reconnect();else if(t===up.test&&Nu(o,[]))e=await n.test();else if(t===up.remove&&Nu(o,["confirm"])&&o.confirm===!0)e=await n.remove();else return{ok:!1,error:{code:"bad-request",message:"Invalid AI Office connector request."}};return{ok:!0,value:e}}catch(e){let i=e?.code==="invalid-device-token"?"invalid-device-token":e?.code==="office-hook-unavailable"?"office-hook-unavailable":"office-operation-failed",A=i==="invalid-device-token"?"AI Office Device Token \u65E0\u6548\u3002":i==="office-hook-unavailable"?"AI Office Hook \u5C1A\u672A\u4E0A\u7EBF\u6216\u5730\u5740\u4E0D\u6B63\u786E\u3002":e instanceof TypeError?e.message:"AI Office \u8FDE\u63A5\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002";return{ok:!1,error:{code:i,message:A}}}}}function s0(n,t,o){return n.connection.rpc.handle(xj,Lye(t),{authority:mr(o)})}async function zj(n,t={}){if(t.controller)return s0(n,t.controller,t.rpcAuthority);let o=await qj(n,t,t.internals??{}),a=s0(n,o.controller,t.rpcAuthority);return n.effect(()=>async()=>o.close(),"dsh-im: close AI Office connector"),a}var Uye=new Set(["starting","qr_ready","polling","slow_down","domain_switched"]);function Hye(n){let t=n?.client_id??n?.appId,o=n?.client_secret??n?.appSecret;if(typeof t!="string"||t.length===0||typeof o!="string"||o.length===0)throw new TypeError("Feishu registration returned invalid credentials");return{appId:t,appSecret:o,userInfo:n?.user_info??n?.userInfo}}async function Kye(n){return typeof n.status!="function"?{}:await n.status()}function xye(n){return n?.connected===!0?!0:n?.ready===!0&&n?.feishuLongConnectionState==="connected"&&n?.harnessReachable===!0}var qy=class{#e;#A;#t;#r;#I=!1;#o=null;constructor({createProvisioningManager:t,credentialStore:o,connectionManager:a,registrationOptions:e={}}={}){if(typeof t!="function")throw new TypeError("createProvisioningManager is required");if(!o||typeof o.save!="function"||typeof o.clear!="function")throw new TypeError("credentialStore.save/clear are required");if(!a||typeof a.connect!="function"||typeof a.disconnect!="function")throw new TypeError("connectionManager.connect/disconnect are required");if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError("registrationOptions must be an object");if(this.#e=o,this.#A=a,this.#t=structuredClone(e),this.#r=t({onCredentials:i=>this.#g(i)}),!this.#r||typeof this.#r.start!="function"||typeof this.#r.status!="function"||typeof this.#r.cancel!="function")throw new TypeError("The provisioning manager must implement start/status/cancel")}async startRegistration(){return this.#o=null,await this.#r.start(structuredClone(this.#t)),this.status()}async cancelRegistration(){return await this.#r.cancel(),this.status()}async disconnect(){await this.#r.cancel(),await this.#A.disconnect();try{await this.#e.clear(),this.#I=!1,this.#o=null}catch{this.#o={code:"credential_removal_failed",message:"Unable to remove the Feishu credentials."}}return this.status()}async status(){let t=await this.#r.status(),o=await Kye(this.#A),a=xye(o),e=this.#I;if(typeof this.#e.configured=="function")try{e=await this.#e.configured()}catch{e=this.#I}let i="unconfigured";return a?i="connected":Uye.has(t?.state)?i="registering":t?.state==="saving"?i="connecting":this.#o||t?.state==="error"?i="error":e&&(i="disconnected"),{phase:i,connected:a,configured:e,registration:t,connection:o,error:this.#o??t?.error??null}}async close(){await this.#r.cancel(),await this.#A.disconnect()}async#g(t){let o=Hye(t);try{await this.#e.save(o),this.#I=!0,await this.#A.connect(o),this.#o=null}catch{throw this.#o={code:"connection_failed",message:"The bot was created, but its connection could not be started."},new Error("Unable to activate the Feishu connection.")}}};function g0(n){return new qy(n)}import{homedir as wFe}from"node:os";import{join as Eh,resolve as eI}from"node:path";import{unlink as DFe}from"node:fs/promises";var aG={};Ur(aG,{AESCipher:()=>YC,AccessTokenError:()=>sh,Aily:()=>vP,AppType:()=>Rs,CAppTicket:()=>xC,CTenantAccessToken:()=>FC,CardActionHandler:()=>TP,Client:()=>MS,ClientAssertionError:()=>ca,DefaultCache:()=>DS,Domain:()=>ks,EventDispatcher:()=>TS,LarkChannel:()=>GS,LarkChannelError:()=>Kt,LoggerLevel:()=>Bo,LoggerProxy:()=>Wc,WSClient:()=>RS,adaptDefault:()=>Rke,adaptExpress:()=>kke,adaptKoa:()=>vke,adaptKoaRouter:()=>Pke,createLarkChannel:()=>fPe,defaultHttpInstance:()=>gh,defaultLogger:()=>xg,generateChallenge:()=>JC,internalCache:()=>jC,messageCard:()=>Fke,normalize:()=>v5,normalizeBotAdded:()=>R5,normalizeCardAction:()=>N5,normalizeComment:()=>k5,normalizeReaction:()=>zP,registerApp:()=>Vke,withAll:()=>Oke,withHelpDeskCredential:()=>Mke,withTenantKey:()=>bke,withTenantToken:()=>_ke,withUserAccessToken:()=>Tke});function Ru(n,t){return function(){return n.apply(t,arguments)}}var{toString:Yye}=Object.prototype,{getPrototypeOf:yp}=Object,{iterator:vu,toStringTag:Zj}=Symbol,Vy=(({hasOwnProperty:n})=>(t,o)=>n.call(t,o))(Object.prototype),ku=(n,t)=>{let o=n,a=[];for(;o!=null&&o!==Object.prototype;){if(a.indexOf(o)!==-1)return!1;if(a.push(o),Vy(o,t))return!0;o=yp(o)}return!1},jye=(n,t)=>n!=null&&ku(n,t)?n[t]:void 0,I0=(n=>t=>{let o=Yye.call(t);return n[o]||(n[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),jo=n=>(n=n.toLowerCase(),t=>I0(t)===n),Wy=n=>t=>typeof t===n,{isArray:gl}=Array,cl=Wy("undefined");function mp(n){return n!==null&&!cl(n)&&n.constructor!==null&&!cl(n.constructor)&&Ya(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}var Xj=jo("ArrayBuffer");function Jye(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Xj(n.buffer),t}var qye=Wy("string"),Ya=Wy("function"),$j=Wy("number"),Sp=n=>n!==null&&typeof n=="object",zye=n=>n===!0||n===!1,zy=n=>{if(!Sp(n))return!1;let t=yp(n);return(t===null||t===Object.prototype||yp(t)===null)&&!ku(n,Zj)&&!ku(n,vu)},Vye=n=>{if(!Sp(n)||mp(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},Wye=jo("Date"),Zye=jo("File"),Xye=n=>!!(n&&typeof n.uri<"u"),$ye=n=>n&&typeof n.getParts<"u",eme=jo("Blob"),Ame=jo("FileList"),tme=jo("Set"),rme=n=>Sp(n)&&Ya(n.pipe);function ime(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var Vj=ime(),Wj=typeof Vj.FormData<"u"?Vj.FormData:void 0,ame=n=>{if(!n)return!1;if(Wj&&n instanceof Wj)return!0;let t=yp(n);if(!t||t===Object.prototype||!Ya(n.append))return!1;let o=I0(n);return o==="formdata"||o==="object"&&Ya(n.toString)&&n.toString()==="[object FormData]"},ome=jo("URLSearchParams"),[nme,sme,gme,cme]=["ReadableStream","Request","Response","Headers"].map(jo),Ime=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Pu(n,t,{allOwnKeys:o=!1}={}){if(n===null||typeof n>"u")return;let a,e;if(typeof n!="object"&&(n=[n]),gl(n))for(a=0,e=n.length;a0;)if(e=o[a],t===e.toLowerCase())return e;return null}var sl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,AJ=n=>!cl(n)&&n!==sl;function c0(...n){let{caseless:t,skipUndefined:o}=AJ(this)&&this||{},a={},e=(i,A)=>{if(A==="__proto__"||A==="constructor"||A==="prototype")return;let r=t&&typeof A=="string"&&eJ(a,A)||A,s=Vy(a,r)?a[r]:void 0;zy(s)&&zy(i)?a[r]=c0(s,i):zy(i)?a[r]=c0({},i):gl(i)?a[r]=i.slice():(!o||!cl(i))&&(a[r]=i)};for(let i=0,A=n.length;i(Pu(t,(e,i)=>{o&&Ya(e)?Object.defineProperty(n,i,{__proto__:null,value:Ru(e,o),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,i,{__proto__:null,value:e,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:a}),n),dme=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),pme=(n,t,o,a)=>{n.prototype=Object.create(t.prototype,a),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),o&&Object.assign(n.prototype,o)},hme=(n,t,o,a)=>{let e,i,A,r={};if(t=t||{},n==null)return t;do{for(e=Object.getOwnPropertyNames(n),i=e.length;i-- >0;)A=e[i],(!a||a(A,n,t))&&!r[A]&&(t[A]=n[A],r[A]=!0);n=o!==!1&&yp(n)}while(n&&(!o||o(n,t))&&n!==Object.prototype);return t},Eme=(n,t,o)=>{n=String(n),(o===void 0||o>n.length)&&(o=n.length),o-=t.length;let a=n.indexOf(t,o);return a!==-1&&a===o},ume=n=>{if(!n)return null;if(gl(n))return n;let t=n.length;if(!$j(t))return null;let o=new Array(t);for(;t-- >0;)o[t]=n[t];return o},Cme=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&yp(Uint8Array)),Bme=(n,t)=>{let a=(n&&n[vu]).call(n),e;for(;(e=a.next())&&!e.done;){let i=e.value;t.call(n,i[0],i[1])}},fme=(n,t)=>{let o,a=[];for(;(o=n.exec(t))!==null;)a.push(o);return a},Qme=jo("HTMLFormElement"),yme=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,a,e){return a.toUpperCase()+e}),{propertyIsEnumerable:mme}=Object.prototype,Sme=jo("RegExp"),tJ=(n,t)=>{let o=Object.getOwnPropertyDescriptors(n),a={};Pu(o,(e,i)=>{let A;(A=t(e,i,n))!==!1&&(a[i]=A||e)}),Object.defineProperties(n,a)},wme=n=>{tJ(n,(t,o)=>{if(Ya(n)&&["arguments","caller","callee"].includes(o))return!1;let a=n[o];if(Ya(a)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},Dme=(n,t)=>{let o={},a=e=>{e.forEach(i=>{o[i]=!0})};return gl(n)?a(n):a(String(n).split(t)),o},Ome=()=>{},bme=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function Mme(n){return!!(n&&Ya(n.append)&&n[Zj]==="FormData"&&n[vu])}var _me=n=>{let t=new WeakSet,o=a=>{if(Sp(a)){if(t.has(a))return;if(mp(a))return a;if(!("toJSON"in a)){t.add(a);let e;if(tme(a)){e=[];for(let i of a){let A=o(i);!cl(A)&&e.push(A)}}else e=gl(a)?[]:{},Pu(a,(i,A)=>{let r=o(i);!cl(r)&&(e[A]=r)});return t.delete(a),e}}return a};return o(n)},Tme=jo("AsyncFunction"),Nme=n=>n&&(Sp(n)||Ya(n))&&Ya(n.then)&&Ya(n.catch),rJ=((n,t)=>n?setImmediate:t?((o,a)=>(sl.addEventListener("message",({source:e,data:i})=>{e===sl&&i===o&&a.length&&a.shift()()},!1),e=>{a.push(e),sl.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",Ya(sl.postMessage)),Rme=typeof queueMicrotask<"u"?queueMicrotask.bind(sl):typeof process<"u"&&process.nextTick||rJ,iJ=n=>n!=null&&Ya(n[vu]),kme=n=>n!=null&&ku(n,vu)&&iJ(n),Z={isArray:gl,isArrayBuffer:Xj,isBuffer:mp,isFormData:ame,isArrayBufferView:Jye,isString:qye,isNumber:$j,isBoolean:zye,isObject:Sp,isPlainObject:zy,isEmptyObject:Vye,isReadableStream:nme,isRequest:sme,isResponse:gme,isHeaders:cme,isUndefined:cl,isDate:Wye,isFile:Zye,isReactNativeBlob:Xye,isReactNative:$ye,isBlob:eme,isRegExp:Sme,isFunction:Ya,isStream:rme,isURLSearchParams:ome,isTypedArray:Cme,isFileList:Ame,forEach:Pu,merge:c0,extend:lme,trim:Ime,stripBOM:dme,inherits:pme,toFlatObject:hme,kindOf:I0,kindOfTest:jo,endsWith:Eme,toArray:ume,forEachEntry:Bme,matchAll:fme,isHTMLForm:Qme,hasOwnProperty:Vy,hasOwnProp:Vy,hasOwnInPrototypeChain:ku,getSafeProp:jye,reduceDescriptors:tJ,freezeMethods:wme,toObjectSet:Dme,toCamelCase:yme,noop:Ome,toFiniteNumber:bme,findKey:eJ,global:sl,isContextDefined:AJ,isSpecCompliantForm:Mme,toJSONObject:_me,isAsyncFn:Tme,isThenable:Nme,setImmediate:rJ,asap:Rme,isIterable:iJ,isSafeIterable:kme};var vme=Z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),aJ=n=>{let t={},o,a,e;return n&&n.split(` +`).forEach(function(A){e=A.indexOf(":"),o=A.substring(0,e).trim().toLowerCase(),a=A.substring(e+1).trim();let r=Z.hasOwnProp(t,o);!o||r&&Z.hasOwnProp(vme,o)||(o==="set-cookie"?r?t[o].push(a):t[o]=[a]:t[o]=r?t[o]+", "+a:a)}),t};function Pme(n){let t=0,o=n.length;for(;tt;){let a=n.charCodeAt(o-1);if(a!==9&&a!==32)break;o-=1}return t===0&&o===n.length?n:n.slice(t,o)}var Gme=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Fme=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function l0(n,t){return Z.isArray(n)?n.map(o=>l0(o,t)):Pme(String(n).replace(t,""))}var oJ=n=>l0(n,Gme),Lme=n=>l0(n,Fme);function wp(n){let t=Object.create(null);return Z.forEach(n.toJSON(),(o,a)=>{t[a]=Lme(o)}),t}var nJ=Symbol("internals");function Gu(n){return n&&String(n).trim().toLowerCase()}function Zy(n){return n===!1||n==null?n:Z.isArray(n)?n.map(Zy):oJ(String(n))}function Ume(n){let t=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,a;for(;a=o.exec(n);)t[a[1]]=a[2];return t}var Hme=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function d0(n){let t=0,o=n.length;for(;tt;){let a=n.charCodeAt(o-1);if(a!==9&&a!==32)break;o-=1}return t===0&&o===n.length?n:n.slice(t,o)}function Kme(n){let t=n.length-1;if(t<1||n.charCodeAt(0)!==34||n.charCodeAt(t)!==34)return n;let o="";for(let a=1;a=t))return n;o+=n[a]}return o}function xme(n){let t=Object.create(null),o=String(n),a=0,e=!1,i=!1;function A(r){let s=d0(o.slice(a,r)),g=s.indexOf("=");if(g<1)return;let c=d0(s.slice(0,g));if(!Hme.test(c))return;let I=c.toLowerCase();if(I==="__proto__"||I==="constructor"||I==="prototype")return;let d=d0(s.slice(g+1));t[I]=Kme(d)}for(let r=0;r/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function p0(n,t,o,a,e){if(Z.isFunction(a))return a.call(this,t,o);if(e&&(t=o),!!Z.isString(t)){if(Z.isString(a))return t.indexOf(a)!==-1;if(Z.isRegExp(a))return a.test(t)}}function jme(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,o,a)=>o.toUpperCase()+a)}function Jme(n,t){let o=Z.toCamelCase(" "+t);["get","set","has"].forEach(a=>{Object.defineProperty(n,a+o,{__proto__:null,value:function(e,i,A){return this[a].call(this,t,e,i,A)},configurable:!0})})}var Dp=class{constructor(t){t&&this.set(t)}set(t,o,a){let e=this;function i(r,s,g){let c=Gu(s);if(!c)return;let I=Z.findKey(e,c);(!I||e[I]===void 0||g===!0||g===void 0&&e[I]!==!1)&&(e[I||s]=Zy(r))}let A=(r,s)=>Z.forEach(r,(g,c)=>i(g,c,s));if(Z.isPlainObject(t)||t instanceof this.constructor)A(t,o);else if(Z.isString(t)&&(t=t.trim())&&!Yme(t))A(aJ(t),o);else if(Z.isObject(t)&&Z.isSafeIterable(t)){let r=Object.create(null),s,g;for(let c of t){if(!Z.isArray(c))throw new TypeError("Object iterator must return a key-value pair");g=c[0],Z.hasOwnProp(r,g)?(s=r[g],r[g]=Z.isArray(s)?[...s,c[1]]:[s,c[1]]):r[g]=c[1]}A(r,o)}else t!=null&&i(o,t,a);return this}get(t,o){if(t=Gu(t),t){let a=Z.findKey(this,t);if(a){let e=this[a];if(!o)return e;if(o===!0)return Ume(e);if(Z.isFunction(o))return o.call(this,e,a);if(Z.isRegExp(o))return o.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,o){if(t=Gu(t),t){let a=Z.findKey(this,t);return!!(a&&this[a]!==void 0&&(!o||p0(this,this[a],a,o)))}return!1}delete(t,o){let a=this,e=!1;function i(A){if(A=Gu(A),A){let r=Z.findKey(a,A);r&&(!o||p0(a,a[r],r,o))&&(delete a[r],e=!0)}}return Z.isArray(t)?t.forEach(i):i(t),e}clear(t){let o=Object.keys(this),a=o.length,e=!1;for(;a--;){let i=o[a];(!t||p0(this,this[i],i,t,!0))&&(delete this[i],e=!0)}return e}normalize(t){let o=this,a={};return Z.forEach(this,(e,i)=>{let A=Z.findKey(a,i);if(A){o[A]=Zy(e),delete o[i];return}let r=t?jme(i):String(i).trim();r!==i&&delete o[i],o[r]=Zy(e),a[r]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let o=Object.create(null);return Z.forEach(this,(a,e)=>{a!=null&&a!==!1&&(o[e]=t&&Z.isArray(a)?a.join(", "):a)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,o])=>t+": "+o).join(` +`)}getSetCookie(){let t=this.get("set-cookie");return Z.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return xme(t)}static concat(t,...o){let a=new this(t);return o.forEach(e=>a.set(e)),a}static accessor(t){let a=(this[nJ]=this[nJ]={accessors:{}}).accessors,e=this.prototype;function i(A){let r=Gu(A);a[r]||(Jme(e,A),a[r]=!0)}return Z.isArray(t)?t.forEach(i):i(t),this}};Dp.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Z.reduceDescriptors(Dp.prototype,({value:n},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(a){this[o]=a}}});Z.freezeMethods(Dp);var jt=Dp;var Fu="[REDACTED ****]";function qme(n){if(Z.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(Z.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function zme(n,t){let o=new Set(t.map(i=>String(i).toLowerCase())),a=[],e=i=>{if(i===null||typeof i!="object"||Z.isBuffer(i))return i;if(a.indexOf(i)!==-1)return;i instanceof jt&&(i=i.toJSON()),a.push(i);let A;if(Z.isArray(i))A=[],i.forEach((r,s)=>{let g=e(r);Z.isUndefined(g)||(A[s]=g)});else{if(!Z.isPlainObject(i)&&qme(i))return a.pop(),i;A=Object.create(null);for(let[r,s]of Object.entries(i)){let g=o.has(r.toLowerCase())?Fu:e(s);Z.isUndefined(g)||(A[r]=g)}}return a.pop(),A};return e(n)}function sJ(n){try{return String(n)}catch{return""}}function Vme(n){return n.errors.map(o=>{try{return o&&o.message?sJ(o.message):sJ(o)}catch{return""}}).filter(Boolean).join("; ")||n.name||"AggregateError"}var Ri=class n extends Error{static from(t,o,a,e,i,A){let r=t.message;!r&&Z.isArray(t.errors)&&t.errors.length&&(r=Vme(t));let s=new n(r,o||t.code,a,e,i);return Object.defineProperty(s,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),A&&Object.assign(s,A),s}constructor(t,o,a,e,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,o&&(this.code=o),a&&(this.config=a),e&&(this.request=e),i&&(this.response=i,this.status=i.status)}toJSON(){let t=this.config,o=t&&Z.hasOwnProp(t,"redact")?t.redact:void 0,a=Z.isArray(o)&&o.length>0?zme(t,o):Z.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a,code:this.code,status:this.status}}};Ri.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Ri.ERR_BAD_OPTION="ERR_BAD_OPTION";Ri.ECONNABORTED="ECONNABORTED";Ri.ETIMEDOUT="ETIMEDOUT";Ri.ECONNREFUSED="ECONNREFUSED";Ri.ERR_NETWORK="ERR_NETWORK";Ri.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Ri.ERR_DEPRECATED="ERR_DEPRECATED";Ri.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Ri.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Ri.ERR_CANCELED="ERR_CANCELED";Ri.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Ri.ERR_INVALID_URL="ERR_INVALID_URL";Ri.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var Oe=Ri;var c4=ze(g4(),1),nm=c4.default;var sm={isBufferAvailable(){return typeof Buffer<"u"},from(n){return Buffer.from(n)}};var F0=100;function G0(n){return Z.isPlainObject(n)||Z.isArray(n)}function I4(n){return Z.endsWith(n,"[]")?n.slice(0,-2):n}function P0(n,t,o){return n?n.concat(t).map(function(e,i){return e=I4(e),!o&&i?"["+e+"]":e}).join(o?".":""):t}function kwe(n){return Z.isArray(n)&&!n.some(G0)}var vwe=Z.toFlatObject(Z,{},null,function(t){return/^is[A-Z]/.test(t)});function Pwe(n,t,o){if(!Z.isObject(n))throw new TypeError("target must be an object");t=t||new(nm||FormData),o=Z.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,T){return!Z.isUndefined(T[_])});let a=o.metaTokens,e=o.visitor||f,i=o.dots,A=o.indexes,r=o.Blob||typeof Blob<"u"&&Blob,s=o.maxDepth===void 0?F0:o.maxDepth,g=r&&Z.isSpecCompliantForm(t),c=[];if(!Z.isFunction(e))throw new TypeError("visitor must be a function");function I(m){if(m===null)return"";if(Z.isDate(m))return m.toISOString();if(Z.isBoolean(m))return m.toString();if(!g&&Z.isBlob(m))throw new Oe("Blob is not supported. Use a Buffer instead.");if(Z.isArrayBuffer(m)||Z.isTypedArray(m)){if(g&&typeof r=="function")return new r([m]);if(sm&&sm.isBufferAvailable())return sm.from(m);throw new Oe("Blob is not supported. Use a Buffer instead.",Oe.ERR_NOT_SUPPORT)}return m}function d(m){if(m>s)throw new Oe("Object is too deeply nested ("+m+" levels). Max depth: "+s,Oe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function B(m,_){if(s===1/0)return JSON.stringify(m);let T=[];return JSON.stringify(m,function(L,U){if(!Z.isObject(U))return U;for(;T.length&&T[T.length-1]!==this;)T.pop();return T.push(U),d(_+T.length-1),U})}function f(m,_,T){let R=m;if(Z.isReactNative(t)&&Z.isReactNativeBlob(m))return t.append(P0(T,_,i),I(m)),!1;if(m&&!T&&typeof m=="object"){if(Z.endsWith(_,"{}"))_=a?_:_.slice(0,-2),m=B(m,1);else if(Z.isArray(m)&&kwe(m)||(Z.isFileList(m)||Z.endsWith(_,"[]"))&&(R=Z.toArray(m)))return _=I4(_),R.forEach(function(U,F){!(Z.isUndefined(U)||U===null)&&t.append(A===!0?P0([_],F,i):A===null?_:_+"[]",I(U))}),!1}return G0(m)?!0:(t.append(P0(T,_,i),I(m)),!1)}let Q=Object.assign(vwe,{defaultVisitor:f,convertValue:I,isVisitable:G0});function y(m,_,T=0){if(!Z.isUndefined(m)){if(d(T),c.indexOf(m)!==-1)throw new Error("Circular reference detected in "+_.join("."));c.push(m),Z.forEach(m,function(L,U){(!(Z.isUndefined(L)||L===null)&&e.call(t,L,Z.isString(U)?U.trim():U,_,Q))===!0&&y(L,_?_.concat(U):[U],T+1)}),c.pop()}}if(!Z.isObject(n))throw new TypeError("data must be an object");return y(n),t}var Gc=Pwe;function l4(n){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(a){return t[a]})}function d4(n,t){this._pairs=[],n&&Gc(n,this,t)}var p4=d4.prototype;p4.append=function(t,o){this._pairs.push([t,o])};p4.toString=function(t){let o=t?a=>t.call(this,a,l4):l4;return this._pairs.map(function(e){return o(e[0])+"="+o(e[1])},"").join("&")};var h4=d4;function Gwe(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ll(n,t,o){if(!t)return n;n=n||"";let a=Z.isFunction(o)?{serialize:o}:o,e=Z.getSafeProp(a,"encode")||Gwe,i=Z.getSafeProp(a,"serialize"),A;if(i?A=i(t,a):A=Z.isURLSearchParams(t)?t.toString():new h4(t,a).toString(e),A){let r=n.indexOf("#");r!==-1&&(n=n.slice(0,r)),n+=(n.indexOf("?")===-1?"?":"&")+A}return n}var L0=class{constructor(){this.handlers=[]}use(t,o,a){return this.handlers.push({fulfilled:t,rejected:o,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Z.forEach(this.handlers,function(a){a!==null&&t(a)})}},U0=L0;var Fc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0};import Lwe from"crypto";import Fwe from"url";var E4=Fwe.URLSearchParams;var H0="abcdefghijklmnopqrstuvwxyz",u4="0123456789",C4={DIGIT:u4,ALPHA:H0,ALPHA_DIGIT:H0+H0.toUpperCase()+u4},Uwe=(n=16,t=C4.ALPHA_DIGIT)=>{let o="",{length:a}=t,e=new Uint32Array(n);Lwe.randomFillSync(e);for(let i=0;ix0,hasStandardBrowserEnv:()=>Hwe,hasStandardBrowserWebWorkerEnv:()=>Kwe,navigator:()=>K0,origin:()=>xwe});var x0=typeof window<"u"&&typeof document<"u",K0=typeof navigator=="object"&&navigator||void 0,Hwe=x0&&(!K0||["ReactNative","NativeScript","NS"].indexOf(K0.product)<0),Kwe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",xwe=x0&&window.location.href||"http://localhost";var yt={...Y0,...B4};function j0(n,t){return Gc(n,new yt.classes.URLSearchParams,{visitor:function(o,a,e,i){return yt.isNode&&Z.isBuffer(o)?(this.append(a,o.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}var f4=F0;function Q4(n){if(n>f4)throw new Oe("FormData field is too deeply nested ("+n+" levels). Max depth: "+f4,Oe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Ywe(n){let t=[],o=/[^.[\]]+|\[([^.[\]]*)]/g,a;for(;(a=o.exec(n))!==null;)Q4(t.length),t.push(a[0]==="[]"?"":a[1]||a[0]);return t}function jwe(n){let t={},o=Object.keys(n),a,e=o.length,i;for(a=0;a=o.length;return A=!A&&Z.isArray(e)?e.length:A,s?(Z.hasOwnProp(e,A)?e[A]=Z.isArray(e[A])?e[A].concat(a):[e[A],a]:e[A]=a,!r):((!Z.hasOwnProp(e,A)||!Z.isObject(e[A]))&&(e[A]=[]),t(o,a,e[A],i)&&Z.isArray(e[A])&&(e[A]=jwe(e[A])),!r)}if(Z.isFormData(n)&&Z.isFunction(n.entries)){let o={};return Z.forEachEntry(n,(a,e)=>{t(Ywe(a),e,o,0)}),o}return null}var gm=Jwe;var Tp=(n,t)=>n!=null&&Z.hasOwnProp(n,t)?n[t]:void 0;function qwe(n,t,o){if(Z.isString(n))try{return(t||JSON.parse)(n),Z.trim(n)}catch(a){if(a.name!=="SyntaxError")throw a}return(o||JSON.stringify)(n)}var J0={transitional:Fc,adapter:["xhr","http","fetch"],transformRequest:[function(t,o){let a=o.getContentType()||"",e=a.indexOf("application/json")>-1,i=Z.isObject(t);if(i&&Z.isHTMLForm(t)&&(t=new FormData(t)),Z.isFormData(t))return e?JSON.stringify(gm(t)):t;if(Z.isArrayBuffer(t)||Z.isBuffer(t)||Z.isStream(t)||Z.isFile(t)||Z.isBlob(t)||Z.isReadableStream(t))return t;if(Z.isArrayBufferView(t))return t.buffer;if(Z.isURLSearchParams(t))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let r;if(i){let s=Tp(this,"formSerializer");if(a.indexOf("application/x-www-form-urlencoded")>-1)return j0(t,s).toString();if((r=Z.isFileList(t))||a.indexOf("multipart/form-data")>-1){let g=Tp(this,"env"),c=g&&g.FormData;return Gc(r?{"files[]":t}:t,c&&new c,s)}}return i||e?(o.setContentType("application/json",!1),qwe(t)):t}],transformResponse:[function(t){let o=Tp(this,"transitional")||J0.transitional,a=o&&o.forcedJSONParsing,e=Tp(this,"responseType"),i=e==="json";if(Z.isResponse(t)||Z.isReadableStream(t))return t;if(t&&Z.isString(t)&&(a&&!e||i)){let r=!(o&&o.silentJSONParsing)&&i;try{return JSON.parse(t,Tp(this,"parseReviver"))}catch(s){if(r)throw s.name==="SyntaxError"?Oe.from(s,Oe.ERR_BAD_RESPONSE,this,null,Tp(this,"response")):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yt.classes.FormData,Blob:yt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Z.forEach(["delete","get","head","post","put","patch","query"],n=>{J0.headers[n]={}});var Np=J0;function Yu(n,t){let o=this||Np,a=t||o,e=jt.from(a.headers),i=a.data;return Z.forEach(n,function(r){i=r.call(o,i,e.normalize(),t?t.status:void 0)}),e.normalize(),i}function ju(n){return!!(n&&n.__CANCEL__)}var q0=class extends Oe{constructor(t,o,a){super(t??"canceled",Oe.ERR_CANCELED,o,a),this.name="CanceledError",this.__CANCEL__=!0}},ho=q0;function ws(n,t,o){let a=o.config.validateStatus;!o.status||!a||a(o.status)?n(o):t(new Oe("Request failed with status code "+o.status,o.status>=400&&o.status<500?Oe.ERR_BAD_REQUEST:Oe.ERR_BAD_RESPONSE,o.config,o.request,o))}function z0(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function V0(n,t){if(!t)return n;let o=n.length;for(;o>0&&n.charCodeAt(o-1)===47;)o--;return n.slice(0,o)+"/"+t.replace(/^\/+/,"")}var zwe=/^https?:(?!\/\/)/i,Vwe=/[\t\n\r]/g;function Wwe(n){let t=0;for(;t`${o}${a}${Fu}`)}function $we(n){let t=n.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Fu}@`),o=t.indexOf("#"),e=(o===-1?t:t.slice(0,o)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Fu}`);return o===-1?e:`${e}#${Xwe(t.slice(o+1))}`}function y4(n,t){if(typeof n=="string"){let o=Zwe(n);if(zwe.test(o))throw new Oe(`Invalid URL ${JSON.stringify($we(o))}: missing "//" after protocol`,Oe.ERR_INVALID_URL,t)}}function dl(n,t,o,a){y4(t,a);let e=!z0(t);return n&&(e||o===!1)?(y4(n,a),V0(n,t)):t}var eDe={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function ADe(n){try{return new URL(n)}catch{return null}}function m4(n){var t=(typeof n=="string"?ADe(n):n)||{},o=t.protocol,a=t.host,e=t.port;if(typeof a!="string"||!a||typeof o!="string"||(o=o.split(":",1)[0],a=a.replace(/:\d*$/,""),e=parseInt(e)||eDe[o]||0,!tDe(a,e)))return"";var i=W0(o+"_proxy")||W0("all_proxy");return i&&i.indexOf("://")===-1&&(i=o+"://"+i),i}function tDe(n,t){var o=W0("no_proxy").toLowerCase();return o?o==="*"?!1:o.split(/[,\s]/).every(function(a){if(!a)return!0;var e=a.match(/^(.+):(\d+)$/),i=e?e[1]:a,A=e?parseInt(e[2]):0;return A&&A!==t?!0:/^[.*]/.test(i)?(i.charAt(0)==="*"&&(i=i.slice(1)),!n.endsWith(i)):n!==i}):!0}function W0(n){return process.env[n.toLowerCase()]||process.env[n.toUpperCase()]||""}var _N=ze(oN(),1),f8=ze(j4(),1);import C8 from"http";import B8 from"https";import TOe from"http2";import NOe from"util";import{resolve as s8}from"path";import Jo from"zlib";var _g="1.19.0";function eC(n){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}var tOe=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function BN(n,t,o){let a=o&&o.Blob||yt.classes.Blob,e=eC(n);if(t===void 0&&a&&(t=!0),e==="data"){n=e.length?n.slice(e.length+1):n;let i=tOe.exec(n);if(!i)throw new Oe("Invalid URL",Oe.ERR_INVALID_URL);let A=i[1],r=i[2],s=i[3]?"base64":"utf8",g=i[4],c="";A?c=r?A+r:A:r&&(c="text/plain"+r);let I=s==="base64"?Buffer.from(g,"base64"):Buffer.from(decodeURIComponent(g),s);if(t){if(!a)throw new Oe("Blob is not supported",Oe.ERR_NOT_SUPPORT);return new a([I],{type:c})}return I}throw new Oe("Unsupported protocol "+e,Oe.ERR_NOT_SUPPORT)}import Rn from"stream";var rOe=["content-type","content-length"];function AC(n,t,o){if(o!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([a,e])=>{rOe.includes(a.toLowerCase())&&n.set(a,e)})}import iOe from"stream";var fN=Symbol("internals"),QN=class extends iOe.Transform{constructor(t){t=Z.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(a,e)=>!Z.isUndefined(e[a])),super({readableHighWaterMark:t.chunkSize});let o=this[fN]={timeWindow:t.timeWindow,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",a=>{a==="progress"&&(o.isCaptured||(o.isCaptured=!0))})}_read(t){let o=this[fN];return o.onReadCallback&&o.onReadCallback(),super._read(t)}_transform(t,o,a){let e=this[fN],i=e.maxRate,A=this.readableHighWaterMark,r=e.timeWindow,s=1e3/r,g=i/s,c=e.minChunkSize!==!1?Math.max(e.minChunkSize,g*.01):0,I=(B,f)=>{let Q=Buffer.byteLength(B);e.bytesSeen+=Q,e.bytes+=Q,e.isCaptured&&this.emit("progress",e.bytesSeen),this.push(B)?process.nextTick(f):e.onReadCallback=()=>{e.onReadCallback=null,process.nextTick(f)}},d=(B,f)=>{let Q=Buffer.byteLength(B),y=null,m=A,_,T=0;if(i){let R=Date.now();(!e.ts||(T=R-e.ts)>=r)&&(e.ts=R,_=g-e.bytes,e.bytes=_<0?-_:0,T=0),_=g-e.bytes}if(i){if(_<=0)return setTimeout(()=>{f(null,B)},r-T);_m&&Q-m>c&&(y=B.subarray(m),B=B.subarray(0,m)),I(B,y?()=>{process.nextTick(f,null,y)}:f)};d(t,function B(f,Q){if(f)return a(f);Q?d(Q,B):a(null)})}},yN=QN;import{EventEmitter as ROe}from"events";import oOe from"util";import{Readable as nOe}from"stream";var{asyncIterator:J4}=Symbol,aOe=async function*(n){n.stream?yield*n.stream():n.arrayBuffer?yield await n.arrayBuffer():n[J4]?yield*n[J4]():yield n},hm=aOe;var sOe=yt.ALPHABET.ALPHA_DIGIT+"-_",tC=typeof TextEncoder=="function"?new TextEncoder:new oOe.TextEncoder,Cl=`\r +`,gOe=tC.encode(Cl),cOe=2,mN=class{constructor(t,o){let{escapeName:a}=this.constructor,e=Z.isString(o),i=`Content-Disposition: form-data; name="${a(t)}"${!e&&o.name?`; filename="${a(o.name)}"`:""}${Cl}`;if(e)o=tC.encode(String(o).replace(/\r?\n|\r\n?/g,Cl));else{let A=String(o.type||"application/octet-stream").replace(/[\r\n]/g,"");i+=`Content-Type: ${A}${Cl}`}this.headers=tC.encode(i+Cl),this.contentLength=e?o.byteLength:o.size,this.size=this.headers.byteLength+this.contentLength+cOe,this.name=t,this.value=o}async*encode(){yield this.headers;let{value:t}=this;Z.isTypedArray(t)?yield t:yield*hm(t),yield gOe}static escapeName(t){return String(t).replace(/[\r\n"]/g,o=>({"\r":"%0D","\n":"%0A",'"':"%22"})[o])}},IOe=(n,t,o)=>{let{tag:a="form-data-boundary",size:e=25,boundary:i=a+"-"+yt.generateString(e,sOe)}=o||{};if(!Z.isFormData(n))throw new TypeError("FormData instance required");if(i.length<1||i.length>70)throw new Error("boundary must be 1-70 characters long");let A=tC.encode("--"+i+Cl),r=tC.encode("--"+i+"--"+Cl),s=r.byteLength,g=Array.from(n.entries()).map(([I,d])=>{let B=new mN(I,d);return s+=B.size,B});s+=A.byteLength*g.length,s=Z.toFiniteNumber(s);let c={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(s)&&(c["Content-Length"]=s),t&&t(c),nOe.from((async function*(){for(let I of g)yield A,yield*I.encode();yield r})())},q4=IOe;import lOe from"stream";var SN=class extends lOe.Transform{__transform(t,o,a){this.push(t),a()}_transform(t,o,a){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let e=Buffer.alloc(2);e[0]=120,e[1]=156,this.push(e,o)}this.__transform(t,o,a)}},z4=SN;import dOe from"http2";import pOe from"util";var wN=class{constructor(){this.sessions=Object.create(null)}getSession(t,o){o=Object.assign({sessionTimeout:1e3},o);let a=this.sessions[t];if(a){let I=a.length;for(let d=0;d{if(i)return;i=!0,A&&(clearTimeout(A),A=null);let I=a,d=I.length,B=d;for(;B--;)if(I[B][0]===e){d===1?delete this.sessions[t]:I.splice(B,1),e.closed||e.close();return}},s=e.request,{sessionTimeout:g}=o;if(g!=null){let I=0;e.request=function(){let d=s.apply(this,arguments);return I++,A&&(clearTimeout(A),A=null),d.once("close",()=>{--I||(A=setTimeout(()=>{A=null,r()},g))}),d}}e.once("close",r);let c=[e,o];return a?a.push(c):a=this.sessions[t]=[c],e}},V4=wN;var hOe=(n,t)=>Z.isAsyncFn(n)?function(...o){let a=o.pop();n.apply(this,o).then(e=>{try{t?a(null,...t(e)):a(null,e)}catch(i){a(i)}},a)}:n,W4=hOe;var EOe=new Set(["localhost","0.0.0.0"]),$4=n=>{let t=n.split(".");return t.length!==4||t[0]!=="127"?!1:t.every(o=>/^\d+$/.test(o)&&Number(o)>=0&&Number(o)<=255)},DN=n=>{if(/^0[xX][0-9a-fA-F]+$/.test(n)){let t=parseInt(n.slice(2),16);return Number.isFinite(t)?t:null}if(n.length>1&&/^0[0-7]+$/.test(n)){let t=parseInt(n,8);return Number.isFinite(t)?t:null}if(n.length>1&&/^0[0-9]+$/.test(n))return null;if(/^[0-9]+$/.test(n)){let t=parseInt(n,10);return Number.isFinite(t)?t:null}return null},uOe=n=>{if(typeof n!="string"||!n||n.indexOf(":")!==-1)return n;let t=n;if(t.charAt(0)==="["&&t.charAt(t.length-1)==="]"&&(t=t.slice(1,-1)),t=t.replace(/\.+$/,""),!/^[0-9.xXa-fA-F]+$/.test(t))return n;let o=t.split(".");if(o.some(c=>c===""))return n;if(o.length===4){let c=o.map(DN);return c.some(I=>I===null||I<0||I>255)?n:c.join(".")}if(o.length>4||o.length===1)return n;let a=o.slice(0,-1),e=o[o.length-1],i=4-a.length,A=DN(e);if(A===null)return n;let r=(1<<8*i)-1;if(A<0||A>r)return n;let s=new Array(i).fill(0);for(let c=i-1,I=A;c>=0;c--,I>>=8)s[c]=I&255;let g=a.map(DN);return g.some(c=>c===null||c<0||c>255)?n:[...g,...s].join(".")},ON=n=>/^0{1,4}$/.test(n),COe=n=>{if(n==="::")return!0;let t=n.indexOf("::");if(t!==-1){if(t!==n.lastIndexOf("::"))return!1;let a=n.slice(0,t),e=n.slice(t+2),i=a?a.split(":"):[],A=e?e.split(":"):[];return i.length+A.length<8&&i.every(ON)&&A.every(ON)}let o=n.split(":");return o.length===8&&o.every(ON)},BOe=n=>{if(n==="::1")return!0;let t=n.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(t)return $4(t[1]);let o=n.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(o){let e=parseInt(o[1],16);return e>=32512&&e<=32767}let a=n.split(":");if(a.length===8){for(let e=0;e<7;e++)if(!/^0+$/.test(a[e]))return!1;return/^0*1$/.test(a[7])}return!1},Z4=n=>n?EOe.has(n)||$4(n)||COe(n)?!0:BOe(n):!1,fOe={http:80,https:443,ws:80,wss:443,ftp:21},QOe=n=>{let t=n,o=0;if(t.charAt(0)==="["){let i=t.indexOf("]");if(i!==-1){let A=t.slice(1,i),r=t.slice(i+1);return r.charAt(0)===":"&&/^\d+$/.test(r.slice(1))&&(o=Number.parseInt(r.slice(1),10)),[A,o]}}let a=t.indexOf(":"),e=t.lastIndexOf(":");return a!==-1&&a===e&&/^\d+$/.test(t.slice(e+1))&&(o=Number.parseInt(t.slice(e+1),10),t=t.slice(0,e)),[t,o]},yOe=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,mOe=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,SOe=n=>{if(typeof n!="string"||n.indexOf(":")===-1)return n;let t=n.match(yOe);if(t)return t[1];let o=n.match(mOe);if(o){let a=parseInt(o[1],16),e=parseInt(o[2],16);return`${a>>8}.${a&255}.${e>>8}.${e&255}`}return n},X4=n=>{if(!n)return n;n.charAt(0)==="["&&n.charAt(n.length-1)==="]"&&(n=n.slice(1,-1));let t=n.replace(/\.+$/,""),o=uOe(t);return o!==t?o:SOe(t)};function bN(n){let t;try{t=new URL(n)}catch{return!1}let o=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!o)return!1;if(o==="*")return!0;let a=Number.parseInt(t.port,10)||fOe[t.protocol.split(":",1)[0]]||0,e=X4(t.hostname.toLowerCase());return o.split(/[\s,]+/).some(i=>{if(!i)return!1;if(i==="*")return!0;let[A,r]=QOe(i);return A=X4(A),!A||r&&r!==a?!1:(A.charAt(0)==="*"&&(A=A.slice(1)),A.charAt(0)==="."?e.endsWith(A):e===A||Z4(e)&&Z4(A))})}function wOe(n,t){n=n||10;let o=new Array(n),a=new Array(n),e=0,i=0,A;return t=t!==void 0?t:1e3,function(s){let g=Date.now(),c=a[i];A||(A=g),o[e]=s,a[e]=g;let I=i,d=0;for(;I!==e;)d+=o[I++],I=I%n;if(e=(e+1)%n,e===i&&(i=(i+1)%n),g-A{o=c,e=null,i&&(clearTimeout(i),i=null),n(...g)};return[(...g)=>{let c=Date.now(),I=c-o;I>=a?A(g,c):(e=g,i||(i=setTimeout(()=>{i=null,A(e)},a-I)))},()=>e&&A(e)]}var A8=DOe;var Tg=(n,t,o=3)=>{let a=0,e=e8(50,250);return A8(i=>{if(!i||typeof i.loaded!="number")return;let A=i.loaded,r=i.lengthComputable?i.total:void 0,s=Math.max(0,r!=null?Math.min(A,r):A),g=Math.max(0,s-a),c=e(g);a=Math.max(a,s);let I={loaded:s,total:r,progress:r?s/r:void 0,bytes:g,rate:c||void 0,estimated:c&&r?(r-s)/c:void 0,event:i,lengthComputable:r!=null,[t?"download":"upload"]:!0};n(I)},o)},Gp=(n,t)=>{let o=n!=null;return[a=>t[0]({lengthComputable:o,total:n,loaded:a}),t[1]]},Fp=(n,t=Z.asap)=>(...o)=>t(()=>n(...o));var t8=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,i8=(n,t,o)=>t+2n<=57?n-48:(n&223)-55,OOe=n=>n>=65&&n<=90||n>=97&&n<=122||n>=48&&n<=57||n===43||n===47||n===45||n===95,bOe=n=>n===9||n===10||n===12||n===13||n===32,MOe=n=>{let t=Math.floor(n/4),o=n%4;return t*3+(o===2?1:o===3?2:0)},a8=n=>{let t=n.length,o=0;return t>0&&n.charCodeAt(t-1)===61&&(o++,t>1&&n.charCodeAt(t-2)===61&&o++),Math.floor((t-o)*3/4)},_Oe=n=>{let t=n.length,o=0,a=0,e=!1;for(let i=0;i0){e=!0;continue}o++}}return e||a>2||a>0&&(o+a)%4!==0||o%4===1?a8(n):MOe(o)},o8=(n,t)=>{if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;let o=n.indexOf(",");if(o<0)return 0;let a=n.slice(5,o),e=n.slice(o+1);if(/;base64/i.test(a))return t(e);let A=0;for(let r=0,s=e.length;r=55296&&g<=56319&&r+1=56320&&c<=57343?(A+=4,r++):A+=3}else A+=3}return A};function MN(n){let t=typeof n=="string"?n.indexOf("#"):-1;return o8(t===-1?n:n.slice(0,t),_Oe)}function n8(n){return o8(n,a8)}var g8={flush:Jo.constants.Z_SYNC_FLUSH,finishFlush:Jo.constants.Z_SYNC_FLUSH},kOe={flush:Jo.constants.BROTLI_OPERATION_FLUSH,finishFlush:Jo.constants.BROTLI_OPERATION_FLUSH},vOe={flush:Jo.constants.ZSTD_e_flush,finishFlush:Jo.constants.ZSTD_e_flush},Q8=Z.isFunction(Jo.createBrotliDecompress),y8=Z.isFunction(Jo.createZstdDecompress),m8="gzip, compress, deflate"+(Q8?", br":""),POe=m8+(y8?", zstd":""),c8=typeof process<"u"&&process.nextTick?process.nextTick.bind(process):Z.asap,{http:GOe,https:FOe}=f8.default,TN=/https:?/,I8=Symbol("axios.http.socketListener"),Em=Symbol("axios.http.currentReq"),S8=Symbol("axios.http.installedTunnel"),LOe=new Map,l8=new WeakMap,d8={22:21,24:5};function UOe(n=process.versions&&process.versions.node){if(!n)return!1;let[t,o]=n.split(".").map(a=>Number(a));return!Number.isInteger(t)||!Number.isInteger(o)?!1:t>24?!0:d8[t]!=null&&o>=d8[t]}function HOe(n,t=process.versions&&process.versions.node){if(!UOe(t))return!1;let o=n&&n.options;return!!(o&&Z.hasOwnProp(o,"proxyEnv")&&o.proxyEnv!=null)}function KOe(n,t,o){return TN.test(n.protocol)?o||B8.globalAgent:t||C8.globalAgent}function xOe(n,t){let o=n.protocol+"//"+n.hostname+":"+(n.port||"")+"#"+(n.auth||""),a=t?l8.get(t)||l8.set(t,new Map).get(t):LOe,e=a.get(o);if(e)return e;let i=t&&t.options?{...t.options,...n}:n;if(e=new _N.default(i),t&&t.options){let A={...t.options},r=e.callback;e.callback=function(g,c){return r.call(this,g,{...A,...c})}}return e[S8]=!0,a.set(o,e),e}var p8=yt.protocols.map(n=>n+":"),h8=n=>{if(!Z.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},E8=(n,[t,o])=>(n.on("end",o).on("error",o),t),YOe=new V4;function jOe(n,t,o){n.beforeRedirects.proxy&&n.beforeRedirects.proxy(n),n.beforeRedirects.auth&&n.beforeRedirects.auth(n),n.beforeRedirects.sensitiveHeaders&&n.beforeRedirects.sensitiveHeaders(n,o),n.beforeRedirects.config&&n.beforeRedirects.config(n,t,o)}function JOe(n,t){n&&Object.keys(n).forEach(o=>{t.has(o.toLowerCase())&&delete n[o]})}function qOe(n,t){if(!t)return!1;try{return new URL(t.url).origin===new URL(n.href).origin}catch{return!1}}function w8(n,t,o,a,e,i){let A=t,r=KOe(n,i,e);if(!A&&A!==!1&&!HOe(r)){let s=m4(o);s&&(bN(o)||(A=new URL(s)))}if(a&&n.headers)for(let s of Object.keys(n.headers))s.toLowerCase()==="proxy-authorization"&&delete n.headers[s];if(a&&n.agent&&n.agent[S8]&&(n.agent=void 0),A){let s=A instanceof URL,g=f=>s||Z.hasOwnProp(A,f)?A[f]:void 0,c=g("username"),I=g("password"),d=Z.hasOwnProp(A,"auth")?A.auth:void 0;if(c&&(d=(c||"")+":"+(I||"")),d){let f=typeof d=="object",Q=f&&Z.hasOwnProp(d,"username")?d.username:void 0,y=f&&Z.hasOwnProp(d,"password")?d.password:void 0;if(!!(Q||y))d=(Q||"")+":"+(y||"");else if(f)throw new Oe("Invalid proxy authorization",Oe.ERR_BAD_OPTION,{proxy:A})}if(TN.test(n.protocol)){if(!(e instanceof _N.default)){let f=g("hostname")||g("host"),Q=g("port"),y=g("protocol"),m=y?y.includes(":")?y:`${y}:`:"http:",_=f&&f.includes(":")&&!f.startsWith("[")?`[${f}]`:f,T=new URL(`${m}//${_}${Q?":"+Q:""}`),R={protocol:T.protocol,hostname:T.hostname.replace(/^\[|\]$/g,""),port:T.port,auth:d&&typeof d=="string"?d:void 0};T.protocol==="https:"&&(R.ALPNProtocols=["http/1.1"]);let L=xOe(R,e);n.agent=L,n.agents&&(n.agents.https=L)}}else{if(d){let m=Buffer.from(d,"utf8").toString("base64");n.headers["Proxy-Authorization"]="Basic "+m}let f=!1;for(let m of Object.keys(n.headers))if(m.toLowerCase()==="host"){f=!0;break}f||(n.headers.host=n.hostname+(n.port?":"+n.port:""));let Q=g("hostname")||g("host");n.hostname=Q,n.host=Q,n.port=g("port"),n.path=o;let y=g("protocol");y&&(n.protocol=y.includes(":")?y:`${y}:`)}}n.beforeRedirects.proxy=function(g){w8(g,t,g.href,!0,e,i)}}var zOe=typeof process<"u"&&Z.kindOf(process)==="process",VOe=n=>new Promise((t,o)=>{let a,e,i=(s,g)=>{e||(e=!0,a&&a(s,g))},A=s=>{i(s),t(s)},r=s=>{i(s,!0),o(s)};n(A,r,s=>a=s).catch(r)}),WOe=({address:n,family:t})=>{if(!Z.isString(n))throw TypeError("address must be a string");return{address:n,family:t||(n.indexOf(".")<0?6:4)}},u8=(n,t)=>WOe(Z.isObject(n)?n:{address:n,family:t}),ZOe={request(n,t){let o=n.protocol+"//"+n.hostname+":"+(n.port||(n.protocol==="https:"?443:80)),{http2Options:a,headers:e}=n,i=YOe.getSession(o,a),{HTTP2_HEADER_SCHEME:A,HTTP2_HEADER_METHOD:r,HTTP2_HEADER_PATH:s,HTTP2_HEADER_STATUS:g}=TOe.constants,c={[A]:n.protocol.replace(":",""),[r]:n.method,[s]:n.path};Z.forEach(e,(d,B)=>{B.charAt(0)!==":"&&(c[B]=d)});let I=i.request(c);return I.once("response",d=>{let B=I;d=Object.assign({},d);let f=d[g];delete d[g],B.headers=d,B.statusCode=+f,t(B)}),I}},D8=zOe&&function(t){return VOe(async function(a,e,i){let A=Ce=>Z.getSafeProp(t,Ce),r=A("transitional")||Fc,s=A("data"),g=A("lookup"),c=A("family"),I=A("httpVersion");I===void 0&&(I=1);let d=A("http2Options"),B=A("httpAgent"),f=A("httpsAgent"),Q=A("proxy"),y=A("responseType"),m=A("responseEncoding"),_=A("socketPath"),T=A("method").toUpperCase(),R=A("maxRedirects"),L=A("maxBodyLength"),U=A("maxContentLength"),F=A("decompress"),J,V=!1,H,G;if(I=+I,Number.isNaN(I))throw TypeError(`Invalid protocol version: '${t.httpVersion}' is not a number`);if(I!==1&&I!==2)throw TypeError(`Unsupported protocol version '${I}'`);let q=I===2;if(g){let Ce=W4(g,ke=>Z.isArray(ke)?ke:[ke]);g=(ke,Ue,MA)=>{Ce(ke,Ue,(Ke,_A,ot)=>{if(Ke)return MA(Ke);let wA=Z.isArray(_A)?_A.map(ht=>u8(ht)):[u8(_A,ot)];Ue.all?MA(Ke,wA):MA(Ke,wA[0].address,wA[0].family)})}}let K=new ROe;function N(Ce){try{K.emit("abort",!Ce||Ce.type?new ho(null,t,H):Ce)}catch{}}function k(){G&&(clearTimeout(G),G=null)}function z(){let Ce=A("timeout"),ke=Ce?"timeout of "+Ce+"ms exceeded":"timeout exceeded",Ue=A("timeoutErrorMessage");return Ue&&(ke=Ue),new Oe(ke,r.clarifyTimeoutError?Oe.ETIMEDOUT:Oe.ECONNABORTED,t,H)}K.once("abort",e);let X=()=>{k(),t.cancelToken&&t.cancelToken.unsubscribe(N),t.signal&&t.signal.removeEventListener("abort",N),K.removeAllListeners()};(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(N),t.signal&&(t.signal.aborted?N():t.signal.addEventListener("abort",N))),i((Ce,ke)=>{if(J=!0,k(),ke){V=!0,X();return}let{data:Ue}=Ce;if(Ue instanceof Rn.Readable||Ue instanceof Rn.Duplex){let MA=Rn.finished(Ue,()=>{MA(),X()})}else X()});let ie=dl(A("baseURL"),A("url"),A("allowAbsoluteUrls"),t),De=_?"http://localhost":yt.hasBrowserEnv?yt.origin:void 0,oe=new URL(ie,De),Se=oe.protocol||p8[0];if(Se==="data:"){if(U>-1){let ke=String(A("url")||ie||"");if(n8(ke)>U)return e(new Oe("maxContentLength size of "+U+" exceeded",Oe.ERR_BAD_RESPONSE,t))}let Ce;if(T!=="GET")return ws(a,e,{status:405,statusText:"method not allowed",headers:{},config:t});try{Ce=BN(A("url"),y==="blob",{Blob:t.env&&t.env.Blob})}catch(ke){throw Oe.from(ke,Oe.ERR_BAD_REQUEST,t)}return y==="text"?(Ce=Ce.toString(m),(!m||m==="utf8")&&(Ce=Z.stripBOM(Ce))):y==="stream"&&(Ce=Rn.Readable.from(Ce)),ws(a,e,{data:Ce,status:200,statusText:"OK",headers:new jt,config:t})}if(p8.indexOf(Se)===-1)return e(new Oe("Unsupported protocol "+Se,Oe.ERR_BAD_REQUEST,t));let Be=jt.from(t.headers).normalize();Be.set("User-Agent","axios/"+_g,!1);let{onUploadProgress:Re,onDownloadProgress:Ne}=t,Je=t.maxRate,ve,tA;if(Z.isSpecCompliantForm(s)){let Ce=Be.getContentType(/boundary=([-_\w\d]{10,70})/i);s=q4(s,ke=>{Be.set(ke)},{tag:`axios-${_g}-boundary`,boundary:Ce&&Ce[1]||void 0})}else if(Z.isFormData(s)&&Z.isFunction(s.getHeaders)&&s.getHeaders!==Object.prototype.getHeaders){if(AC(Be,s.getHeaders(),A("formDataHeaderPolicy")),!Be.hasContentLength())try{let Ce=await NOe.promisify(s.getLength).call(s);Number.isFinite(Ce)&&Ce>=0&&Be.setContentLength(Ce)}catch{}}else if(Z.isBlob(s)||Z.isFile(s))s.size&&Be.setContentType(s.type||"application/octet-stream"),Be.setContentLength(s.size||0),s=Rn.Readable.from(hm(s));else if(s&&!Z.isStream(s)){if(!Buffer.isBuffer(s))if(Z.isArrayBuffer(s))s=Buffer.from(new Uint8Array(s));else if(Z.isString(s))s=Buffer.from(s,"utf-8");else return e(new Oe("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Oe.ERR_BAD_REQUEST,t));if(Be.setContentLength(s.length,!1),L>-1&&s.length>L)return e(new Oe("Request body larger than maxBodyLength limit",Oe.ERR_BAD_REQUEST,t))}let fe=Z.toFiniteNumber(Be.getContentLength());Z.isArray(Je)?(ve=Je[0],tA=Je[1]):ve=tA=Je,s&&(Re||ve)&&(Z.isStream(s)||(s=Rn.Readable.from(s,{objectMode:!1})),s=Rn.pipeline([s,new yN({maxRate:Z.toFiniteNumber(ve)})],Z.noop),Re&&s.on("progress",E8(s,Gp(fe,Tg(Fp(Re,c8),!1,3)))));let Ie,Xe=A("auth");if(Xe){let Ce=Z.getSafeProp(Xe,"username")||"",ke=Z.getSafeProp(Xe,"password")||"";Ie=Ce+":"+ke}if(!Ie&&(oe.username||oe.password)){let Ce=h8(oe.username),ke=h8(oe.password);Ie=Ce+":"+ke}Ie&&Be.delete("authorization");let je;try{je=ll(oe.pathname+oe.search,A("params"),A("paramsSerializer")).replace(/^\?/,"")}catch(Ce){return e(Oe.from(Ce,Oe.ERR_BAD_REQUEST,t,null,null,{url:A("url"),exists:!0}))}Be.set("Accept-Encoding",Z.hasOwnProp(r,"advertiseZstdAcceptEncoding")&&r.advertiseZstdAcceptEncoding===!0?POe:m8,!1);let be=Object.assign(Object.create(null),{path:je,method:T,headers:wp(Be),agents:{http:B,https:f},auth:Ie,protocol:Se,family:c,beforeRedirect:jOe,beforeRedirects:Object.create(null),http2Options:d});if(!Z.isUndefined(g)&&(be.lookup=g),_){if(typeof _!="string")return e(new Oe("socketPath must be a string",Oe.ERR_BAD_OPTION_VALUE,t));let Ce=A("allowedSocketPaths");if(Ce!=null){let ke=Array.isArray(Ce)?Ce:[Ce],Ue=s8(_);if(!ke.some(Ke=>typeof Ke=="string"&&s8(Ke)===Ue))return e(new Oe(`socketPath "${_}" is not permitted by allowedSocketPaths`,Oe.ERR_BAD_OPTION_VALUE,t))}be.socketPath=_}else be.hostname=oe.hostname.startsWith("[")?oe.hostname.slice(1,-1):oe.hostname,be.port=oe.port,w8(be,Q,Se+"//"+oe.hostname+(oe.port?":"+oe.port:"")+be.path,!1,f,B);let uA,EA=!1,aA=!1,Ze=TN.test(be.protocol);if(be.agent==null&&(be.agent=Ze?f:B),q)uA=ZOe;else{let Ce=A("transport");if(Ce)uA=Ce;else if(R===0)uA=Ze?B8:C8,EA=!0;else{aA=!0,be.sensitiveHeaders=[],R&&(be.maxRedirects=R);let ke=A("beforeRedirect");if(ke&&(be.beforeRedirects.config=ke),Ie){let MA=oe.origin,Ke=Ie;be.beforeRedirects.auth=function(ot){try{new URL(ot.href).origin===MA&&(ot.auth=Ke)}catch{}}}let Ue=A("sensitiveHeaders");if(Ue!=null){if(!Z.isArray(Ue))return e(new Oe("sensitiveHeaders must be an array of strings",Oe.ERR_BAD_OPTION_VALUE,t));let MA=new Set;for(let Ke of Ue){if(!Z.isString(Ke))return e(new Oe("sensitiveHeaders must be an array of strings",Oe.ERR_BAD_OPTION_VALUE,t));MA.add(Ke.toLowerCase())}MA.size&&(be.sensitiveHeaders=Array.from(MA),be.beforeRedirects.sensitiveHeaders=function(_A,ot){qOe(_A,ot)||JOe(_A.headers,MA)})}uA=Ze?FOe:GOe}}L>-1?be.maxBodyLength=L:be.maxBodyLength=1/0,be.insecureHTTPParser=!!A("insecureHTTPParser"),H=uA.request(be,function(ke){if(k(),H.destroyed)return;let Ue=[ke],MA=Z.toFiniteNumber(ke.headers["content-length"]);if(Ne||tA){let wA=new yN({maxRate:Z.toFiniteNumber(tA)});Ne&&wA.on("progress",E8(wA,Gp(MA,Tg(Fp(Ne,c8),!0,3)))),Ue.push(wA)}let Ke=ke,_A=ke.req||H;if(F!==!1&&ke.headers["content-encoding"])switch((T==="HEAD"||ke.statusCode===204)&&delete ke.headers["content-encoding"],(ke.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":Ue.push(Jo.createUnzip(g8)),delete ke.headers["content-encoding"];break;case"deflate":Ue.push(new z4),Ue.push(Jo.createUnzip(g8)),delete ke.headers["content-encoding"];break;case"br":Q8&&(Ue.push(Jo.createBrotliDecompress(kOe)),delete ke.headers["content-encoding"]);break;case"zstd":y8&&(Ue.push(Jo.createZstdDecompress(vOe)),delete ke.headers["content-encoding"]);break}Ke=Ue.length>1?Rn.pipeline(Ue,Z.noop):Ue[0];let ot={status:ke.statusCode,statusText:ke.statusMessage,headers:new jt(ke.headers),config:t,request:_A};if(y==="stream"){if(U>-1){let wA=U,ht=Ke;async function*fr(){let UA=0;for await(let de of ht){if(UA+=de.length,UA>wA)throw new Oe("maxContentLength size of "+wA+" exceeded",Oe.ERR_BAD_RESPONSE,t,_A);yield de}}Ke=Rn.Readable.from(fr(),{objectMode:!1})}ot.data=Ke,ws(a,e,ot)}else{let wA=[],ht=0;Ke.on("data",function(UA){wA.push(UA),ht+=UA.length,U>-1&&ht>U&&(V=!0,Ke.destroy(),N(new Oe("maxContentLength size of "+U+" exceeded",Oe.ERR_BAD_RESPONSE,t,_A)))}),Ke.on("aborted",function(){if(V)return;let UA=new Oe("stream has been aborted",Oe.ERR_BAD_RESPONSE,t,_A,ot);Ke.destroy(UA),e(UA)}),Ke.on("error",function(UA){V||e(Oe.from(UA,null,t,_A,ot))}),Ke.on("end",function(){try{let UA=wA.length===1?wA[0]:Buffer.concat(wA);y!=="arraybuffer"&&(UA=UA.toString(m),(!m||m==="utf8")&&(UA=Z.stripBOM(UA))),ot.data=UA}catch(UA){return e(Oe.from(UA,null,t,ot.request,ot))}ws(a,e,ot)})}K.once("abort",wA=>{Ke.destroyed||(Ke.emit("error",wA),Ke.destroy())})}),K.once("abort",Ce=>{H.close?H.close():H.destroy(Ce)}),H.on("error",function(ke){e(Oe.from(ke,null,t,H))});let bA=new Set;if(H.on("socket",function(ke){typeof ke.setKeepAlive=="function"&&ke.setKeepAlive(!0,1e3*60),ke[I8]||(ke.on("error",function(MA){let Ke=ke[Em];Ke&&!Ke.destroyed&&Ke.destroy(MA)}),ke[I8]=!0),ke[Em]=H,bA.add(ke)}),H.once("close",function(){k();for(let ke of bA)ke[Em]===H&&(ke[Em]=null);bA.clear()}),A("timeout")){let Ce=parseInt(A("timeout"),10);if(Number.isNaN(Ce)){N(new Oe("error trying to parse `config.timeout` to int",Oe.ERR_BAD_OPTION_VALUE,t,H));return}let ke=function(){J||N(z())};EA&&Ce>0&&(G=setTimeout(ke,Ce)),H.setTimeout(Ce,ke)}else H.setTimeout(0);if(Z.isStream(s)){let Ce=!1,ke=!1;s.on("end",()=>{Ce=!0}),s.once("error",MA=>{ke=!0,H.destroy(MA)}),s.on("close",()=>{!Ce&&!ke&&N(new ho("Request stream has been aborted",t,H))});let Ue=s;if(L>-1&&!aA){let MA=L,Ke=0;Ue=Rn.pipeline([s,new Rn.Transform({transform(_A,ot,wA){if(Ke+=_A.length,Ke>MA)return wA(new Oe("Request body larger than maxBodyLength limit",Oe.ERR_BAD_REQUEST,t,H));wA(null,_A)}})],Z.noop),Ue.on("error",_A=>{H.destroyed||H.destroy(_A)})}Ue.pipe(H)}else s&&H.write(s),H.end()})};var O8=yt.hasStandardBrowserEnv?((n,t)=>o=>(o=new URL(o,yt.origin),n.protocol===o.protocol&&n.host===o.host&&(t||n.port===o.port)))(new URL(yt.origin),yt.navigator&&/(msie|trident)/i.test(yt.navigator.userAgent)):()=>!0;var b8=yt.hasStandardBrowserEnv?{write(n,t,o,a,e,i,A){if(typeof document>"u")return;let r=[`${n}=${encodeURIComponent(t)}`];Z.isNumber(o)&&r.push(`expires=${new Date(o).toUTCString()}`),Z.isString(a)&&r.push(`path=${a}`),Z.isString(e)&&r.push(`domain=${e}`),i===!0&&r.push("secure"),Z.isString(A)&&r.push(`SameSite=${A}`),document.cookie=r.join("; ")},read(n){if(typeof document>"u")return null;let t=document.cookie.split(";");for(let o=0;on instanceof jt?{...n}:n,XOe=n=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(n).concat(Object.getOwnPropertySymbols(n).filter(t=>Object.getOwnPropertyDescriptor(n,t).enumerable)):Object.keys(n);function kn(n,t){n=n||{},t=t||{};let o=Object.create(null);Object.defineProperty(o,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function a(c,I,d,B){return Z.isPlainObject(c)&&Z.isPlainObject(I)?Z.merge.call({caseless:B},c,I):Z.isPlainObject(I)?Z.merge({},I):Z.isArray(I)?I.slice():I}function e(c,I,d,B){if(Z.isUndefined(I)){if(!Z.isUndefined(c))return a(void 0,c,d,B)}else return a(c,I,d,B)}function i(c,I){if(!Z.isUndefined(I))return a(void 0,I)}function A(c,I){if(Z.isUndefined(I)){if(!Z.isUndefined(c))return a(void 0,c)}else return a(void 0,I)}function r(c){let I=Z.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!Z.isUndefined(I))if(Z.isPlainObject(I)){if(Z.hasOwnProp(I,c))return I[c]}else return;let d=Z.hasOwnProp(n,"transitional")?n.transitional:void 0;if(Z.isPlainObject(d)&&Z.hasOwnProp(d,c))return d[c]}function s(c,I,d){if(Z.hasOwnProp(t,d))return a(c,I);if(Z.hasOwnProp(n,d))return a(void 0,c)}let g={url:i,method:i,data:i,baseURL:A,transformRequest:A,transformResponse:A,paramsSerializer:A,timeout:A,timeoutMessage:A,withCredentials:A,withXSRFToken:A,adapter:A,responseType:A,xsrfCookieName:A,xsrfHeaderName:A,onUploadProgress:A,onDownloadProgress:A,decompress:A,maxContentLength:A,maxBodyLength:A,beforeRedirect:A,transport:A,httpAgent:A,httpsAgent:A,cancelToken:A,socketPath:A,allowedSocketPaths:A,responseEncoding:A,validateStatus:s,headers:(c,I,d)=>e(M8(c),M8(I),d,!0)};return Z.forEach(XOe({...n,...t}),function(I){if(I==="__proto__"||I==="constructor"||I==="prototype")return;let d=Z.hasOwnProp(g,I)?g[I]:e,B=Z.hasOwnProp(n,I)?n[I]:void 0,f=Z.hasOwnProp(t,I)?t[I]:void 0,Q=d(B,f,I);Z.isUndefined(Q)&&d!==s||(o[I]=Q)}),Z.hasOwnProp(t,"validateStatus")&&Z.isUndefined(t.validateStatus)&&r("validateStatusUndefinedResolves")===!1&&(Z.hasOwnProp(n,"validateStatus")?o.validateStatus=a(void 0,n.validateStatus):delete o.validateStatus),o}var $Oe=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16)));function ebe(n){let t=kn({},n),o=d=>Z.hasOwnProp(t,d)?t[d]:void 0,a=o("data"),e=o("withXSRFToken"),i=o("xsrfHeaderName"),A=o("xsrfCookieName"),r=o("headers"),s=o("auth"),g=o("baseURL"),c=o("allowAbsoluteUrls"),I=o("url");if(t.headers=r=jt.from(r),t.url=ll(dl(g,I,c,t),o("params"),o("paramsSerializer")),s){let d=Z.getSafeProp(s,"username")||"",B=Z.getSafeProp(s,"password")||"";try{r.set("Authorization","Basic "+btoa(d+":"+(B?$Oe(B):"")))}catch(f){throw Oe.from(f,Oe.ERR_BAD_OPTION_VALUE,n)}}if(Z.isFormData(a)&&(yt.hasStandardBrowserEnv||yt.hasStandardBrowserWebWorkerEnv||Z.isReactNative(a)?r.setContentType(void 0):Z.isFunction(a.getHeaders)&&AC(r,a.getHeaders(),o("formDataHeaderPolicy"))),yt.hasStandardBrowserEnv&&(Z.isFunction(e)&&(e=e(t)),e===!0||e==null&&O8(t.url))){let B=i&&A&&b8.read(A);B&&r.set(i,B)}return t}var um=ebe;var Abe=typeof XMLHttpRequest<"u",_8=Abe&&function(n){return new Promise(function(o,a){let e=um(n),i=e.data,A=jt.from(e.headers).normalize(),{responseType:r,onUploadProgress:s,onDownloadProgress:g}=e,c,I,d,B,f;function Q(){B&&B(),f&&f(),e.cancelToken&&e.cancelToken.unsubscribe(c),e.signal&&e.signal.removeEventListener("abort",c)}let y=new XMLHttpRequest;y.open(e.method.toUpperCase(),e.url,!0),y.timeout=e.timeout;function m(){if(!y)return;let T=jt.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),L={data:!r||r==="text"||r==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:T,config:n,request:y};ws(function(F){o(F),Q()},function(F){a(F),Q()},L),y=null}"onloadend"in y?y.onloadend=m:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.startsWith("file:"))||setTimeout(m)},y.onabort=function(){y&&(a(new Oe("Request aborted",Oe.ECONNABORTED,n,y)),Q(),y=null)},y.onerror=function(R){let L=R&&R.message?R.message:"Network Error",U=new Oe(L,Oe.ERR_NETWORK,n,y);U.event=R||null,a(U),Q(),y=null},y.ontimeout=function(){let R=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",L=e.transitional||Fc;e.timeoutErrorMessage&&(R=e.timeoutErrorMessage),a(new Oe(R,L.clarifyTimeoutError?Oe.ETIMEDOUT:Oe.ECONNABORTED,n,y)),Q(),y=null},i===void 0&&A.setContentType(null),"setRequestHeader"in y&&Z.forEach(wp(A),function(R,L){y.setRequestHeader(L,R)}),Z.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),r&&r!=="json"&&(y.responseType=e.responseType),g&&([d,f]=Tg(g,!0),y.addEventListener("progress",d)),s&&y.upload&&([I,B]=Tg(s),y.upload.addEventListener("progress",I),y.upload.addEventListener("loadend",B)),(e.cancelToken||e.signal)&&(c=T=>{y&&(a(!T||T.type?new ho(null,n,y):T),y.abort(),Q(),y=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));let _=eC(e.url);if(_&&!yt.protocols.includes(_)){a(new Oe("Unsupported protocol "+_+":",Oe.ERR_BAD_REQUEST,n)),Q();return}y.send(i||null)})};var tbe=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;let o=new AbortController,a=!1,e=function(s){if(!a){a=!0,A();let g=s instanceof Error?s:this.reason;o.abort(g instanceof Oe?g:new ho(g instanceof Error?g.message:g))}},i=t&&setTimeout(()=>{i=null,e(new Oe(`timeout of ${t}ms exceeded`,Oe.ETIMEDOUT))},t),A=()=>{n&&(i&&clearTimeout(i),i=null,n.forEach(s=>{s.unsubscribe?s.unsubscribe(e):s.removeEventListener("abort",e)}),n=null)};n.forEach(s=>{if(!a){if(s.aborted){e.call(s);return}s.addEventListener("abort",e,{once:!0})}});let{signal:r}=o;return r.unsubscribe=()=>Z.asap(A),r},T8=tbe;var rbe=function*(n,t){let o=n.byteLength;if(!t||o{let e=ibe(n,t),i=0,A,r=s=>{A||(A=!0,a&&a(s))};return new ReadableStream({async pull(s){try{let{done:g,value:c}=await e.next();if(g){r(),s.close();return}let I=c.byteLength;if(o){let d=i+=I;o(d)}s.enqueue(new Uint8Array(c))}catch(g){throw r(g),g}},cancel(s){return r(s),e.return()}},{highWaterMark:2})};var N8=64*1024,{isFunction:Cm}=Z,obe=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16))),R8=n=>{if(!Z.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},k8=(n,...t)=>{try{return!!n(...t)}catch{return!1}},nbe=n=>{let t=n.indexOf("://"),o=n;return t!==-1&&(o=o.slice(t+3)),o.includes("@")||o.includes(":")},sbe=n=>{let t=Z.global!==void 0&&Z.global!==null?Z.global:globalThis,{ReadableStream:o,TextEncoder:a}=t;n=Z.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);let{fetch:e,Request:i,Response:A}=n,r=e?Cm(e):typeof fetch=="function",s=Cm(i),g=Cm(A);if(!r)return!1;let c=r&&Cm(o),I=r&&(typeof a=="function"?(m=>_=>m.encode(_))(new a):async m=>new Uint8Array(await new i(m).arrayBuffer())),d=s&&c&&k8(()=>{let m=!1,_=new i(yt.origin,{body:new o,method:"POST",get duplex(){return m=!0,"half"}}),T=_.headers.has("Content-Type");return _.body!=null&&_.body.cancel(),m&&!T}),B=g&&c&&k8(()=>Z.isReadableStream(new A("").body)),f={stream:B&&(m=>m.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!f[m]&&(f[m]=(_,T)=>{let R=_&&_[m];if(R)return R.call(_);throw new Oe(`Response type '${m}' is not supported`,Oe.ERR_NOT_SUPPORT,T)})});let Q=async m=>{if(m==null)return 0;if(Z.isBlob(m))return m.size;if(Z.isSpecCompliantForm(m))return(await new i(yt.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(Z.isArrayBufferView(m)||Z.isArrayBuffer(m))return m.byteLength;if(Z.isURLSearchParams(m)&&(m=m+""),Z.isString(m))return(await I(m)).byteLength},y=async(m,_)=>{let T=Z.toFiniteNumber(m.getContentLength());return T??Q(_)};return async m=>{let{url:_,method:T,data:R,signal:L,cancelToken:U,timeout:F,onDownloadProgress:J,onUploadProgress:V,responseType:H,headers:G,withCredentials:q="same-origin",fetchOptions:K,maxContentLength:N,maxBodyLength:k}=um(m),z=Z.isNumber(N)&&N>-1,X=Z.isNumber(k)&&k>-1,ie=ve=>Z.hasOwnProp(m,ve)?m[ve]:void 0,De=e||fetch;H=H?(H+"").toLowerCase():"text";let oe=T8([L,U&&U.toAbortSignal()],F),Se=null,Be=oe&&oe.unsubscribe&&(()=>{oe.unsubscribe()}),Re,Ne=null,Je=()=>new Oe("Request body larger than maxBodyLength limit",Oe.ERR_BAD_REQUEST,m,Se);try{let ve,tA=ie("auth");if(tA){let Ze=Z.getSafeProp(tA,"username")||"",bA=Z.getSafeProp(tA,"password")||"";ve={username:Ze,password:bA}}if(nbe(_)){let Ze=new URL(_,yt.origin);if(!ve&&(Ze.username||Ze.password)){let bA=R8(Ze.username),Ce=R8(Ze.password);ve={username:bA,password:Ce}}(Ze.username||Ze.password)&&(Ze.username="",Ze.password="",_=Ze.href)}if(ve&&(G.delete("authorization"),G.set("Authorization","Basic "+btoa(obe((ve.username||"")+":"+(ve.password||""))))),z&&typeof _=="string"&&_.startsWith("data:")&&MN(_)>N)throw new Oe("maxContentLength size of "+N+" exceeded",Oe.ERR_BAD_RESPONSE,m,Se);if(X&&T!=="get"&&T!=="head"){let Ze=await Q(R);if(typeof Ze=="number"&&isFinite(Ze)&&(Re=Ze,Ze>k))throw Je()}let fe=X&&(Z.isReadableStream(R)||Z.isStream(R)),Ie=(Ze,bA,Ce)=>NN(Ze,N8,ke=>{if(X&&ke>k)throw Ne=Je();bA&&bA(ke)},Ce);if(d&&T!=="get"&&T!=="head"&&(V||fe)){if(Re=Re??await y(G,R),Re!==0||fe){let Ze=new i(_,{method:"POST",body:R,duplex:"half"}),bA;if(Z.isFormData(R)&&(bA=Ze.headers.get("content-type"))&&G.setContentType(bA),Ze.body){let[Ce,ke]=V&&Gp(Re,Tg(Fp(V)))||[];R=Ie(Ze.body,Ce,ke)}}}else if(fe&&!s&&c&&T!=="get"&&T!=="head")R=Ie(R);else if(fe&&s&&!d&&T!=="get"&&T!=="head")throw new Oe("Stream request bodies are not supported by the current fetch implementation",Oe.ERR_NOT_SUPPORT,m,Se);Z.isString(q)||(q=q?"include":"omit");let Xe=s&&"credentials"in i.prototype;if(Z.isFormData(R)){let Ze=G.getContentType();Ze&&/^multipart\/form-data/i.test(Ze)&&!/boundary=/i.test(Ze)&&G.delete("content-type")}G.set("User-Agent","axios/"+_g,!1);let je={...K,signal:oe,method:T.toUpperCase(),headers:wp(G.normalize()),body:R,duplex:"half",credentials:Xe?q:void 0};Se=s&&new i(_,je);let be=await(s?De(Se,K):De(_,je)),uA=jt.from(be.headers);if(z){let Ze=Z.toFiniteNumber(uA.getContentLength());if(Ze!=null&&Ze>N)throw new Oe("maxContentLength size of "+N+" exceeded",Oe.ERR_BAD_RESPONSE,m,Se)}let EA=B&&(H==="stream"||H==="response");if(B&&be.body&&(J||z||EA&&Be)){let Ze={};["status","statusText","headers"].forEach(Ke=>{Ze[Ke]=be[Ke]});let bA=Z.toFiniteNumber(uA.getContentLength()),[Ce,ke]=J&&Gp(bA,Tg(Fp(J),!0))||[],Ue=0,MA=Ke=>{if(z&&(Ue=Ke,Ue>N))throw new Oe("maxContentLength size of "+N+" exceeded",Oe.ERR_BAD_RESPONSE,m,Se);Ce&&Ce(Ke)};be=new A(NN(be.body,N8,MA,()=>{ke&&ke(),Be&&Be()}),Ze)}H=H||"text";let aA=await f[Z.findKey(f,H)||"text"](be,m);if(z&&!B&&!EA){let Ze;if(aA!=null&&(typeof aA.byteLength=="number"?Ze=aA.byteLength:typeof aA.size=="number"?Ze=aA.size:typeof aA=="string"&&(Ze=typeof a=="function"?new a().encode(aA).byteLength:aA.length)),typeof Ze=="number"&&Ze>N)throw new Oe("maxContentLength size of "+N+" exceeded",Oe.ERR_BAD_RESPONSE,m,Se)}return!EA&&Be&&Be(),await new Promise((Ze,bA)=>{ws(Ze,bA,{data:aA,headers:jt.from(be.headers),status:be.status,statusText:be.statusText,config:m,request:Se})})}catch(ve){if(Be&&Be(),oe&&oe.aborted&&oe.reason instanceof Oe){let tA=oe.reason;throw tA.config=m,Se&&(tA.request=Se),ve!==tA&&Object.defineProperty(tA,"cause",{__proto__:null,value:ve,writable:!0,enumerable:!1,configurable:!0}),tA}if(Ne)throw Se&&!Ne.request&&(Ne.request=Se),Ne;if(ve instanceof Oe)throw Se&&!ve.request&&(ve.request=Se),ve;if(ve&&ve.name==="TypeError"&&/Load failed|fetch/i.test(ve.message)){let tA=new Oe("Network Error",Oe.ERR_NETWORK,m,Se,ve&&ve.response);throw Object.defineProperty(tA,"cause",{__proto__:null,value:ve.cause||ve,writable:!0,enumerable:!1,configurable:!0}),tA}throw Oe.from(ve,ve&&ve.code,m,Se,ve&&ve.response)}}},gbe=new Map,RN=n=>{let t=n&&n.env||{},{fetch:o,Request:a,Response:e}=t,i=[a,e,o],A=i.length,r=A,s,g,c=gbe;for(;r--;)s=i[r],g=c.get(s),g===void 0&&c.set(s,g=r?new Map:sbe(t)),c=g;return g},blA=RN();var kN={http:D8,xhr:_8,fetch:{get:RN}};Z.forEach(kN,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});var v8=n=>`- ${n}`,Ibe=n=>Z.isFunction(n)||n===null||n===!1;function lbe(n,t){n=Z.isArray(n)?n:[n];let{length:o}=n,a,e,i={};for(let A=0;A`adapter ${s} `+(g===!1?"is not supported by the environment":"is not available in the build")),r=o?A.length>1?`since : +`+A.map(v8).join(` +`):" "+v8(A[0]):"as no adapter specified";throw new Oe("There is no suitable adapter to dispatch the request "+r,Oe.ERR_NOT_SUPPORT)}return e}var Bm={getAdapter:lbe,adapters:kN};function vN(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new ho(null,n)}function rC(n){return vN(n),n.headers=jt.from(n.headers),n.data=Yu.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Bm.getAdapter(n.adapter||Np.adapter,n)(n).then(function(a){vN(n),n.response=a;try{a.data=Yu.call(n,n.transformResponse,a)}finally{delete n.response}return a.headers=jt.from(a.headers),a},function(a){if(!ju(a)&&(vN(n),a&&a.response)){n.response=a.response;try{a.response.data=Yu.call(n,n.transformResponse,a.response)}finally{delete n.response}a.response.headers=jt.from(a.response.headers)}return Promise.reject(a)})}var fm={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{fm[n]=function(a){return typeof a===n||"a"+(t<1?"n ":" ")+n}});var P8={};fm.transitional=function(t,o,a){function e(i,A){return"[Axios v"+_g+"] Transitional option '"+i+"'"+A+(a?". "+a:"")}return(i,A,r)=>{if(t===!1)throw new Oe(e(A," has been removed"+(o?" in "+o:"")),Oe.ERR_DEPRECATED);return o&&!P8[A]&&(P8[A]=!0,console.warn(e(A," has been deprecated since v"+o+" and will be removed in the near future"))),t?t(i,A,r):!0}};fm.spelling=function(t){return(o,a)=>(console.warn(`${a} is likely a misspelling of ${t}`),!0)};function dbe(n,t,o){if(typeof n!="object"||n===null)throw new Oe("options must be an object",Oe.ERR_BAD_OPTION_VALUE);let a=Object.keys(n),e=a.length;for(;e-- >0;){let i=a[e],A=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(A){let r=n[i],s=r===void 0||A(r,i,n);if(s!==!0)throw new Oe("option "+i+" must be "+s,Oe.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new Oe("Unknown option "+i,Oe.ERR_BAD_OPTION)}}var iC={assertOptions:dbe,validators:fm};var ga=iC.validators,Lp=class{constructor(t){this.defaults=t||{},this.interceptors={request:new U0,response:new U0}}async request(t,o){try{return await this._request(t,o)}catch(a){if(a instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;let i=(()=>{if(!e.stack)return"";let A=e.stack.indexOf(` `);return A===-1?"":e.stack.slice(A+1)})();try{if(!a.stack)a.stack=i;else if(i){let A=i.indexOf(` `),r=A===-1?-1:i.indexOf(` `,A+1),s=r===-1?"":i.slice(r+1);String(a.stack).endsWith(s)||(a.stack+=` -`+i)}}catch{}}throw a}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=kn(this.defaults,o);let{transitional:a,paramsSerializer:e,headers:i}=o;a!==void 0&&iC.assertOptions(a,{silentJSONParsing:sa.transitional(sa.boolean),forcedJSONParsing:sa.transitional(sa.boolean),clarifyTimeoutError:sa.transitional(sa.boolean),legacyInterceptorReqResOrdering:sa.transitional(sa.boolean),advertiseZstdAcceptEncoding:sa.transitional(sa.boolean),validateStatusUndefinedResolves:sa.transitional(sa.boolean)},!1),e!=null&&(Z.isFunction(e)?o.paramsSerializer={serialize:e}:iC.assertOptions(e,{encode:sa.function,serialize:sa.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),iC.assertOptions(o,{baseUrl:sa.spelling("baseURL"),withXsrfToken:sa.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let A=i&&Z.merge(i.common,i[o.method]);i&&Z.forEach(["delete","get","head","post","put","patch","query","common"],f=>{delete i[f]}),o.headers=jt.concat(A,i);let r=[],s=!0;this.interceptors.request.forEach(function(Q){if(typeof Q.runWhen=="function"&&Q.runWhen(o)===!1)return;s=s&&Q.synchronous;let y=o.transitional||Gc;y&&y.legacyInterceptorReqResOrdering?r.unshift(Q.fulfilled,Q.rejected):r.push(Q.fulfilled,Q.rejected)});let g=[];this.interceptors.response.forEach(function(Q){g.push(Q.fulfilled,Q.rejected)});let c,I=0,d;if(!s){let f=[rC.bind(this),void 0];for(f.unshift(...r),f.push(...g),d=f.length,c=Promise.resolve(o);IrC.call(this,B)))}catch(m){c=Promise.reject(m)}break}}if(!c)try{c=rC.call(this,B)}catch(f){c=Promise.reject(f)}for(I=0,d=g.length;I{if(!a._listeners)return;let i=a._listeners.length;for(;i-- >0;)a._listeners[i](e);a._listeners=null}),this.promise.then=e=>{let i,A=new Promise(r=>{a.subscribe(r),i=r}).then(e);return A.cancel=function(){a.unsubscribe(i)},A},t(function(i,A,r){a.reason||(a.reason=new ho(i,A,r),o(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){let t=new AbortController,o=a=>{t.abort(a)};return this.subscribe(o),t.signal.unsubscribe=()=>this.unsubscribe(o),t.signal}static source(){let t;return{token:new n(function(e){t=e}),cancel:t}}},k8=PN;function GN(n){return function(o){return n.apply(null,o)}}function FN(n){return Z.isObject(n)&&n.isAxiosError===!0}var LN={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(LN).forEach(([n,t])=>{LN[t]=n});var v8=LN;function P8(n){let t=new aC(n),o=Ru(aC.prototype.request,t);return Z.extend(o,aC.prototype,t,{allOwnKeys:!0}),Z.extend(o,t,null,{allOwnKeys:!0}),o.create=function(e){return P8(kn(n,e))},o}var kr=P8(Np);kr.Axios=aC;kr.CanceledError=ho;kr.CancelToken=k8;kr.isCancel=ju;kr.VERSION=Mg;kr.toFormData=Pc;kr.AxiosError=Oe;kr.Cancel=kr.CanceledError;kr.all=function(t){return Promise.all(t)};kr.spread=GN;kr.isAxiosError=FN;kr.mergeConfig=kn;kr.AxiosHeaders=jt;kr.formToJSON=n=>sm(Z.isHTMLForm(n)?new FormData(n):n);kr.getAdapter=Cm.getAdapter;kr.HttpStatusCode=v8;kr.default=kr;var fm=kr;var{Axios:udA,AxiosError:UN,CanceledError:CdA,isCancel:BdA,CancelToken:fdA,VERSION:QdA,all:ydA,Cancel:mdA,isAxiosError:SdA,spread:wdA,toFormData:DdA,AxiosHeaders:OdA,HttpStatusCode:bdA,formToJSON:MdA,getAdapter:_dA,mergeConfig:TdA,create:NdA}=fm;var E=ze(Mz()),b=ze(Tz()),M=ze(pV()),I5=ze(xV());import it from"fs";import LC from"path";import yS from"crypto";import oke from"querystring";var YRe=ze(FW(),1),jRe=ze(nS(),1),JRe=ze($p(),1),qRe=ze(qR(),1),zRe=ze(WR(),1),VRe=ze(tk(),1),qW=ze(IS(),1),WRe=ze(JW(),1);var Vo=qW.default;import{gzipSync as nke}from"zlib";import ske from"http";import gke from"https";import{promises as cke}from"dns";import{isIP as l5}from"net";function Y(n,t){var o={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&t.indexOf(a)<0&&(o[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,a=Object.getOwnPropertySymbols(n);e=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function S(n){return this instanceof S?(this.v=n,this):new S(n)}function j(n,t,o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=o.apply(n,t||[]),e,i=[];return e={},A("next"),A("throw"),A("return"),e[Symbol.asyncIterator]=function(){return this},e;function A(d){a[d]&&(e[d]=function(B){return new Promise(function(f,Q){i.push([d,B,f,Q])>1||r(d,B)})})}function r(d,B){try{s(a[d](B))}catch(f){I(i[0][3],f)}}function s(d){d.value instanceof S?Promise.resolve(d.value.v).then(g,c):I(i[0][2],d)}function g(d){r("next",d)}function c(d){r("throw",d)}function I(d,B){d(B),i.shift(),i.length&&r(i[0][0],i[0][1])}}function J6(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n[Symbol.asyncIterator],o;return t?t.call(n):(n=typeof j6=="function"?j6(n):n[Symbol.iterator](),o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o);function a(i){o[i]=n[i]&&function(A){return new Promise(function(r,s){A=n[i](A),e(r,s,A.done,A.value)})}}function e(i,A,r,s){Promise.resolve(s).then(function(g){i({value:g,done:r})},A)}}var CS;function Ike(){if(CS!==void 0)return CS;let n=[LC.resolve(__dirname,"..","package.json"),LC.resolve(__dirname,"..","..","package.json")];for(let t of n)try{let o=JSON.parse(it.readFileSync(t,"utf-8"));if(o.name==="@larksuiteoapi/node-sdk"&&typeof o.version=="string")return CS=o.version,o.version}catch{}return CS="unknown","unknown"}function q6(n){return n.replace(/[^a-zA-Z0-9._-]/g,"_").slice(0,64)}function VP(n,t){let o=`oapi-node-sdk/${Ike()}`;if(n){let a=q6(n);a&&(o+=` source/${a}`)}if(t?.extraTags)for(let a of t.extraTags){let e=q6(a);e&&(o+=` ${e}`)}return o}var gh=fm.create(),lke=VP();gh.interceptors.request.use(n=>(n.headers&&!n.headers["User-Agent"]&&(n.headers["User-Agent"]=lke),n),void 0,{synchronous:!0});gh.interceptors.response.use(n=>n.config.$return_headers?{data:n.data,headers:n.headers}:n.data);var Rs;(function(n){n[n.SelfBuild=0]="SelfBuild",n[n.ISV=1]="ISV"})(Rs||(Rs={}));var ks;(function(n){n[n.Feishu=0]="Feishu",n[n.Lark=1]="Lark"})(ks||(ks={}));var Bo;(function(n){n[n.fatal=0]="fatal",n[n.error=1]="error",n[n.warn=2]="warn",n[n.info=3]="info",n[n.debug=4]="debug",n[n.trace=5]="trace"})(Bo||(Bo={}));var mS=Symbol("event-type"),SS=Symbol("tenant-key"),xC=Symbol("app-ticket"),FC=Symbol("tenant-access-token"),d5=Symbol("with-helpdesk-authorization"),p5=Symbol("with-user-access-token"),dke=Symbol("user-access-token"),z6=Symbol("aily-session-record"),pke=n=>Buffer.from(n).toString("base64"),wS=class{constructor(){this.values=new Map}getCacheKey(t,o){return o?`${o}/${t.toString()}`:t}get(t,o){return h(this,void 0,void 0,function*(){let a=this.getCacheKey(t,o?.namespace),e=this.values.get(a);if(e){let{value:i,expiredTime:A}=e;if(!A||A-new Date().getTime()>0)return i}})}set(t,o,a,e){return h(this,void 0,void 0,function*(){let i=this.getCacheKey(t,e?.namespace);return this.values.set(i,{value:o,expiredTime:a}),!0})}},jC=new wS,YC=class{constructor(t){let o=yS.createHash("sha256");o.update(t),this.key=o.digest()}decrypt(t){let o=Buffer.from(t,"base64"),a=yS.createDecipheriv("aes-256-cbc",this.key,o.slice(0,16)),e=a.update(o.slice(16).toString("hex"),"hex","utf8");return e+=a.final("utf8"),e}},h5=n=>{switch(n){case ks.Feishu:return"https://open.feishu.cn";case ks.Lark:return"https://open.larksuite.com";default:return n}},u=(n,t={})=>n.replace(/:([^/]+)/g,(o,a)=>{if(t[a]!==void 0)return t[a];throw new Error(`request miss ${a} path argument`)}),DS=(n,t)=>h(void 0,void 0,void 0,function*(){(typeof n=="function"?n():n)&&(yield t())}),hke=n=>n?n.replace(/^\//,""):"",BS=(n,t=[])=>{let o={};return n&&t.forEach(a=>{Object.prototype.hasOwnProperty.call(n,a)&&(o[a]=n[a])}),o},C=n=>{var t;if(n instanceof UN){let{message:o,response:a,request:e,config:i}=BS(n,["message","response","request","config"]),r=[{message:o,config:BS(i,["data","url","params","method"]),request:BS(e,["protocol","host","path","method"]),response:BS(a,["data","status","statusText"])}],s=(t=n?.response)===null||t===void 0?void 0:t.data;return s&&(typeof s=="object"?r.push(Object.assign(Object.assign({},s),s.error?s.error:{})):r.push(s)),r}return[n]},fk=class{constructor(){this.acs={accessRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},device:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/devices`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},accessRecordAccessPhoto:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/access_records/:access_record_id/access_photo`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},user:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userFace:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"PUT",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},ruleExternal:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deviceBind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external/device_bind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},visitor:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/visitors/:visitor_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/visitors`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{accessRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},device:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/devices`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},accessRecordAccessPhoto:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/access_records/:access_record_id/access_photo`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},user:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userFace:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"PUT",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},ruleExternal:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deviceBind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external/device_bind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},visitor:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/visitors/:visitor_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/visitors`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Qk=class extends fk{constructor(){super(...arguments),this.admin={badgeGrant:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},badge:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},password:{reset:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/password/reset`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},badgeImage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badge_images`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},auditInfo:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},adminUserStat:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/admin_user_stats`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},adminDeptStat:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/admin_dept_stats`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{badgeGrant:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},badge:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},password:{reset:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/password/reset`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},badgeImage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badge_images`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},auditInfo:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},adminUserStat:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/admin_user_stats`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},adminDeptStat:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/admin_dept_stats`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},yk=class extends Qk{constructor(){super(...arguments),this.aily_rag={}}},mk=class extends yk{constructor(){super(...arguments),this.aily={v1:{ailySession:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appDataAssetTag:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_asset_tags`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_asset_tags`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appSkill:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),start:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id/start`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appKnowledge:{ask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/knowledges/ask`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appDataAsset:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/:data_asset_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/:data_asset_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadFile:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/upload_file`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},ailySessionRun:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs/:run_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs/:run_id/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ailySessionAilyMessage:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages/:aily_message_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentAgentVisibility:{check:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/agent_visibility/check`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentAgentAttachment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/attachments`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},tenantAppStat:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/app_stats`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/app_stats`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentAgentChat:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/chats/:agent_chat_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/chats`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentAgentChatSession:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions/:agent_chat_session_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions/:agent_chat_session_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentAgentArtifact:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/artifacts/:agent_artifact_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Sk=class extends mk{constructor(){super(...arguments),this.apaas={v1:{approvalTask:{addAssignee:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/add_assignee`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),agree:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/agree`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),transfer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/transfer`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reject:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/reject`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationObjectRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationObject:{oqlQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/oql_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationFunction:{invoke:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/functions/:function_api_name/invoke`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationRoleMember:{batchRemoveAuthorization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member/batch_remove_authorization`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreateAuthorization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member/batch_create_authorization`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationRecordPermissionMember:{batchCreateAuthorization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/record_permissions/:record_permission_api_name/member/batch_create_authorization`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchRemoveAuthorization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/record_permissions/:record_permission_api_name/member/batch_remove_authorization`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationEnvironmentVariable:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/environment_variables/:environment_variable_api_name`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/environment_variables/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userTask:{expediting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/expediting`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/cc`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),chatGroup:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/chat_group`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),rollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/rollback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),rollbackPoints:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/rollback_points`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/user_task/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationFlow:{execute:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/flows/:flow_id/execute`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},approvalInstance:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/approval_instances/:approval_instance_id/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationAuditLog:{auditLogList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/audit_log_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),dataChangeLogsList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/data_change_logs_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),dataChangeLogDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/data_change_log_detail`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},seatAssignment:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/seat_assignments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/seat_assignments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},seatActivity:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/seat_activities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/seat_activities`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},app:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/apps`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/apps`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workspaceTable:{recordsBatchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records_batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recordsDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recordsPatch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recordsGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recordsPost:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),tableGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workspace:{sqlCommands:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/sql_commands`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workspaceView:{viewsGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/views/:view_name/records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workspaceEnum:{enumGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/enums/:enum_name`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/enums`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tenantAppMetrics:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/tenant_app_metrics/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},wk=class extends Sk{constructor(){super(...arguments),this.application={applicationAppUsage:{overview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/overview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),messagePushOverview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/message_push_overview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),departmentOverview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/department_overview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationFeedback:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks/:feedback_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appRecommendRule:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},application:{contactsRangeConfiguration:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),underauditlistWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),underauditlist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationAppVersion:{contactsRangeSuggest:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id/contacts_range_suggest`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationVisibility:{checkWhiteBlackList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility/check_white_black_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationContactsRange:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationCollaborators:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationOwner:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/owner`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationManagement:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/management`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},scope:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/scopes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),apply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/scopes/apply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appBadge:{set:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/app_badge/set`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v5:{application:{favouriteWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v5/applications/favourite`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),favourite:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v5/applications/favourite`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recommendWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v5/applications/recommend`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),recommend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v5/applications/recommend`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v6:{applicationAppUsage:{overview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/overview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),messagePushOverview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/message_push_overview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),departmentOverview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/department_overview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationFeedback:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks/:feedback_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appRecommendRule:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},application:{contactsRangeConfiguration:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),underauditlistWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),underauditlist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationAppVersion:{contactsRangeSuggest:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id/contacts_range_suggest`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationVisibility:{checkWhiteBlackList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility/check_white_black_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationContactsRange:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationCollaborators:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationOwner:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/owner`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationManagement:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/management`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},scope:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/scopes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),apply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/scopes/apply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appBadge:{set:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/app_badge/set`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v7:{applicationBase:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v7/applications/:app_id/base`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationPublish:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v7/applications/:app_id/publish`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appAvatarUpload:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v7/app_avatar/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},applicationConfig:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v7/applications/:app_id/config`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationAbility:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v7/applications/:app_id/ability`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Dk=class extends wk{constructor(){super(...arguments),this.approval={instance:{specifiedRollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/cc`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addSign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/add_sign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchCc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/search_cc`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/preview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/remind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addCc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/add_cc`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recall:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/recall`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),detail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/detail`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),initiatedWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),initiated:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},task:{transfer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/transfer`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reject:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/reject`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),resubmit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/resubmit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),approve:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/approve`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),refuse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/refuse`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),pass:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/pass`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addSign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/add_sign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),rollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/rollback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},approval:{unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals/:approval_code`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},instanceComment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalInstance:{check:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_instances/check`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_instances`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalApproval:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_approvals/:approval_code`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_approvals`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},district:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v4:{instance:{specifiedRollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/cc`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addSign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/add_sign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchCc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/search_cc`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/preview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/remind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addCc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/add_cc`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recall:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/recall`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),detail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/detail`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),initiatedWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),initiated:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},task:{transfer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/transfer`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reject:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/reject`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),resubmit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/resubmit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),approve:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/approve`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),refuse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/refuse`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),pass:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/pass`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addSign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/add_sign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),rollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/rollback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},approval:{unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals/:approval_code`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},instanceComment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalInstance:{check:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_instances/check`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_instances`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalApproval:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_approvals/:approval_code`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_approvals`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},district:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Ok=class extends Dk{constructor(){super(...arguments),this.attendance_machine={}}},bk=class extends Ok{constructor(){super(...arguments),this.attendance={file:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/files/:file_id/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/files/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},group:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/:group_id/list_user`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userDailyShift:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreateTemp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create_temp`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userTaskRemedy:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_task_remedys`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryUserAllowedRemedys:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query_user_allowed_remedys`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},shift:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userStatsField:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_fields/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userStatsView:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_views/:user_stats_view_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_views/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},approvalInfo:{process:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/approval_infos/process`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userSetting:{modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_settings/modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_settings/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userStatsData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_datas/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},archiveRule:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),userStatsFieldsQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule/user_stats_fields_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delReport:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule/del_report`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadReport:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule/upload_report`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leaveEmployExpireRecord:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/leave_employ_expire_records/:leave_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leaveAccrualRecord:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/leave_accrual_record/:leave_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userFlow:{batchDel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/batch_del`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/:user_flow_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userApproval:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_approvals`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_approvals/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userTask:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_tasks/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{file:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/files/:file_id/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/files/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},group:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/:group_id/list_user`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userDailyShift:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreateTemp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create_temp`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userTaskRemedy:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_task_remedys`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryUserAllowedRemedys:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query_user_allowed_remedys`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},shift:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userStatsField:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_fields/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userStatsView:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_views/:user_stats_view_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_views/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},approvalInfo:{process:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/approval_infos/process`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userSetting:{modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_settings/modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_settings/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userStatsData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_datas/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},archiveRule:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),userStatsFieldsQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule/user_stats_fields_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delReport:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule/del_report`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadReport:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule/upload_report`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leaveEmployExpireRecord:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/leave_employ_expire_records/:leave_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leaveAccrualRecord:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/leave_accrual_record/:leave_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userFlow:{batchDel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/batch_del`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/:user_flow_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userApproval:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_approvals`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_approvals/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userTask:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_tasks/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Mk=class extends bk{constructor(){super(...arguments),this.audio_video_ai={}}},_k=class extends Mk{constructor(){super(...arguments),this.auth={appAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/app_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),internal:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/app_access_token/internal`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tenantAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/tenant_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),internal:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTicket:{resend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/app_ticket/resend`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v3:{appAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/app_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),internal:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/app_access_token/internal`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tenantAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/tenant_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),internal:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTicket:{resend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/app_ticket/resend`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Tk=class extends _k{constructor(){super(...arguments),this.authen={userInfo:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/user_info`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},accessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},refreshAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/refresh_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},oidcAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/oidc/access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},oidcRefreshAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/oidc/refresh_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{userInfo:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/user_info`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},accessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},refreshAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/refresh_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},oidcAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/oidc/access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},oidcRefreshAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/oidc/refresh_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Nk=class extends Tk{constructor(){super(...arguments),this.authz={}}},Rk=class extends Nk{constructor(){super(...arguments),this.aweme_ecosystem={}}},kk=class extends Rk{constructor(){super(...arguments),this.baike={entity:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/match`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),highlight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/highlight`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),extract:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/extract`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},classification:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},file:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/files/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/files/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},draft:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/drafts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/drafts/:draft_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{entity:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/match`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),highlight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/highlight`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),extract:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/extract`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},classification:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},file:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/files/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/files/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},draft:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/drafts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/drafts/:draft_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},vk=class extends kk{constructor(){super(...arguments),this.base={v2:{appRole:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/base/v2/apps/:app_token/roles/:role_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Pk=class extends vk{constructor(){super(...arguments),this.bitable={appTable:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appDashboard:{copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards/:block_id/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},app:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableRecord:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appRoleMember:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appRole:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableView:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableForm:{upgrade:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/upgrade`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableFieldGroup:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/field_groups`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableFormField:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields/:field_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appWorkflow:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows/:workflow_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableField:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appBlockWorkflow:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/block_workflows`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{appTable:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appDashboard:{copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards/:block_id/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},app:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableRecord:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appRoleMember:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appRole:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableView:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableForm:{upgrade:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/upgrade`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableFieldGroup:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/field_groups`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableFormField:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields/:field_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appWorkflow:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows/:workflow_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableField:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appBlockWorkflow:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/block_workflows`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Gk=class extends Pk{constructor(){super(...arguments),this.block={entity:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/block/v2/entities`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/block/v2/entities/:block_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},message:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/block/v2/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v2:{entity:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/block/v2/entities`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/block/v2/entities/:block_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},message:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/block/v2/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Fk=class extends Gk{constructor(){super(...arguments),this.board={v1:{whiteboardNode:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),createPlantuml:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes/plantuml`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},whiteboard:{downloadAsImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/download_as_image`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),theme:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/theme`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateTheme:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/update_theme`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Lk=class extends Fk{constructor(){super(...arguments),this.bot={v4:{bot:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bot/v4/bot/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bot/v4/bot/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Uk=class extends Lk{constructor(){super(...arguments),this.c360={}}},Hk=class extends Uk{constructor(){super(...arguments),this.calendar={exchangeBinding:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/exchange_bindings`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendar:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),primarys:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/primarys`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),primary:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/primary`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarAcl:{unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/:acl_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEvent:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/reply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),instances:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/instances`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),instanceView:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/instance_view`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventAttendee:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},setting:{generateCaldavConf:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/settings/generate_caldav_conf`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},timeoffEvent:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/timeoff_events/:timeoff_event_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/timeoff_events`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventMeetingMinute:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_minute`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventMeetingChat:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},freebusy:{batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/freebusy/batch`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/freebusy/list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventAttendeeChatMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v4:{exchangeBinding:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/exchange_bindings`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendar:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),primarys:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/primarys`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),primary:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/primary`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarAcl:{unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/:acl_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEvent:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/reply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),instances:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/instances`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),instanceView:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/instance_view`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventAttendee:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},setting:{generateCaldavConf:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/settings/generate_caldav_conf`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},timeoffEvent:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/timeoff_events/:timeoff_event_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/timeoff_events`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventMeetingMinute:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_minute`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventMeetingChat:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},freebusy:{batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/freebusy/batch`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/freebusy/list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventAttendeeChatMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Kk=class extends Hk{constructor(){super(...arguments),this.cardkit={v1:{card:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),settings:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/settings`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),idConvert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/id_convert`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},cardElement:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),content:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id/content`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},xk=class extends Kk{constructor(){super(...arguments),this.ccm_unified_resource={}}},Yk=class extends xk{constructor(){super(...arguments),this.collab_plugins={}}},jk=class extends Yk{constructor(){super(...arguments),this.comment_sdk={}}},Jk=class extends jk{constructor(){super(...arguments),this.compensation={v1:{indicator:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/indicators`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/indicators`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},socialPlan:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/social_plans/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/social_plans`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/social_plans`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},item:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/items`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/items`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},plan:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/plans`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/plans`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},socialInsurance:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/social_insurances`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},itemCategory:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/item_categories`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/item_categories`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},changeReason:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/change_reasons`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/change_reasons`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},archive:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/archives`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/archives/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},recurringPayment:{queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/recurring_payment/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/recurring_payment/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchRemove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},socialArchive:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/social_archive/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},socialArchiveAdjustRecord:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/social_archive_adjust_record/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},lumpSumPayment:{batchRemove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryDetailWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query_detail`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query_detail`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},qk=class extends Jk{constructor(){super(...arguments),this.contact={group:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),memberBelong:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/member_belong`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),simplelistWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),simplelist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},unit:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/list_department`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unbindDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/unbind_department`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),bindDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/bind_department`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},groupMember:{simplelist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/simplelist`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),add:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/add`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchRemove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchAdd:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_add`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},department:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateDepartmentId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id/update_department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unbindDepartmentChat:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/unbind_department_chat`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),parentWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),parent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),childrenWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),children:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/batch`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobLevel:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobFamily:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},user:{updateUserId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id/update_user_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),resurrect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id/resurrect`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGetId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/batch_get_id`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),findByDepartmentWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),findByDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),basicBatch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/basic_batch`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/batch`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeeTypeEnum:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},functionalRoleMember:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/:member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_delete`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),scopes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/scopes`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},functionalRole:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobTitle:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_titles/:job_title_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workCity:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/work_cities/:work_city_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},scope:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customAttr:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v3:{group:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),memberBelong:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/member_belong`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),simplelistWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),simplelist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},unit:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/list_department`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unbindDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/unbind_department`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),bindDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/bind_department`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},groupMember:{simplelist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/simplelist`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),add:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/add`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchRemove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchAdd:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_add`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},department:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateDepartmentId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id/update_department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unbindDepartmentChat:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/unbind_department_chat`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),parentWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),parent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),childrenWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),children:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/batch`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobLevel:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobFamily:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},user:{updateUserId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id/update_user_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),resurrect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id/resurrect`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGetId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/batch_get_id`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),findByDepartmentWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),findByDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),basicBatch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/basic_batch`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/batch`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeeTypeEnum:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},functionalRoleMember:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/:member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_delete`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),scopes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/scopes`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},functionalRole:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobTitle:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_titles/:job_title_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workCity:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/work_cities/:work_city_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},scope:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customAttr:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},zk=class extends qk{constructor(){super(...arguments),this.content_check={}}},Vk=class extends zk{constructor(){super(...arguments),this.contract={}}},Wk=class extends Vk{constructor(){super(...arguments),this.corehr={contract:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},company:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeeType:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},nationalIdType:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},subregion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subregions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subregions/:subregion_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},countryRegion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/country_regions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/country_regions/:country_region_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},subdivision:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subdivisions/:subdivision_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subdivisions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},preHire:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},person:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobLevel:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobFamily:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},job:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobChange:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_changes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workingHoursType:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},department:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},location:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},file:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/files/:id`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},processFormVariableData:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/processes/:process_id/form_variable_data`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},commonDataId:{convert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/common_data/id/convert`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leaveGrantingRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leave_granting_records/:leave_granting_record_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leave_granting_records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leave:{leaveTypes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/leave_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),workCalendar:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),workCalendarDate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar_date`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),calendarByScope:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/calendar_by_scope`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leaveBalances:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/leave_balances`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leaveRequestHistory:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/leave_request_history`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offboarding:{submit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/submit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},securityGroup:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/security_groups`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/security_groups/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customField:{listObjectApiName:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/custom_fields/list_object_api_name`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getByParam:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/custom_fields/get_by_param`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/custom_fields/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},commonDataMetaData:{editEnumOption:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/edit_enum_option`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addEnumOption:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/add_enum_option`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},authorization:{updateRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/update_role_assign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/remove_role_assign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/add_role_assign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getByParam:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/get_by_param`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},assignedUser:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/assigned_users/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobData:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},currency:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/currencies`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/currencies/:currency_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},transferReason:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/transfer_reasons/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},transferType:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/transfer_types/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},compensationStandard:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/compensation_standards/match`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{contract:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},company:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeeType:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},nationalIdType:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},subregion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subregions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subregions/:subregion_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},countryRegion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/country_regions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/country_regions/:country_region_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},subdivision:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subdivisions/:subdivision_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subdivisions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},preHire:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},person:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobLevel:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobFamily:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},job:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobChange:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_changes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workingHoursType:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},department:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},location:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},file:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/files/:id`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},processFormVariableData:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/processes/:process_id/form_variable_data`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},commonDataId:{convert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/common_data/id/convert`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leaveGrantingRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leave_granting_records/:leave_granting_record_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leave_granting_records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leave:{leaveTypes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/leave_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),workCalendar:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),workCalendarDate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar_date`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),calendarByScope:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/calendar_by_scope`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leaveBalances:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/leave_balances`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leaveRequestHistory:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/leave_request_history`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offboarding:{submit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/submit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},securityGroup:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/security_groups`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/security_groups/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customField:{listObjectApiName:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/custom_fields/list_object_api_name`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getByParam:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/custom_fields/get_by_param`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/custom_fields/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},commonDataMetaData:{editEnumOption:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/edit_enum_option`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addEnumOption:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/add_enum_option`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},authorization:{updateRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/update_role_assign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/remove_role_assign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/add_role_assign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getByParam:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/get_by_param`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},assignedUser:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/assigned_users/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobData:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},currency:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/currencies`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/currencies/:currency_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},transferReason:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/transfer_reasons/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},transferType:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/transfer_types/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},compensationStandard:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/compensation_standards/match`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{costCenter:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/query_multi_timeline`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),tree:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/tree`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoCountryRegionSubdivision:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/country_region_subdivisions/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/country_region_subdivisions/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},probation:{submit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/submit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),withdraw:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/withdraw`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),enableDisableAssessment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/enable_disable_assessment`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),edit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/edit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},probationAssessment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/assessments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customOrg:{deleteOrg:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs/delete_org`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs/active`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs/:org_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateRule:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs/update_rule`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},preHire:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),transitTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/transit_task`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),withdrawOnboarding:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/withdraw_onboarding`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),restoreFlowInstance:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/restore_flow_instance`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),transformOnboardingTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/transform_onboarding_task`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),complete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/complete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobGrade:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_grades/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_grades/:job_grade_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_grades/:job_grade_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_grades`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_grades/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_grades/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},position:{active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/positions/active`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delPosition:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/positions/del_position`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/positions/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/positions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/positions/:position_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeesBp:{batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/bps/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},bp:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/bps`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/bps`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getByDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/bps/get_by_department`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeesAdditionalJob:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoNationality:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/nationalities/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/nationalities/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoCountryRegion:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/country_regions/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/country_regions/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoCity:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/cities/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/cities/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoDistrict:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/districts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/districts/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoBank:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/banks/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/banks/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoCurrency:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/currencies/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/currencies/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeeCustomOrg:{del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_org/del`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),createEmpCustomOrg:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_org/create_emp_custom_org`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),editEmpCustomOrg:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_org/edit_emp_custom_org`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),employmentCustomOrgRecord:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_org/employment_custom_org_record`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),querybyid:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_org/querybyid`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},signatureFile:{listByBizId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_files/list_by_biz_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_files/:signature_file_id/download`,A),method:"POST",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),terminate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_files/terminate`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_files/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_files/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_files`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_files`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},signatureNode:{listByFileId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_nodes/list_by_file_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},company:{active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/companies/active`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/companies/query_multi_timeline`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/companies/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},department:{queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryOperationLogsWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/query_operation_logs`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryOperationLogs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/query_operation_logs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/:department_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/:department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/query_timeline`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/query_multi_timeline`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),parents:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/parents`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),tree:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/tree`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},draft:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/drafts/:draft_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},approvalGroups:{openQueryPositionChangeListByIds:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_position_change_list_by_ids`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/approval_groups/:process_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),openQueryJobChangeListByIds:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_job_change_list_by_ids`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),openQueryDepartmentChangeListByIds:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_department_change_list_by_ids`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},location:{active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/active`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/query_multi_timeline`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/:location_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},locationAddress:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoLanguage:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/languages/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/languages/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoTimeZone:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reportDetailRow:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchDelete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchSave:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchSave`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workforcePlanDetailRow:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/workforce_plan_detail_row/batchDelete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchSave:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/workforce_plan_detail_row/batchSave`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offboarding:{submitV2:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/offboardings/submit_v2`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),edit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/offboardings/edit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),revoke:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/offboardings/revoke`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoBankBranch:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/bank_branchs/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/bank_branchs/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},enum:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/enums/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},process:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),flowVariableData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes/:process_id/flow_variable_data`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes/:process_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processApprover:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes/:process_id/approvers/:approver_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processWithdraw:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/process_withdraw/:process_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},approver:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/approvers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/approvers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processTransfer:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes/:process_id/transfer`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processExtra:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes/:process_id/extra`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobLevel:{queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_levels/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_levels/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_levels/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobFamily:{queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_families/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_families/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_families/query_multi_timeline`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_families/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},job:{queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/jobs/query_multi_timeline`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/jobs/:job_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/jobs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/jobs/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeesInternationalAssignment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/international_assignments/:international_assignment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/international_assignments/:international_assignment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processFormVariableData:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes/:process_id/form_variable_data`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},pathway:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pathways`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pathways/:pathway_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pathways/:pathway_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pathways/active`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pathways/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processStart:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/process_start`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},costAllocation:{batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_allocations/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_allocations/update_version`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),createVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_allocations/create_version`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_allocations/remove_version`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},costCenterVersion:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions/:version_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions/:version_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processQueryFlowDataTemplate:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/query_flow_data_template`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},defaultCostCenter:{createVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/default_cost_centers/create_version`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/default_cost_centers/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/default_cost_centers/remove_version`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/default_cost_centers/update_version`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processRevoke:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/process_revoke/:process_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},signatureTemplateInfoWithThumbnail:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobChange:{revoke:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_changes/:job_change_id/revoke`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_changes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_changes/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_changes/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},contract:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/contracts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/contracts/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workforcePlanDetail:{batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/workforce_plan_details/batch`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchV2:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/workforce_plan_details/batch_v2`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employee:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},signatureTemplate:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_templates/search`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeesJobData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/job_datas/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/job_datas/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},person:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/persons/:person_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/persons`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workforcePlan:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/workforce_plans`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/workforce_plans`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Zk=class extends Wk{constructor(){super(...arguments),this.data_cube={}}},Xk=class extends Zk{constructor(){super(...arguments),this.device={}}},$k=class extends Xk{constructor(){super(...arguments),this.directory={v1:{employee:{resurrect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/:employee_id/resurrect`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),regular:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/:employee_id/regular`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),toBeResigned:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/:employee_id/to_be_resigned`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/:employee_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/:employee_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),filter:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/filter`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},collaborationTenant:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/collaboration_tenants`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/collaboration_tenants`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},collaborationRule:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/collaboration_rules/:collaboration_rule_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/collaboration_rules`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/collaboration_rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/collaboration_rules`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/collaboration_rules/:collaboration_rule_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},collborationShareEntity:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/share_entities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/share_entities`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},department:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/departments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/departments/:department_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/departments/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/departments/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/departments/:department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),filter:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/departments/filter`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},ev=class extends $k{constructor(){super(...arguments),this.docs_ai={}}},Av=class extends ev{constructor(){super(...arguments),this.docs_tool={}}},tv=class extends Av{constructor(){super(...arguments),this.docs={v1:{content:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docs/v1/content`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},rv=class extends tv{constructor(){super(...arguments),this.document_ai={v1:{businessCard:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/business_card/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},contract:{fieldExtraction:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/contract/field_extraction`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},businessLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/business_license/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},drivingLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/driving_license/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},vehicleLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/vehicle_license/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},foodManageLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/food_manage_license/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},foodProduceLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/food_produce_license/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},hkmMainlandTravelPermit:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/hkm_mainland_travel_permit/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},chinesePassport:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/chinese_passport/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},twMainlandTravelPermit:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/tw_mainland_travel_permit/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},healthCertificate:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/health_certificate/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},vehicleInvoice:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/vehicle_invoice/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},resume:{parse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/resume/parse`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},bankCard:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/bank_card/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},trainInvoice:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/train_invoice/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},taxiInvoice:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/taxi_invoice/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},vatInvoice:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/vat_invoice/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},idCard:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/id_card/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})}}}}},iv=class extends rv{constructor(){super(...arguments),this.docx={document:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),rawContent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/raw_content`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),convert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncementBlockChildren:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},documentBlockChildren:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncement:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncementBlock:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},documentBlock:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},documentBlockDescendant:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/descendant`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{document:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),rawContent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/raw_content`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),convert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncementBlockChildren:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},documentBlockChildren:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncement:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncementBlock:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},documentBlock:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},documentBlockDescendant:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/descendant`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},av=class extends iv{constructor(){super(...arguments),this.drive={file:{createFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/create_folder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),move:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/move`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),createShortcut:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/create_shortcut`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_part`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),taskCheck:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/task_check`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deleteSubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/delete_subscribe`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getSubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/get_subscribe`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),uploadPrepare:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_prepare`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadFinish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_finish`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadAll:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_all`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meta:{batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/metas/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileSubscription:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},exportTask:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/export_tasks/file/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/export_tasks/:ticket`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/export_tasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileVersion:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileViewRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileStatistics:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/statistics`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},permissionPublicPassword:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileComment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},media:{batchGetTmpDownloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/batch_get_tmp_download_url`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_part`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),uploadFinish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_finish`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadAll:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_all`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),uploadPrepare:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_prepare`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},importTask:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/import_tasks/:ticket`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/import_tasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},user:{subscriptionStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/user/subscription_status`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeSubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/user/remove_subscription`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/user/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileCommentReply:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},permissionPublic:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},permissionMember:{batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),transferOwner:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/transfer_owner`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),auth:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/auth`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{file:{createFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/create_folder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),move:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/move`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),createShortcut:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/create_shortcut`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_part`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),taskCheck:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/task_check`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deleteSubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/delete_subscribe`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getSubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/get_subscribe`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),uploadPrepare:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_prepare`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadFinish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_finish`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadAll:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_all`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meta:{batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/metas/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileSubscription:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},exportTask:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/export_tasks/file/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/export_tasks/:ticket`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/export_tasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileVersion:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileViewRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileStatistics:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/statistics`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},permissionPublicPassword:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileComment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},media:{batchGetTmpDownloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/batch_get_tmp_download_url`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_part`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),uploadFinish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_finish`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadAll:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_all`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),uploadPrepare:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_prepare`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},importTask:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/import_tasks/:ticket`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/import_tasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},user:{subscriptionStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/user/subscription_status`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeSubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/user/remove_subscription`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/user/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileCommentReply:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},permissionPublic:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},permissionMember:{batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),transferOwner:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/transfer_owner`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),auth:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/auth`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{fileLike:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v2/files/:file_token/likes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v2/files/:file_token/likes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},commentReaction:{updateReaction:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v2/files/:file_token/comments/reaction`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},permissionPublic:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v2/permissions/:token/public`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v2/permissions/:token/public`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},ov=class extends av{constructor(){super(...arguments),this.ea_symphony={}}},nv=class extends ov{constructor(){super(...arguments),this.edu={}}},sv=class extends nv{constructor(){super(...arguments),this.ehr={attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/ehr/v1/attachments/:token`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},employee:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/ehr/v1/attachments/:token`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},employee:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},gv=class extends sv{constructor(){super(...arguments),this.elearning={}}},cv=class extends gv{constructor(){super(...arguments),this.event={outboundIp:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},connection:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/event/v1/connection`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{outboundIp:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},connection:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/event/v1/connection`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Iv=class extends cv{constructor(){super(...arguments),this.exam={}}},lv=class extends Iv{constructor(){super(...arguments),this.face_detection={}}},dv=class extends lv{constructor(){super(...arguments),this.financial_access_platform={}}},pv=class extends dv{constructor(){super(...arguments),this.grounding={}}},hv=class extends pv{constructor(){super(...arguments),this.gtm_ai={}}},Ev=class extends hv{constructor(){super(...arguments),this.helpdesk={agent:{agentEmail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_emails`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSchedule:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSkill:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSkillRule:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skill_rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},category:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},event:{subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/events/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/events/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},faq:{faqImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id/image/:image_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSchedules:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ticket:{customizedFields:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/customized_fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),ticketImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_images`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),startService:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/start_service`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),answerUserQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/answer_user_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ticketCustomizedField:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},notification:{cancelApprove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_approve`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancelSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),executeSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/execute_send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/preview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),submitApprove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/submit_approve`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ticketMessage:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},botMessage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{agent:{agentEmail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_emails`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSchedule:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSkill:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSkillRule:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skill_rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},category:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},event:{subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/events/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/events/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},faq:{faqImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id/image/:image_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSchedules:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ticket:{customizedFields:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/customized_fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),ticketImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_images`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),startService:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/start_service`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),answerUserQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/answer_user_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ticketCustomizedField:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},notification:{cancelApprove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_approve`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancelSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),executeSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/execute_send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/preview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),submitApprove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/submit_approve`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ticketMessage:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},botMessage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},uv=class extends Ev{constructor(){super(...arguments),this.hire={websiteChannel:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRoundType:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_round_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerCustomField:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_custom_fields/:offer_custom_field_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteDelivery:{createByAttachment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_attachment`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),createByResume:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_resume`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRecordAttachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records/attachments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talent:{batchGetId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/batch_get_id`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),onboardStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/onboard_status`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addToFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/add_to_folder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),tag:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeToFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/remove_to_folder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/combined_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/combined_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalInterviewAssessment:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interview_assessments/:external_interview_assessment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interview_assessments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},referralWebsiteJobPost:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts/:job_post_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},job:{config:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/config`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),close:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/close`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateConfig:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/update_config`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),open:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/open`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recruiter:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/recruiter`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/combined_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/combined_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/get_detail`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},location:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/locations/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalReferralReward:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_referral_rewards`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_referral_rewards/:external_referral_reward_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},note:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerApprovalTemplate:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_approval_templates`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},website:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},examMarkingTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},referral:{getByApplication:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referrals/get_by_application`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referrals/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},exam:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/exams`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobRequirementSchema:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirement_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoAccountCustomField:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentExternalInfo:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},questionnaire:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/questionnaires`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoExamPaper:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exam_papers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offer:{internOfferStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id/intern_offer_status`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),offerStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id/offer_status`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoBackgroundCheck:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_checks/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateResult:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_result`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateProgress:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_progress`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agency:{protect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/protect`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/:agency_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),protectSearch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/protection_period/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),operateAgencyAccount:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/operate_agency_account`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getAgencyAccount:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/get_agency_account`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentPool:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchChangeTalentPool:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/batch_change_talent_pool`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),moveTalent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/talent_relationship`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},diversityInclusion:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/diversity_inclusions/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoExam:{loginInfo:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/login_info`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateResult:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/update_result`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},terminationReason:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobManager:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/:manager_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobPublishRecord:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_publish_records/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteJobPost:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/:job_post_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobType:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalApplication:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoBackgroundCheckCustomField:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},application:{transferStage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_stage`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recover:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/recover`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),terminate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/terminate`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),transferOnboard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_onboard`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),offer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/offer`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancelOnboard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/cancel_onboard`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/get_detail`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},registrationSchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},role:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/roles/:role_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRecord:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records/:interview_record_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewer:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviewers/:interviewer_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentFolder:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interview:{getByTalent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviews/get_by_talent`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviews`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},referralAccount:{enable:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/enable`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),withdraw:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/withdraw`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deactivate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/deactivate`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reconciliation:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/reconciliation`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getAccountAssets:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/get_account_assets`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ehrImportTask:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/ehr_import_tasks/:ehr_import_task_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteDeliveryTask:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/delivery_tasks/:delivery_task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentObject:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_objects/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobSchema:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobFunction:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},advertisement:{publish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/advertisements/:advertisement_id/publish`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerSchema:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_schemas/:offer_schema_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id/preview`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/attachments`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},applicationInterview:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/interviews`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteSiteUser:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/site_users`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tripartiteAgreement:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoBackgroundCheckPackage:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_packages`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},resumeSource:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerApplicationForm:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_application_forms`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_application_forms/:offer_application_form_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentTag:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentOperationLog:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_operation_logs/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userRole:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalInterview:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalBackgroundCheck:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},todo:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalOffer:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentBlocklist:{changeTalentBlock:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_blocklist/change_talent_block`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},portalApplySchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRegistrationSchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobRequirement:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listById:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},backgroundCheckOrder:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/background_check_orders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employee:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getByApplication:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/employees/get_by_application`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},subject:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/subjects`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewFeedbackForm:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},evaluationTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},evaluation:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobProcess:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_processes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},minutes:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/minutes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},test:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{websiteChannel:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRoundType:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_round_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerCustomField:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_custom_fields/:offer_custom_field_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteDelivery:{createByAttachment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_attachment`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),createByResume:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_resume`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRecordAttachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records/attachments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talent:{batchGetId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/batch_get_id`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),onboardStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/onboard_status`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addToFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/add_to_folder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),tag:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeToFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/remove_to_folder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/combined_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/combined_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalInterviewAssessment:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interview_assessments/:external_interview_assessment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interview_assessments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},referralWebsiteJobPost:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts/:job_post_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},job:{config:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/config`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),close:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/close`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateConfig:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/update_config`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),open:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/open`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recruiter:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/recruiter`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/combined_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/combined_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/get_detail`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},location:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/locations/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalReferralReward:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_referral_rewards`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_referral_rewards/:external_referral_reward_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},note:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerApprovalTemplate:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_approval_templates`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},website:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},examMarkingTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},referral:{getByApplication:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referrals/get_by_application`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referrals/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},exam:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/exams`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobRequirementSchema:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirement_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoAccountCustomField:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentExternalInfo:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},questionnaire:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/questionnaires`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoExamPaper:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exam_papers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offer:{internOfferStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id/intern_offer_status`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),offerStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id/offer_status`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoBackgroundCheck:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_checks/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateResult:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_result`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateProgress:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_progress`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agency:{protect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/protect`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/:agency_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),protectSearch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/protection_period/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),operateAgencyAccount:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/operate_agency_account`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getAgencyAccount:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/get_agency_account`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentPool:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchChangeTalentPool:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/batch_change_talent_pool`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),moveTalent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/talent_relationship`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},diversityInclusion:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/diversity_inclusions/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoExam:{loginInfo:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/login_info`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateResult:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/update_result`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},terminationReason:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobManager:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/:manager_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobPublishRecord:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_publish_records/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteJobPost:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/:job_post_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobType:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalApplication:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoBackgroundCheckCustomField:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},application:{transferStage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_stage`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recover:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/recover`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),terminate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/terminate`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),transferOnboard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_onboard`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),offer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/offer`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancelOnboard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/cancel_onboard`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/get_detail`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},registrationSchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},role:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/roles/:role_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRecord:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records/:interview_record_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewer:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviewers/:interviewer_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentFolder:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interview:{getByTalent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviews/get_by_talent`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviews`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},referralAccount:{enable:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/enable`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),withdraw:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/withdraw`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deactivate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/deactivate`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reconciliation:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/reconciliation`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getAccountAssets:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/get_account_assets`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ehrImportTask:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/ehr_import_tasks/:ehr_import_task_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteDeliveryTask:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/delivery_tasks/:delivery_task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentObject:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_objects/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobSchema:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobFunction:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},advertisement:{publish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/advertisements/:advertisement_id/publish`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerSchema:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_schemas/:offer_schema_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id/preview`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/attachments`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},applicationInterview:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/interviews`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteSiteUser:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/site_users`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tripartiteAgreement:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoBackgroundCheckPackage:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_packages`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},resumeSource:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerApplicationForm:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_application_forms`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_application_forms/:offer_application_form_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentTag:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentOperationLog:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_operation_logs/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userRole:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalInterview:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalBackgroundCheck:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},todo:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalOffer:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentBlocklist:{changeTalentBlock:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_blocklist/change_talent_block`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},portalApplySchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRegistrationSchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobRequirement:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listById:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},backgroundCheckOrder:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/background_check_orders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employee:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getByApplication:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/employees/get_by_application`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},subject:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/subjects`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewFeedbackForm:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},evaluationTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},evaluation:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobProcess:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_processes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},minutes:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/minutes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},test:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{talent:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v2/talents/:talent_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v2/interview_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v2/interview_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v2/interview_records/:interview_record_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Cv=class extends uv{constructor(){super(...arguments),this.human_authentication={identity:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/human_authentication/v1/identities`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{identity:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/human_authentication/v1/identities`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Bv=class extends Cv{constructor(){super(...arguments),this.im={message:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),pushFollowUp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/push_follow_up`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),urgentApp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_app`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),urgentPhone:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_phone`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),urgentSms:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_sms`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mergeForward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/merge_forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),readUsers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/read_users`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),replyByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=i,g=Y(i,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:c,params:e,headers:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(C(I)),I})}),createByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=i,g=Y(i,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:c,params:e,headers:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(C(I)),I})}),updateByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=i,g=Y(i,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:c,params:e,headers:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(C(I)),I})})},batchMessage:{readUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/read_user`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getProgress:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/get_progress`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatMembers:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),isInChat:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/is_in_chat`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),meJoin:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/me_join`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},pin:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins/:message_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chat:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),link:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/link`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatModeration:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatTab:{listTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/list_tabs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sortTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/sort_tabs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deleteTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/delete_tabs`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/update_tabs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatTopNotice:{deleteTopNotice:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/delete_top_notice`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),putTopNotice:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/put_top_notice`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncement:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatMenuTree:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sort:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree/sort`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatManagers:{deleteManagers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/delete_managers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addManagers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/add_managers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatMenuItem:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_items/:menu_item_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},image:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/images/:image_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/images`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},messageReaction:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions/:reaction_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/reactions/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},file:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/files/:file_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/files`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},messageResource:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/resources/:file_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},thread:{forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/threads/:thread_id/forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{message:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),pushFollowUp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/push_follow_up`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),urgentApp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_app`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),urgentPhone:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_phone`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),urgentSms:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_sms`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mergeForward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/merge_forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),readUsers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/read_users`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),replyByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=i,g=Y(i,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:c,params:e,headers:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(C(I)),I})}),createByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=i,g=Y(i,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:c,params:e,headers:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(C(I)),I})}),updateByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=i,g=Y(i,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:c,params:e,headers:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(C(I)),I})})},batchMessage:{readUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/read_user`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getProgress:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/get_progress`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatMembers:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),isInChat:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/is_in_chat`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),meJoin:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/me_join`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},pin:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins/:message_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chat:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),link:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/link`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatModeration:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatTab:{listTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/list_tabs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sortTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/sort_tabs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deleteTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/delete_tabs`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/update_tabs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatTopNotice:{deleteTopNotice:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/delete_top_notice`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),putTopNotice:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/put_top_notice`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncement:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatMenuTree:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sort:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree/sort`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatManagers:{deleteManagers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/delete_managers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addManagers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/add_managers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatMenuItem:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_items/:menu_item_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},image:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/images/:image_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/images`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},messageReaction:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions/:reaction_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/reactions/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},file:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/files/:file_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/files`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},messageResource:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/resources/:file_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},thread:{forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/threads/:thread_id/forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{bizEntityTagRelation:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},urlPreview:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/url_previews/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appFeedCardBatch:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/app_feed_card/batch`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/app_feed_card/batch`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},feedCard:{botTimeSentive:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/feed_cards/bot_time_sentive`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/feed_cards/:feed_card_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tag:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/tags`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/tags/:tag_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatButton:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/chat_button`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appFeedCard:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/app_feed_card`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chat:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/chats/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/chats/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},fv=class extends Bv{constructor(){super(...arguments),this.inline_platform={}}},Qv=class extends fv{constructor(){super(...arguments),this.laps={}}},yv=class extends Qv{constructor(){super(...arguments),this.lingo={v1:{file:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/files/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/files/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},entity:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities/match`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),highlight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities/highlight`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},repo:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/repos`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},classification:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/classifications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/classifications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},draft:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/drafts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/drafts/:draft_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},mv=class extends yv{constructor(){super(...arguments),this.llpp={}}},Sv=class extends mv{constructor(){super(...arguments),this.mail={mailgroupMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroupPermissionMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroup:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},publicMailboxMember:{clear:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/clear`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroupAlias:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases/:alias_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},publicMailboxAlias:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailbox:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),accessibleMailboxes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/accessible_mailboxes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),profile:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/profile`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxAlias:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroupManager:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},publicMailbox:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeToRecycleBin:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/remove_to_recycle_bin`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},user:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/users/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxMessage:{getByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/get_by_card`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),send:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchModify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sendStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/send_status`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/modify`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchTrash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),trash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listThreadMessage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxThread:{batchModify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchTrash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),trash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxEvent:{unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscription`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxMailContact:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxLabel:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxDraft:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancelScheduledSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/cancel_scheduled_send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),send:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id/send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxRule:{reorder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/reorder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxSetting:{sendAs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/send_as`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getSignatures:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/signatures`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxSentMessage:{getRecallDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recall:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxTemplate:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxTemplateAttachment:{downloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id/attachments/download_url`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},multiEntity:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/multi_entity/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxFolder:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxMessageAttachment:{downloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/attachments/download_url`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{mailgroupMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroupPermissionMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroup:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},publicMailboxMember:{clear:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/clear`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroupAlias:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases/:alias_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},publicMailboxAlias:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailbox:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),accessibleMailboxes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/accessible_mailboxes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),profile:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/profile`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxAlias:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroupManager:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},publicMailbox:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeToRecycleBin:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/remove_to_recycle_bin`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},user:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/users/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxMessage:{getByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/get_by_card`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),send:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchModify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sendStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/send_status`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/modify`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchTrash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),trash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listThreadMessage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxThread:{batchModify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchTrash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),trash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxEvent:{unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscription`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxMailContact:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxLabel:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxDraft:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancelScheduledSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/cancel_scheduled_send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),send:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id/send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxRule:{reorder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/reorder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxSetting:{sendAs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/send_as`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getSignatures:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/signatures`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxSentMessage:{getRecallDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recall:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxTemplate:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxTemplateAttachment:{downloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id/attachments/download_url`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},multiEntity:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/multi_entity/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxFolder:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxMessageAttachment:{downloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/attachments/download_url`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},wv=class extends Sv{constructor(){super(...arguments),this.mcp={}}},Dv=class extends wv{constructor(){super(...arguments),this.mdm={userAuthDataRelation:{unbind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/unbind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),bind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/bind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{userAuthDataRelation:{unbind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/unbind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),bind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/bind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v3:{countryRegion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mdm/v3/country_regions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},batchCountryRegion:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mdm/v3/batch_country_region`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Ov=class extends Dv{constructor(){super(...arguments),this.meeting_room={}}},bv=class extends Ov{constructor(){super(...arguments),this.mindnote={}}},Mv=class extends bv{constructor(){super(...arguments),this.minutes={v1:{minuteTranscript:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/transcript`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},minuteStatistics:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/statistics`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},minuteMedia:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/media`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},minute:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),artifacts:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/artifacts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},_v=class extends Mv{constructor(){super(...arguments),this.moments={post:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/moments/v1/posts/:post_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{post:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/moments/v1/posts/:post_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Tv=class extends _v{constructor(){super(...arguments),this.myai_ai_extension={}}},Nv=class extends Tv{constructor(){super(...arguments),this.myai_assistant={}}},Rv=class extends Nv{constructor(){super(...arguments),this.myai_base_ai={}}},kv=class extends Rv{constructor(){super(...arguments),this.myai_ccm_extension={}}},vv=class extends kv{constructor(){super(...arguments),this.myai_data={}}},Pv=class extends vv{constructor(){super(...arguments),this.myai_im_extension={}}},Gv=class extends Pv{constructor(){super(...arguments),this.myai_mail={}}},Fv=class extends Gv{constructor(){super(...arguments),this.myai_memory_reflection={}}},Lv=class extends Fv{constructor(){super(...arguments),this.myai_scenario_summary={}}},Uv=class extends Lv{constructor(){super(...arguments),this.myai_slides={}}},Hv=class extends Uv{constructor(){super(...arguments),this.myai_url_extension={}}},Kv=class extends Hv{constructor(){super(...arguments),this.myai={}}},xv=class extends Kv{constructor(){super(...arguments),this.okr={review:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/reviews/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},periodRule:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/period_rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},progressRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},period:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/periods`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/periods`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/periods/:period_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okr:{batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/okrs/batch_get`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userOkr:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/users/:user_id/okrs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},image:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/images/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},v1:{review:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/reviews/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},periodRule:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/period_rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},progressRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},period:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/periods`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/periods`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/periods/:period_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okr:{batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/okrs/batch_get`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userOkr:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/users/:user_id/okrs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},image:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/images/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})}},v2:{okrAlignment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/alignments/:alignment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/alignments/:alignment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrObjective:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),keyResultsPosition:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results_position`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),keyResultsWeight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results_weight`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrKeyResult:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrObjectiveAlignment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/alignments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/alignments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/alignments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrCategory:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/categories`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/categories`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrCycle:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/cycles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/cycles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),objectivesWeight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives_weight`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),objectivesPosition:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives_position`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrObjectiveKeyResult:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrKeyResultIndicator:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id/indicators`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrObjectiveIndicator:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/indicators`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrCycleObjective:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrIndicator:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/indicators/:indicator_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrObjectiveProgress:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/progresses`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/progresses`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrKeyResultProgress:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id/progresses`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id/progresses`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Yv=class extends xv{constructor(){super(...arguments),this.optical_char_recognition={image:{basicRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/optical_char_recognition/v1/image/basic_recognize`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{image:{basicRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/optical_char_recognition/v1/image/basic_recognize`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},jv=class extends Yv{constructor(){super(...arguments),this.partner_ai={}}},Jv=class extends jv{constructor(){super(...arguments),this.passport={session:{logout:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/passport/v1/sessions/logout`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/passport/v1/sessions/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},password:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/passport/v1/password`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{session:{logout:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/passport/v1/sessions/logout`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/passport/v1/sessions/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},password:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/passport/v1/password`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},qv=class extends Jv{constructor(){super(...arguments),this.payroll={v1:{datasourceRecord:{save:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/datasource_records/save`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/datasource_records/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/datasource_records/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},paymentDetail:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/payment_detail/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},paymentActivity:{archive:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/payment_activitys/archive`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/payment_activitys`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/payment_activitys`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},costAllocationPlan:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/cost_allocation_plans`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/cost_allocation_plans`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},paymentActivityDetail:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/payment_activity_details`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},datasource:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/datasources`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/datasources`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},costAllocationDetail:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},costAllocationReport:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/cost_allocation_reports`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/cost_allocation_reports`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},paygroup:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/paygroups`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/paygroups`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},acctItem:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/acct_items`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/acct_items`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},zv=class extends qv{constructor(){super(...arguments),this.people_admin={}}},Vv=class extends zv{constructor(){super(...arguments),this.people_ai={}}},Wv=class extends Vv{constructor(){super(...arguments),this.people_bytedance={}}},Zv=class extends Wv{constructor(){super(...arguments),this.performance={v1:{reviewData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v1/review_datas/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},stageTask:{findByUserList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v1/stage_tasks/find_by_user_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),findByPage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v1/stage_tasks/find_by_page`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},semester:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v1/semesters`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{reviewee:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/reviewees/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},additionalInformationsBatch:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/additional_informations/batch`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},metricDetail:{import:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/metric_details/import`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/metric_details/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},question:{queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/questions/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/questions/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},indicator:{queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/indicators/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/indicators/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},activity:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/activity/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},metricTag:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/metric_tags`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/metric_tags`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},metricField:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/metric_fields/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},metricLib:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/metric_libs/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reviewData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/review_datas/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},metricTemplate:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/metric_templates/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userInfo:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/user_info/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reviewTemplate:{queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/review_templates/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/review_templates/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userGroupUserRel:{write:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/user_group_user_rels/write`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},additionalInformation:{import:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/additional_informations/import`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/additional_informations/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/additional_informations/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Xv=class extends Zv{constructor(){super(...arguments),this.personal_settings={systemStatus:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchClose:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_close`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchOpen:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_open`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{systemStatus:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchClose:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_close`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchOpen:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_open`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},$v=class extends Xv{constructor(){super(...arguments),this.profile={}}},eP=class extends $v{constructor(){super(...arguments),this.report={rule:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/report/v1/rules/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ruleView:{remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/report/v1/rules/:rule_id/views/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},task:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/report/v1/tasks/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{rule:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/report/v1/rules/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ruleView:{remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/report/v1/rules/:rule_id/views/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},task:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/report/v1/tasks/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},AP=class extends eP{constructor(){super(...arguments),this.rule_engine={}}},tP=class extends AP{constructor(){super(...arguments),this.saasbi={}}},rP=class extends tP{constructor(){super(...arguments),this.scim={}}},iP=class extends rP{constructor(){super(...arguments),this.search_in_app={}}},aP=class extends iP{constructor(){super(...arguments),this.search={dataSource:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},message:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},schema:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},dataSourceItem:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},app:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/app`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},docWiki:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v2:{dataSource:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},message:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},schema:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},dataSourceItem:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},app:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/app`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},docWiki:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},oP=class extends aP{constructor(){super(...arguments),this.security_and_compliance={openapiLog:{listData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/openapi_logs/list_data`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMigration:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/:user_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},multiGeoEntityTenant:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/multi_geo_entity/tenant`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{openapiLog:{listData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/openapi_logs/list_data`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMigration:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/:user_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},multiGeoEntityTenant:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/multi_geo_entity/tenant`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{deviceApplyRecord:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_apply_records/:device_apply_record_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},deviceRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mine:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_records/mine`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},nP=class extends oP{constructor(){super(...arguments),this.security_plugin={}}},sP=class extends nP{constructor(){super(...arguments),this.sheet_ai={}}},gP=class extends sP{constructor(){super(...arguments),this.sheets={spreadsheet:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheet:{replace:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/replace`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),moveDimension:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/move_dimension`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),find:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/find`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFilter:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFilterView:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFilterViewCondition:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFloatImage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v3:{spreadsheet:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheet:{replace:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/replace`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),moveDimension:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/move_dimension`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),find:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/find`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFilter:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFilterView:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFilterViewCondition:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFloatImage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},cP=class extends gP{constructor(){super(...arguments),this.slides_ai={}}},IP=class extends cP{constructor(){super(...arguments),this.slides={}}},lP=class extends IP{constructor(){super(...arguments),this.spark={v1:{appTable:{deleteTableRecords:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),postTableRecords:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patchTableRecords:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdateTableRecords:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records_batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getTableDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getTableList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getTableRecordList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appEnum:{getEnumDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/enums/:enum_name`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getEnumList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/enums`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appView:{getViewRecordList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/views/:view_name/records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appStorage:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage`,A),method:"GET",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),uploadInitialize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload/initialize`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload/part`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),uploadComplete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload/complete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},app:{icon:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/icon`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),uploadHtmlCodeAndRelease:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/upload_and_release_html_code`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),getAppVisibility:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/access-scope`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateAppVisibility:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/access-scope`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sqlCommands:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/sql_commands`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},directoryUser:{idConvert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/directory/user/id_convert`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},dP=class extends lP{constructor(){super(...arguments),this.speech_to_text={speech:{fileRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/speech_to_text/v1/speech/file_recognize`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),streamRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/speech_to_text/v1/speech/stream_recognize`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{speech:{fileRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/speech_to_text/v1/speech/file_recognize`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),streamRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/speech_to_text/v1/speech/stream_recognize`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},pP=class extends dP{constructor(){super(...arguments),this.subscriptions={}}},hP=class extends pP{constructor(){super(...arguments),this.task={task:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDeleteFollower:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_follower`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDeleteCollaborator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_collaborator`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uncomplete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/uncomplete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),complete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/complete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskComment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskCollaborator:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators/:collaborator_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskFollower:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers/:follower_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskReminder:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders/:reminder_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{task:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDeleteFollower:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_follower`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDeleteCollaborator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_collaborator`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uncomplete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/uncomplete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),complete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/complete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskComment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskCollaborator:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators/:collaborator_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskFollower:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers/:follower_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskReminder:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders/:reminder_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{task:{tasklists:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/tasklists`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addDependencies:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_dependencies`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeDependencies:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_dependencies`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setAncestorTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/set_ancestor_task`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addMembers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addReminders:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_reminders`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeMembers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeReminders:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_reminders`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeTasklist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_tasklist`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addTasklist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_tasklist`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},comment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/comments/:comment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/comments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/comments/:comment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/comments/:comment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/comments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},section:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections/:section_guid`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),tasksWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections/:section_guid/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),tasks:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections/:section_guid/tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections/:section_guid`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections/:section_guid`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tasklist:{tasks:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addMembers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/add_members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeMembers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/remove_members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customField:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),add:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/add`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tasklistActivitySubscription:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/attachments/:attachment_guid`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/attachments/:attachment_guid`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/attachments/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/attachments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/attachments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customFieldOption:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/options/:option_guid`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/options`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskV2:{taskSubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/task_v2/task_subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listRelatedTaskWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/task_v2/list_related_task`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),listRelatedTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/task_v2/list_related_task`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskSubtask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},EP=class extends hP{constructor(){super(...arguments),this.tenant={tenant:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/tenant/v2/tenant/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tenantProductAssignInfo:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/tenant/v2/tenant/assign_info_list/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v2:{tenant:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/tenant/v2/tenant/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tenantProductAssignInfo:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/tenant/v2/tenant/assign_info_list/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},uP=class extends EP{constructor(){super(...arguments),this.translation={text:{translate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/translation/v1/text/translate`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),detect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/translation/v1/text/detect`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{text:{translate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/translation/v1/text/translate`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),detect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/translation/v1/text/detect`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},CP=class extends uP{constructor(){super(...arguments),this.trust_layer={}}},BP=class extends CP{constructor(){super(...arguments),this.trust_party={v1:{collaborationTenantCollaborationUser:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key/collaboration_users/:target_user_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},collaborationTenantCollaborationDepartment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key/collaboration_departments/:target_department_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},collaborationTenant:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),visibleOrganization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key/visible_organization`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},fP=class extends BP{constructor(){super(...arguments),this.unified_kms_log={}}},QP=class extends fP{constructor(){super(...arguments),this.unified_kms={}}},yP=class extends QP{constructor(){super(...arguments),this.vault={}}},mP=class extends yP{constructor(){super(...arguments),this.vc={material:{uploadMeta:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/materials/upload_meta`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/materials/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),pullMeta:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/materials/pull_meta`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meetingRecording:{start:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/start`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),stop:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/stop`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setPermission:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/set_permission`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},roomConfig:{del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/del`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setCheckboardAccessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/set_checkboard_access_code`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setRoomAccessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/set_room_access_code`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),set:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/set`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserve:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),apply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/apply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getActiveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id/get_active_meeting`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiVcMeeting:{getCommonReply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_common_reply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),doOperation:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/do_operation`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getTodoTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_todo_task`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),seedAiPullData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/seed_ai_pull_data`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),docBasedSuggestQuestion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/doc_based_suggest_question`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),callback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/callback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sectionSummary:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/section_summary`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getRecap:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_recap`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchStepSummaryStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_step_summary_stream`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchSectionSummaryStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_section_summary_stream`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchRecapStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_recap_stream`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meeting:{end:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/end`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),kickout:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/kickout`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setHost:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/set_host`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),invite:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/invite`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),changeName:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/change_name`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listByNoWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),listByNo:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiRoom:{joinOfflineMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/join_offline_meeting`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reserveInstantEvent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/reserve_instant_event`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),helpSceneType:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/help_scene_type`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),joinMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),checkInSchedule:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/check_in_schedule`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),exit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/exit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),autoReleaseEvent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_release_event`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),autoWelcome:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_welcome`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),roomCalling:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/room_calling`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),joinMeetingNumber:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting_number`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leaveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/leave_meeting`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiMm:{mediaParse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_parse`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),extensionBoarding:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/extension_boarding`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),querySuggestContext:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/query_suggest_context`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mediaBind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_bind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiSip:{createEventCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_sip/create_event_card`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},alert:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiVc:{cardCallback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/card_callback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),startAnalysis:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/start_analysis`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchMeetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setMeetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/set_meeting_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),meetingAnalyze:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/meeting_analyze`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchMeetingAnalyze:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_analyze`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},report:{getDaily:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reports/get_daily`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getTopUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reports/get_top_user`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},room:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},resourceReservationList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},participantQualityList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},roomLevel:{mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/search`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/del`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},scopeConfig:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),accessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/scope_config/access_code`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfigForm:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfigAdmin:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfigDisableInform:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfig:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reserveScope:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/reserve_scope`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},export:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/:task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),resourceReservationList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/resource_reservation_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),participantQualityList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/participant_quality_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),participantList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/participant_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),meetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/meeting_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meetingList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},participantList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meetingPullSubtitle:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},note:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unifiedNoteTranscriptWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),unifiedNoteTranscript:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/:note_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},recording:{unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/recordings/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/recordings/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},bot:{realtimeEndpoint:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/realtime/endpoint`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leave:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/leave`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),message:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),userActiveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/user_active_meeting`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),join:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/join`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),eventsWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),events:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{material:{uploadMeta:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/materials/upload_meta`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/materials/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),pullMeta:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/materials/pull_meta`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meetingRecording:{start:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/start`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),stop:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/stop`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setPermission:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/set_permission`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},roomConfig:{del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/del`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setCheckboardAccessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/set_checkboard_access_code`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setRoomAccessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/set_room_access_code`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),set:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/set`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserve:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),apply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/apply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getActiveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id/get_active_meeting`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiVcMeeting:{getCommonReply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_common_reply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),doOperation:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/do_operation`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getTodoTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_todo_task`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),seedAiPullData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/seed_ai_pull_data`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),docBasedSuggestQuestion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/doc_based_suggest_question`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),callback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/callback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sectionSummary:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/section_summary`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getRecap:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_recap`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchStepSummaryStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_step_summary_stream`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchSectionSummaryStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_section_summary_stream`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchRecapStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_recap_stream`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meeting:{end:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/end`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),kickout:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/kickout`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setHost:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/set_host`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),invite:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/invite`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),changeName:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/change_name`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listByNoWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),listByNo:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiRoom:{joinOfflineMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/join_offline_meeting`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reserveInstantEvent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/reserve_instant_event`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),helpSceneType:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/help_scene_type`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),joinMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),checkInSchedule:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/check_in_schedule`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),exit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/exit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),autoReleaseEvent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_release_event`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),autoWelcome:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_welcome`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),roomCalling:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/room_calling`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),joinMeetingNumber:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting_number`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leaveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/leave_meeting`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiMm:{mediaParse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_parse`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),extensionBoarding:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/extension_boarding`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),querySuggestContext:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/query_suggest_context`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mediaBind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_bind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiSip:{createEventCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_sip/create_event_card`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},alert:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiVc:{cardCallback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/card_callback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),startAnalysis:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/start_analysis`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchMeetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setMeetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/set_meeting_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),meetingAnalyze:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/meeting_analyze`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchMeetingAnalyze:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_analyze`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},report:{getDaily:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reports/get_daily`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getTopUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reports/get_top_user`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},room:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},resourceReservationList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},participantQualityList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},roomLevel:{mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/search`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/del`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},scopeConfig:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),accessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/scope_config/access_code`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfigForm:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfigAdmin:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfigDisableInform:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfig:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reserveScope:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/reserve_scope`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},export:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/:task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),resourceReservationList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/resource_reservation_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),participantQualityList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/participant_quality_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),participantList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/participant_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),meetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/meeting_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meetingList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},participantList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meetingPullSubtitle:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},note:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unifiedNoteTranscriptWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),unifiedNoteTranscript:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/:note_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},recording:{unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/recordings/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/recordings/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},bot:{realtimeEndpoint:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/realtime/endpoint`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leave:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/leave`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),message:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),userActiveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/user_active_meeting`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),join:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/join`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),eventsWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),events:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},SP=class extends mP{constructor(){super(...arguments),this.verification={v1:{verification:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/verification/v1/verification`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},wP=class extends SP{constructor(){super(...arguments),this.wiki={spaceSetting:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/setting`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spaceNode:{updateTitle:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/update_title`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),moveDocsToWiki:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/move_docs_to_wiki`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),move:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/move`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spaceMember:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},space:{getNode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/get_node`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},task:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/tasks/:task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{node:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v1/nodes/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v1/nodes/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{spaceSetting:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/setting`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spaceNode:{updateTitle:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/update_title`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),moveDocsToWiki:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/move_docs_to_wiki`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),move:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/move`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spaceMember:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},space:{getNode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/get_node`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},task:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/tasks/:task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},DP=class extends wP{constructor(){super(...arguments),this.workplace={workplaceAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/workplace/v1/workplace_access_data/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workplaceBlockAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/workplace/v1/workplace_block_access_data/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customWorkplaceAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/workplace/v1/custom_workplace_access_data/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{workplaceAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/workplace/v1/workplace_access_data/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workplaceBlockAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/workplace/v1/workplace_block_access_data/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customWorkplaceAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/workplace/v1/custom_workplace_access_data/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Kg={error:(...n)=>{console.log("[error]:",...n)},warn:(...n)=>{console.warn("[warn]:",...n)},info:(...n)=>{console.info("[info]:",...n)},debug:(...n)=>{console.debug("[debug]:",...n)},trace:(...n)=>{console.trace("[trace]:",...n)}},Vc=class{constructor(t,o){this.level=t,this.logger=o}error(...t){this.level>=Bo.error&&this.logger.error(t)}warn(...t){this.level>=Bo.warn&&this.logger.warn(t)}info(...t){this.level>=Bo.info&&this.logger.info(t)}debug(...t){this.level>=Bo.debug&&this.logger.debug(t)}trace(...t){this.level>=Bo.trace&&this.logger.trace(t)}},OP=class{constructor(t){this.appId=t.appId,this.appSecret=t.appSecret,this.cache=t.cache,this.domain=t.domain,this.logger=t.logger,this.appType=t.appType,this.httpInstance=t.httpInstance,this.logger.debug("app ticket manager is ready"),this.checkAppTicket()}checkAppTicket(){var t;return h(this,void 0,void 0,function*(){this.appType===Rs.ISV&&((yield(t=this.cache)===null||t===void 0?void 0:t.get(xC,{namespace:this.appId}))||this.requestAppTicket())})}requestAppTicket(){return h(this,void 0,void 0,function*(){this.logger.debug("request app ticket"),yield this.httpInstance.post(`${this.domain}/open-apis/auth/v3/app_ticket/resend`,{app_id:this.appId,app_secret:this.appSecret}).catch(t=>{this.logger.error(t)})})}getAppTicket(){var t;return h(this,void 0,void 0,function*(){let o=yield(t=this.cache)===null||t===void 0?void 0:t.get(xC,{namespace:this.appId});if(o)return this.logger.debug("use cache app ticket"),o;yield this.requestAppTicket()})}},OS="/oauth/v3/token",Eke="urn:ietf:params:oauth:grant-type:jwt-bearer",E5="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",uke="authorization_code",Cke="refresh_token",WP="X-Target-Service",u5=7100,ZP=7101,C5=7102,XP=7104,Bke=Object.freeze({"open.feishu.cn":"https://accounts.feishu.cn","open.larksuite.com":"https://accounts.larksuite.com"}),ga=class extends Error{constructor(t,o){super(o),this.name="ClientAssertionError",this.code=t,this.msg=o}},sh=class extends Error{constructor(t,o,a,e){super(e||a||"access token request failed"),this.name="AccessTokenError",this.statusCode=t,this.code=o,this.error=a,this.errorDescription=e}},$P=n=>n.includes("://")?n:`https://${n}`;function eG(n){let t=new URL($P(n));if(!t.host)throw new Error(`invalid url: ${n}`);return t.host}function AG(n){if(n.oauthBaseUrl)return $P(n.oauthBaseUrl).replace(/\/+$/,"");let t=eG(n.domain),o=Bke[t];if(o)return o;throw new Error("oauthBaseUrl is not configured. When domain is a non-default value (neither open.feishu.cn nor open.larksuite.com), set oauthBaseUrl explicitly.")}function B5(n){return eG(AG(n))}function tG(n,t){let o=new URL($P(n.targetService));if(o.protocol!=="https:")throw new Error("targetService must use https");if(o.username||o.password)throw new Error("targetService must not contain userinfo");let e=`${n.targetPrefix||""}${t}`.replace(/\/{2,}/g,"/");if(/(^|\/)\.\.(\/|$)/.test(e))throw new Error("targetPrefix must not contain path traversal");return`${o.protocol}//${o.host}${e}`}function fke(n,t){var o,a;let e=(o=t?.code)!==null&&o!==void 0?o:"unknown",i=(a=t?.msg)!==null&&a!==void 0?a:"no message";return`failed to get ${n}, code: ${e}, msg: ${i}`}var bP=class{constructor(t){this.appId=t.appId,this.appSecret=t.appSecret,this.cache=t.cache,this.domain=t.domain,this.logger=t.logger,this.appType=t.appType,this.httpInstance=t.httpInstance,this.clientAssertionProvider=t.clientAssertionProvider,this.oauthBaseUrl=t.oauthBaseUrl,this.appTicketManager=new OP({appId:this.appId,appSecret:this.appSecret,cache:this.cache,domain:this.domain,logger:this.logger,appType:this.appType,httpInstance:this.httpInstance}),this.logger.debug("token manager is ready")}requestToken(t,o,a){return h(this,void 0,void 0,function*(){let e=yield this.httpInstance.post(t,o).catch(i=>{throw this.logger.error(i),i});if(!e||!e[a])throw new Error(fke(a,e));return e})}getCustomTenantAccessToken(){var t,o;return h(this,void 0,void 0,function*(){if(this.clientAssertionProvider)return this.getTenantTokenByClientAssertion();let a=yield(t=this.cache)===null||t===void 0?void 0:t.get(FC,{namespace:this.appId});if(a)return this.logger.debug("use cache token"),a;this.logger.debug("request token");let{tenant_access_token:e,expire:i}=yield this.requestToken(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`,{app_id:this.appId,app_secret:this.appSecret},"tenant_access_token");return yield(o=this.cache)===null||o===void 0?void 0:o.set(FC,e,new Date().getTime()+i*1e3-180*1e3,{namespace:this.appId}),e})}getTenantTokenByClientAssertion(){var t,o,a,e,i,A,r,s;return h(this,void 0,void 0,function*(){let g=AG({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),c=B5({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),I=yield(t=this.cache)===null||t===void 0?void 0:t.get(FC,{namespace:this.appId});if(I)return this.logger.debug("use cache token"),I;let d;try{d=yield this.clientAssertionProvider.retrieveToken(c)}catch(_){throw new ga(C5,_?.message||"client assertion provider failed")}if(!d||!d.value)throw new ga(ZP,"client assertion token is empty");let B=`${g}${OS}`,f={};d.targetInfo&&(B=tG(d.targetInfo,OS),f[WP]=c),this.logger.debug("request token (client assertion)");let Q;try{Q=yield this.httpInstance.request({method:"post",url:B,headers:f,data:{grant_type:Eke,client_assertion_type:E5,client_assertion:d.value,client_id:this.appId}})}catch(_){throw this.logger.error(_),new ga(((a=(o=_?.response)===null||o===void 0?void 0:o.data)===null||a===void 0?void 0:a.code)||0,((i=(e=_?.response)===null||e===void 0?void 0:e.data)===null||i===void 0?void 0:i.error_description)||((r=(A=_?.response)===null||A===void 0?void 0:A.data)===null||r===void 0?void 0:r.error)||"client assertion token exchange failed")}let y=Q?.access_token;if(!y)throw new ga(Q?.code||0,Q?.error_description||Q?.error||"oauth token response missing access token");let m=Number(Q?.expires_in)||0;return yield(s=this.cache)===null||s===void 0?void 0:s.set(FC,y,new Date().getTime()+Math.max(m-180,0)*1e3,{namespace:this.appId}),y})}getMarketTenantAccessToken(t){var o;return h(this,void 0,void 0,function*(){if(this.clientAssertionProvider)throw new ga(u5,"ClientAssertion mode is not supported for ISV apps");if(!t){this.logger.error("market app request need tenant key");return}let a=yield(o=this.cache)===null||o===void 0?void 0:o.get(`larkMarketAccessToken${t}`,{namespace:this.appId});if(a)return this.logger.debug("use cache token"),a;this.logger.debug("get app ticket");let e=yield this.appTicketManager.getAppTicket();if(!e){this.logger.warn("no app ticket");return}this.logger.debug("get app access token");let{app_access_token:i}=yield this.requestToken(`${this.domain}/open-apis/auth/v3/app_access_token`,{app_id:this.appId,app_secret:this.appSecret,app_ticket:e},"app_access_token");this.logger.debug("get tenant access token");let{tenant_access_token:A,expire:r}=yield this.requestToken(`${this.domain}/open-apis/auth/v3/tenant_access_token`,{app_access_token:i,tenant_key:t},"tenant_access_token");return yield this.cache.set(`larkMarketAccessToken${t}`,A,new Date().getTime()+r*1e3-180*1e3,{namespace:this.appId}),A})}getTenantAccessToken(t){return h(this,void 0,void 0,function*(){return DS(this.appType===Rs.SelfBuild,()=>h(this,void 0,void 0,function*(){this.logger.debug("get custom app token")})),DS(this.appType===Rs.ISV,()=>h(this,void 0,void 0,function*(){this.logger.debug("get market app token ")})),this.appType===Rs.SelfBuild?yield this.getCustomTenantAccessToken():yield this.getMarketTenantAccessToken(t?.[SS])})}},f5=(n,t)=>{let o=Object.assign({},n);for(let[a,e]of Object.entries(t))e!==void 0&&(o[a]=e);return o},MP=class{constructor(t){this.client=t.client}getCacheKey(t,o){return`${o?.namespace||this.client.appId}/${dke.toString()}/${t}`}calibrateTime(t){return new Date().getTime()+(t||0)*1e3-180*1e3}initWithCode(t,o){return h(this,void 0,void 0,function*(){let a={};for(let[e,i]of Object.entries(t)){let A=yield this.client.authen.oidcAccessToken.create({data:{grant_type:"authorization_code",code:i}});if(A.code!==0){this.client.logger.error("init user access token error",e,A.msg||A.message);continue}if(!A.data){this.client.logger.error("user access code expired",e,i);continue}a[e]={code:i,token:A.data.access_token,refreshToken:A.data.refresh_token,expiredTime:this.calibrateTime(A.data.expires_in)}}return yield this.update(a,{namespace:o?.namespace}),a})}update(t,o){return h(this,void 0,void 0,function*(){for(let[a,e]of Object.entries(t)){let i=this.getCacheKey(a,{namespace:o?.namespace}),A=(yield this.client.cache.get(i))||{},{code:r,token:s,refreshToken:g,expiredTime:c}=e,I=f5(A,{code:r,token:s,refreshToken:g,expiredTime:c});yield this.client.cache.set(i,I,1/0)}})}get(t,o){return h(this,void 0,void 0,function*(){let a=this.getCacheKey(t,{namespace:o?.namespace}),e=yield this.client.cache.get(a);if(!e){this.client.logger.error("user access token needs to be initialized or updated first");return}let{token:i,code:A,refreshToken:r,expiredTime:s}=e;if(i&&s&&s-new Date().getTime()>0)return i;if(r){let g=yield this.client.authen.oidcRefreshAccessToken.create({data:{grant_type:"refresh_token",refresh_token:r}});if(g.code===0&&g.data)return yield this.update({[t]:{token:g.data.access_token,refreshToken:g.data.refresh_token,expiredTime:this.calibrateTime(g.data.expires_in)}}),g.data.access_token;this.client.logger.error("get user access token by refresh token failed.",g.msg);return}if(A){let g=yield this.client.authen.oidcAccessToken.create({data:{grant_type:"authorization_code",code:A}});g.code===0&&g.data?yield this.update({[t]:{token:g.data.access_token,refreshToken:g.data.refresh_token,expiredTime:this.calibrateTime(g.data.expires_in)}}):this.client.logger.error("get user access token by code failed.",g.msg)}})}},oh=n=>n===""||n===0||n===null||n===void 0?void 0:n,Qke=n=>{if(!n||n.error)return!0;let{code:t}=n;return t!==void 0&&t!==0&&t!=="0"&&t!==""},_P=class{constructor(t){this.appId=t.appId,this.appSecret=t.appSecret,this.clientAssertionProvider=t.clientAssertionProvider,this.oauthBaseUrl=t.oauthBaseUrl,this.domain=t.domain,this.httpInstance=t.httpInstance,this.logger=t.logger}retrieveByAuthorizationCode(t){return h(this,void 0,void 0,function*(){return this.doRequest({grant_type:uke,code:t.code,redirect_uri:t.redirectUri,code_verifier:t.codeVerifier,scope:t.scope},t.headers)})}refresh(t){return h(this,void 0,void 0,function*(){return this.doRequest({grant_type:Cke,refresh_token:t.refreshToken,scope:t.scope},t.headers)})}doRequest(t,o){return h(this,void 0,void 0,function*(){let a=AG({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),e=B5({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),i={client_id:this.appId};for(let[I,d]of Object.entries(t))d!=null&&(i[I]=d);let A=`${a}${OS}`,r=Object.assign({},o||{});if(this.clientAssertionProvider){let I;try{I=yield this.clientAssertionProvider.retrieveToken(e)}catch(d){throw new ga(C5,d?.message||"client assertion provider failed")}if(!I||!I.value)throw new ga(ZP,"client assertion token is empty");i.client_assertion_type=E5,i.client_assertion=I.value,I.targetInfo&&(A=tG(I.targetInfo,OS),r[WP]=e)}else if(this.appSecret)i.client_secret=this.appSecret;else throw new ga(XP,"appSecret and clientAssertionProvider cannot both be empty for accessToken APIs");let s=200,g;try{g=yield this.httpInstance.request({method:"post",url:A,headers:r,data:i})}catch(I){if(this.logger.error(I),I?.response)s=I.response.status,g=I.response.data;else throw new sh(0,0,"",I?.message||"oauth token request failed")}if(s!==200||Qke(g))throw new sh(s,g?.code||0,g?.error||"",g?.error_description||g?.msg||"");let c=oh(g?.access_token);if(!c)throw new sh(s,g?.code||0,g?.error||"",g?.error_description||"oauth token response missing access_token");return{accessToken:c,tokenType:oh(g.token_type),expiresIn:oh(g.expires_in),refreshToken:oh(g.refresh_token),refreshTokenExpiresIn:oh(g.refresh_token_expires_in),scope:oh(g.scope)}})}},bS=class extends DP{constructor(t){if(super(),this.appId="",this.appSecret="",this.helpDeskId="",this.helpDeskToken="",this.appType=Rs.SelfBuild,this.logger=new Vc(t.loggerLevel||Bo.info,t.logger||Kg),this.appId=t.appId,this.appSecret=t.appSecret||"",this.clientAssertionProvider=t.clientAssertionProvider,this.oauthBaseUrl=t.oauthBaseUrl,this.disableTokenCache=t.disableTokenCache,this.userAgent=VP(t.source,{extraTags:t.extraUaTags}),DS(!this.appId,()=>this.logger.error("appId is needed")),this.helpDeskId=t.helpDeskId,this.helpDeskToken=t.helpDeskToken,this.appType=t?.appType||Rs.SelfBuild,!this.appSecret&&!this.clientAssertionProvider)throw new ga(XP,"appSecret or clientAssertionProvider is required");if(this.clientAssertionProvider&&this.appType===Rs.ISV)throw new ga(u5,"ClientAssertion mode is not supported for ISV apps");this.domain=h5(t.domain||ks.Feishu),this.logger.debug(`use domain url: ${this.domain}`),this.cache=t.cache||jC,this.httpInstance=t.httpInstance||gh,this.tokenManager=new bP({appId:this.appId,appSecret:this.appSecret,cache:this.cache,domain:this.domain,logger:this.logger,appType:this.appType,httpInstance:this.httpInstance,clientAssertionProvider:this.clientAssertionProvider,oauthBaseUrl:this.oauthBaseUrl}),this.userAccessToken=new MP({client:this}),this.accessToken=new _P({appId:this.appId,appSecret:this.appSecret,clientAssertionProvider:this.clientAssertionProvider,oauthBaseUrl:this.oauthBaseUrl,domain:this.domain,httpInstance:this.httpInstance,logger:this.logger}),this.logger.info("client ready")}formatPayload(t,o){var a,e,i;return h(this,void 0,void 0,function*(){let A=["lark","params","data","headers","path"].reduce((g,c)=>(g[c]=o?.[c]||{},g),{}),r=(a=A?.lark)===null||a===void 0?void 0:a[p5];if(r)this.logger.debug("use passed token"),A.headers.Authorization=`Bearer ${r}`;else if(!this.disableTokenCache){let g=yield this.tokenManager.getTenantAccessToken({[SS]:(e=A?.lark)===null||e===void 0?void 0:e[SS]});g?A.headers.Authorization=`Bearer ${g}`:this.logger.warn("failed to obtain token")}if((i=A?.lark)===null||i===void 0?void 0:i[d5]){this.logger.debug("generate help desk credential");let g=pke(`${this.helpDeskId}:${this.helpDeskToken}`);A.headers["X-Lark-Helpdesk-Authorization"]=`Bearer ${g}`}return{params:Object.assign(Object.assign({},t?.params||{}),A.params),headers:Object.assign(Object.assign({"User-Agent":this.userAgent},t?.headers||{}),A.headers),data:Object.assign(Object.assign({},t?.data||{}),A.data),path:Object.assign(Object.assign({},t?.path||{}),A.path)}})}request(t,o){var a;return h(this,void 0,void 0,function*(){let{data:e,params:i,headers:A,url:r}=t,s=Y(t,["data","params","headers","url"]),g=yield this.formatPayload({data:e,params:i,headers:A},o),c=((a=t.method)===null||a===void 0?void 0:a.toLowerCase())==="get"&&Object.keys(g.data).length===0?void 0:g.data;return this.logger.trace(`send request [${t.method}]: ${t.url}`),yield this.httpInstance.request(Object.assign(Object.assign({},s),{url:/^http/.test(r)?r:`${this.domain}/${hke(r)}`,headers:g.headers,data:c,params:g.params})).catch(d=>{throw this.logger.error(d),d})})}},yke=n=>n.reduce((t,o)=>(0,I5.default)(t,o),{}),mke=n=>({lark:{[SS]:n}}),Ske=()=>({lark:{[d5]:!0}}),wke=n=>({headers:{Authorization:`Bearer ${n}`}}),Dke=n=>({lark:{[p5]:n}}),MS=class{constructor(t){let{encryptKey:o,verificationToken:a,logger:e}=t;this.verificationToken=a,this.encryptKey=o,this.logger=e,o&&(this.aesCipher=new YC(o))}parse(t){var o,a;let e=(()=>{var r;let s=t||{},{encrypt:g}=s,c=Y(s,["encrypt"]);if(g)try{return Object.assign(Object.assign({},JSON.parse((r=this.aesCipher)===null||r===void 0?void 0:r.decrypt(g))),c)}catch{return this.logger.error("parse encrypt data failed"),{}}return c})();if("schema"in e){let{header:r,event:s}=e,g=Y(e,["header","event"]);return Object.assign(Object.assign(Object.assign({[mS]:(o=e?.header)===null||o===void 0?void 0:o.event_type},g),r),s)}let{event:i}=e,A=Y(e,["event"]);return Object.assign(Object.assign({[mS]:(a=e?.event)===null||a===void 0?void 0:a.type},i),A)}checkIsCardEventValidated(t){if("encrypt"in t||"schema"in t)return this.checkIsEventValidated(t);let{"x-lark-request-timestamp":o,"x-lark-request-nonce":a,"x-lark-signature":e}=t.headers;return this.verificationToken?yS.createHash("sha1").update(o+a+this.verificationToken+JSON.stringify(t)).digest("hex")===e:!0}checkIsEventValidated(t){if(!this.encryptKey)return!0;let{"x-lark-request-timestamp":o,"x-lark-request-nonce":a,"x-lark-signature":e}=t.headers,i=o+a+this.encryptKey+JSON.stringify(t);return yS.createHash("sha256").update(i).digest("hex")===e}},Oke="app_ticket",_S=class{constructor(t){this.verificationToken="",this.encryptKey="",this.handles=new Map;let{encryptKey:o,verificationToken:a}=t;this.encryptKey=o||"",this.verificationToken=a||"",this.logger=new Vc(t.loggerLevel||Bo.info,t.logger||Kg),this.requestHandle=new MS({encryptKey:o,verificationToken:a,logger:this.logger}),this.cache=t.cache||jC,this.registerAppTicketHandle(),this.logger.info("event-dispatch is ready")}registerAppTicketHandle(){this.register({app_ticket:t=>h(this,void 0,void 0,function*(){let{app_ticket:o,app_id:a}=t;o?(yield this.cache.set(xC,o,void 0,{namespace:a}),this.logger.debug("set app ticket")):this.logger.warn("response not include app ticket")})})}register(t){return Object.keys(t).forEach(o=>{this.handles.has(o)&&o!==Oke&&this.logger.error(`this ${o} handle is registered`),this.handles.set(o,t[o]),this.logger.debug(`register ${o} handle`)}),this}invoke(t,o){var a,e;return h(this,void 0,void 0,function*(){if(o?.needCheck!==!1&&!(!((a=this.requestHandle)===null||a===void 0)&&a.checkIsEventValidated(t))){this.logger.warn("verification failed event");return}let A=(e=this.requestHandle)===null||e===void 0?void 0:e.parse(t),r=A[mS];if(this.handles.has(r)){let s=yield this.handles.get(r)(A);return this.logger.debug(`execute ${r} handle`),s}return this.logger.warn(`no ${r} handle`),`no ${r} event handle`})}},TP=class{constructor(t,o){this.verificationToken="",this.encryptKey="",this.handles=new Map;let{verificationToken:a,encryptKey:e}=t;this.encryptKey=e||"",this.verificationToken=a||"",this.cardHandler=o,this.logger=new Vc(t.loggerLevel||Bo.info,t.logger||Kg),this.requestHandle=new MS({encryptKey:e,verificationToken:a,logger:this.logger}),this.cache=t.cache||jC,this.registerAppTicketHandle(),this.logger.info("card-action-handle is ready")}registerAppTicketHandle(){this.register({app_ticket:t=>h(this,void 0,void 0,function*(){let{app_ticket:o,app_id:a}=t;o?(yield this.cache.set(xC,o,void 0,{namespace:a}),this.logger.debug("set app ticket")):this.logger.warn("response not include app ticket")})})}register(t){return Object.keys(t).forEach(o=>{this.handles.set(o,t[o]),this.logger.debug(`register ${o} handle`)}),this}invoke(t){var o,a;return h(this,void 0,void 0,function*(){if(!(!((o=this.requestHandle)===null||o===void 0)&&o.checkIsCardEventValidated(t))){this.logger.warn("verification failed event");return}let e=(a=this.requestHandle)===null||a===void 0?void 0:a.parse(t),i=e[mS];if(this.handles.has(i))try{return yield this.handles.get(i)(e)}catch(A){this.logger.error(A);return}try{let A=yield this.cardHandler(e);return this.logger.debug("execute card handle"),A}catch(A){this.logger.error(A)}})}},GS=n=>new Promise(t=>{let o="";n.on("data",a=>{o+=a}),n.on("end",()=>{try{let a=JSON.parse(o);t(a)}catch{t("")}})}),JC=(n,t)=>{if("encrypt"in n&&!t.encryptKey)throw new Error("auto-challenge need encryptKey, please check for missing in dispatcher");let o="encrypt"in n?JSON.parse(new YC(t.encryptKey).decrypt(n.encrypt)):n;return{isChallenge:o.type==="url_verification",challenge:{challenge:o.challenge}}},bke=(n,t,o)=>(a,e)=>h(void 0,void 0,void 0,function*(){if(a.url!==n)return;let i=Object.assign(Object.create({headers:a.headers}),yield GS(a));if(o?.autoChallenge||!1){let{isChallenge:s,challenge:g}=JC(i,{encryptKey:t.encryptKey});if(s){e.end(JSON.stringify(g));return}}let r=yield t.invoke(i);e.end(JSON.stringify(r))}),Mke=(n,t)=>(o,a)=>h(void 0,void 0,void 0,function*(){let e=yield h(void 0,void 0,void 0,function*(){return o.body?o.body:o.complete?((t?.logger||Kg).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield GS(o)}),i=Object.assign(Object.create({headers:o.headers}),e);if(t?.autoChallenge||!1){let{isChallenge:s,challenge:g}=JC(i,{encryptKey:n.encryptKey});if(s){a.json(g);return}}let r=yield n.invoke(i);a.json(r)}),_ke=(n,t,o)=>(a,e)=>h(void 0,void 0,void 0,function*(){let{originalUrl:i,req:A,request:r}=a;if(i===n){let s=yield h(void 0,void 0,void 0,function*(){return r.body?r.body:A.complete?((o?.logger||Kg).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield GS(A)}),g=Object.assign(Object.create({headers:A.headers}),s);if(o?.autoChallenge||!1){let{isChallenge:d,challenge:B}=JC(g,{encryptKey:t.encryptKey});if(d){a.body=B,yield e();return}}let I=yield t.invoke(g);a.body=JSON.stringify(I)}yield e()}),Tke=(n,t)=>(o,a)=>h(void 0,void 0,void 0,function*(){let{req:e,request:i}=o,A=yield h(void 0,void 0,void 0,function*(){return i.body?i.body:e.complete?((t?.logger||Kg).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield GS(e)}),r=Object.assign(Object.create({headers:e.headers}),A);if(t?.autoChallenge||!1){let{isChallenge:c,challenge:I}=JC(r,{encryptKey:n.encryptKey});if(c){o.body=I,yield a();return}}let g=yield n.invoke(r);o.body=JSON.stringify(g),yield a()}),Nke=n=>{let{title:t,content:o}=n;return JSON.stringify({config:{wide_screen_mode:!0},elements:[{tag:"markdown",content:o}],header:{template:"blue",title:{content:t,tag:"plain_text"}}})},Rke=Object.freeze({__proto__:null,defaultCard:Nke}),Hg=uS();Hg.util.Long=void 0;Hg.configure();var zc=Hg.Reader,V6=Hg.Writer,HA=Hg.util,Xo=Hg.roots.default||(Hg.roots.default={}),Q5=Xo.pbbp2=(()=>{let n={};return n.Header=(function(){function t(o){if(o)for(let a=Object.keys(o),e=0;e>>3){case 1:{A.key=a.string();break}case 2:{A.value=a.string();break}default:a.skipType(r&7);break}}if(!A.hasOwnProperty("key"))throw HA.ProtocolError("missing required 'key'",{instance:A});if(!A.hasOwnProperty("value"))throw HA.ProtocolError("missing required 'value'",{instance:A});return A},t.decodeDelimited=function(a){return a instanceof zc||(a=new zc(a)),this.decode(a,a.uint32())},t.verify=function(a){return typeof a!="object"||a===null?"object expected":HA.isString(a.key)?HA.isString(a.value)?null:"value: string expected":"key: string expected"},t.fromObject=function(a){if(a instanceof Xo.pbbp2.Header)return a;let e=new Xo.pbbp2.Header;return a.key!=null&&(e.key=String(a.key)),a.value!=null&&(e.value=String(a.value)),e},t.toObject=function(a,e){e||(e={});let i={};return e.defaults&&(i.key="",i.value=""),a.key!=null&&a.hasOwnProperty("key")&&(i.key=a.key),a.value!=null&&a.hasOwnProperty("value")&&(i.value=a.value),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,Hg.util.toJSONOptions)},t.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/pbbp2.Header"},t})(),n.Frame=(function(){function t(o){if(this.headers=[],o)for(let a=Object.keys(o),e=0;e>>3){case 1:{A.SeqID=a.uint64();break}case 2:{A.LogID=a.uint64();break}case 3:{A.service=a.int32();break}case 4:{A.method=a.int32();break}case 5:{A.headers&&A.headers.length||(A.headers=[]),A.headers.push(Xo.pbbp2.Header.decode(a,a.uint32()));break}case 6:{A.payloadEncoding=a.string();break}case 7:{A.payloadType=a.string();break}case 8:{A.payload=a.bytes();break}case 9:{A.LogIDNew=a.string();break}default:a.skipType(r&7);break}}if(!A.hasOwnProperty("SeqID"))throw HA.ProtocolError("missing required 'SeqID'",{instance:A});if(!A.hasOwnProperty("LogID"))throw HA.ProtocolError("missing required 'LogID'",{instance:A});if(!A.hasOwnProperty("service"))throw HA.ProtocolError("missing required 'service'",{instance:A});if(!A.hasOwnProperty("method"))throw HA.ProtocolError("missing required 'method'",{instance:A});return A},t.decodeDelimited=function(a){return a instanceof zc||(a=new zc(a)),this.decode(a,a.uint32())},t.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(!HA.isInteger(a.SeqID)&&!(a.SeqID&&HA.isInteger(a.SeqID.low)&&HA.isInteger(a.SeqID.high)))return"SeqID: integer|Long expected";if(!HA.isInteger(a.LogID)&&!(a.LogID&&HA.isInteger(a.LogID.low)&&HA.isInteger(a.LogID.high)))return"LogID: integer|Long expected";if(!HA.isInteger(a.service))return"service: integer expected";if(!HA.isInteger(a.method))return"method: integer expected";if(a.headers!=null&&a.hasOwnProperty("headers")){if(!Array.isArray(a.headers))return"headers: array expected";for(let e=0;e>>0,a.SeqID.high>>>0).toNumber(!0))),a.LogID!=null&&(HA.Long?(e.LogID=HA.Long.fromValue(a.LogID)).unsigned=!0:typeof a.LogID=="string"?e.LogID=parseInt(a.LogID,10):typeof a.LogID=="number"?e.LogID=a.LogID:typeof a.LogID=="object"&&(e.LogID=new HA.LongBits(a.LogID.low>>>0,a.LogID.high>>>0).toNumber(!0))),a.service!=null&&(e.service=a.service|0),a.method!=null&&(e.method=a.method|0),a.headers){if(!Array.isArray(a.headers))throw TypeError(".pbbp2.Frame.headers: array expected");e.headers=[];for(let i=0;i=0&&(e.payload=a.payload)),a.LogIDNew!=null&&(e.LogIDNew=String(a.LogIDNew)),e},t.toObject=function(a,e){e||(e={});let i={};if((e.arrays||e.defaults)&&(i.headers=[]),e.defaults){if(HA.Long){let A=new HA.Long(0,0,!0);i.SeqID=e.longs===String?A.toString():e.longs===Number?A.toNumber():A}else i.SeqID=e.longs===String?"0":0;if(HA.Long){let A=new HA.Long(0,0,!0);i.LogID=e.longs===String?A.toString():e.longs===Number?A.toNumber():A}else i.LogID=e.longs===String?"0":0;i.service=0,i.method=0,i.payloadEncoding="",i.payloadType="",e.bytes===String?i.payload="":(i.payload=[],e.bytes!==Array&&(i.payload=HA.newBuffer(i.payload))),i.LogIDNew=""}if(a.SeqID!=null&&a.hasOwnProperty("SeqID")&&(typeof a.SeqID=="number"?i.SeqID=e.longs===String?String(a.SeqID):a.SeqID:i.SeqID=e.longs===String?HA.Long.prototype.toString.call(a.SeqID):e.longs===Number?new HA.LongBits(a.SeqID.low>>>0,a.SeqID.high>>>0).toNumber(!0):a.SeqID),a.LogID!=null&&a.hasOwnProperty("LogID")&&(typeof a.LogID=="number"?i.LogID=e.longs===String?String(a.LogID):a.LogID:i.LogID=e.longs===String?HA.Long.prototype.toString.call(a.LogID):e.longs===Number?new HA.LongBits(a.LogID.low>>>0,a.LogID.high>>>0).toNumber(!0):a.LogID),a.service!=null&&a.hasOwnProperty("service")&&(i.service=a.service),a.method!=null&&a.hasOwnProperty("method")&&(i.method=a.method),a.headers&&a.headers.length){i.headers=[];for(let A=0;AQ5.Frame.decode(n),NP=class{constructor(){this.client={appId:"",appSecret:"",domain:ks.Feishu},this.ws={connectUrl:"",pingInterval:120*1e3,reconnectCount:-1,reconnectInterval:120*1e3,reconnectNonce:30*1e3,deviceId:"",serviceId:"",autoReconnect:!0},this.wsInstance=null}updateClient(t){Object.assign(this.client,t)}updateWs(t){Object.assign(this.ws,t)}getClient(t){return t===void 0?this.client:this.client[t]}getWS(t){return t===void 0?this.ws:this.ws[t]}get wsConfigUrl(){return`${this.getClient("domain")}/callback/ws/endpoint`}setWSInstance(t){this.wsInstance=t}getWSInstance(){return this.wsInstance}},RP=class{constructor(t){this.cache=new Map,this.logger=t.logger,this.clearAtInterval()}mergeData(t){let{message_id:o,sum:a,seq:e,trace_id:i,data:A}=t,r=this.cache.get(o);if(r)r.buffer[e]=A;else{let g=new Array(a).fill(void 0);g[e]=A,this.cache.set(o,{buffer:g,trace_id:i,message_id:o,create_time:Date.now()})}let s=this.cache.get(o);if(s?.buffer.every(g=>!!g)){let g=s.buffer.reduce((d,B)=>{let f=new Uint8Array(d.byteLength+B.byteLength);return f.set(d,0),f.set(B,d.length),f},new Uint8Array([])),c=new TextDecoder("utf-8").decode(g),I=JSON.parse(c);return this.deleteCache(o),I}return null}deleteCache(t){this.cache.delete(t)}clearAtInterval(){if(this.timer)return;let t=1e4;this.timer=setInterval(()=>{let o=Date.now();this.cache.forEach((a,e)=>{var i;let{create_time:A,trace_id:r,message_id:s}=a;o-A>t&&((i=this.logger)===null||i===void 0||i.debug(`${s} event data is deleted as expired, trace_id: ${r}`),this.deleteCache(e))})},t),typeof this.timer.unref=="function"&&this.timer.unref()}destroy(){this.timer&&(clearInterval(this.timer),this.timer=void 0),this.cache.clear()}},UC;(function(n){n[n.ok=0]="ok",n[n.system_busy=1]="system_busy",n[n.forbidden=403]="forbidden",n[n.auth_failed=514]="auth_failed",n[n.internal_error=1000040343]="internal_error",n[n.exceed_conn_limit=1000040350]="exceed_conn_limit"})(UC||(UC={}));var HC;(function(n){n[n.control=0]="control",n[n.data=1]="data"})(HC||(HC={}));var KC;(function(n){n.type="type",n.message_id="message_id",n.sum="sum",n.seq="seq",n.trace_id="trace_id",n.biz_rt="biz_rt",n.handshake_status="handshake-status",n.handshake_msg="handshake-msg",n.handshake_autherrcode="handshake-autherrcode"})(KC||(KC={}));var nh;(function(n){n.event="event",n.card="card",n.ping="ping",n.pong="pong"})(nh||(nh={}));var TS;(function(n){n[n.ok=200]="ok",n[n.internal_server_error=500]="internal_server_error"})(TS||(TS={}));var NS=class{constructor(t){var o;this.wsConfig=new NP,this.reconnectGeneration=0,this.pendingWsInstance=null,this.isConnecting=!1,this.reconnectInfo={lastConnectTime:0,nextConnectTime:0},this.hasEverConnected=!1,this.terminalError=!1,this.currentReconnectAttempts=0;let{appId:a,appSecret:e,clientAssertionProvider:i,agent:A,domain:r=ks.Feishu,httpInstance:s=gh,loggerLevel:g=Bo.info,logger:c=Kg,autoReconnect:I=!0,source:d,extraUaTags:B,onReady:f,onError:Q,onReconnecting:y,onReconnected:m,handshakeTimeoutMs:_,wsConfig:T}=t;if(this.userAgent=VP(d,{extraTags:B}),this.logger=new Vc(g,c),DS(!a,()=>this.logger.error("appId is needed")),!e&&!i)throw new ga(XP,"appSecret or clientAssertionProvider is required");this.agent=A,this.dataCache=new RP({logger:this.logger}),this.httpInstance=s,this.wsConfig.updateClient({appId:a,appSecret:e||"",clientAssertionProvider:i,domain:h5(r)}),this.wsConfig.updateWs({autoReconnect:I}),this.onReady=f,this.onError=Q,this.onReconnecting=y,this.onReconnected=m,this.handshakeTimeoutMs=_,this.pingTimeoutSec=(o=T?.pingTimeout)!==null&&o!==void 0?o:0}armLiveness(){this.pingTimeoutSec&&(this.livenessTimer&&clearTimeout(this.livenessTimer),this.livenessTimer=setTimeout(()=>{var t;this.livenessTimer=void 0,this.logger.warn("[ws]",`no pong/inbound within ${this.pingTimeoutSec}s of last ping, terminating to trigger reconnect`);try{(t=this.wsConfig.getWSInstance())===null||t===void 0||t.terminate()}catch{}},this.pingTimeoutSec*1e3))}clearLiveness(){this.livenessTimer&&(clearTimeout(this.livenessTimer),this.livenessTimer=void 0)}safeInvoke(t,o,...a){if(o)try{o(...a)}catch(e){this.logger.error(`[ws] ${t} callback threw`,e)}}pullConnectConfig(){return h(this,void 0,void 0,function*(){let{appId:t,appSecret:o,clientAssertionProvider:a,domain:e}=this.wsConfig.getClient(),i="/callback/ws/endpoint",A=this.wsConfig.wsConfigUrl,r={locale:"zh","User-Agent":this.userAgent},s={AppID:t};try{if(a){let Q=eG(e),y=yield a.retrieveToken(Q);if(!y||!y.value)throw new ga(ZP,"client assertion token is empty");s.AppSecret="",s.ClientAssertion=y.value,y.targetInfo&&(A=tG(y.targetInfo,i),r[WP]=Q)}else s.AppSecret=o;let{code:g,data:{URL:c,ClientConfig:I},msg:d}=yield this.httpInstance.request({method:"post",url:A,data:s,headers:r,timeout:15e3});if(g!==UC.ok){let Q=g===UC.system_busy?"system busy":d;return this.logger.error("[ws]",`code: ${g}, ${Q}`),g===UC.internal_error?{ok:!1,retryable:!0}:{ok:!1,retryable:!1,error:`pullConnectConfig failed: code=${g}, msg=${Q}`}}let{device_id:B,service_id:f}=oke.parse(c);return this.wsConfig.updateWs({connectUrl:c,deviceId:B,serviceId:f,pingInterval:I.PingInterval*1e3,reconnectCount:I.ReconnectCount,reconnectInterval:I.ReconnectInterval*1e3,reconnectNonce:I.ReconnectNonce*1e3}),this.logger.debug("[ws]",`get connect config success, ws url: ${c}`),{ok:!0}}catch(g){return this.logger.error("[ws]",g?.message||"system busy"),g instanceof ga?{ok:!1,retryable:!1,error:g.message}:{ok:!1,retryable:!0}}})}connect(){let t=this.wsConfig.getWS("connectUrl"),o;try{let{agent:a}=this;o=new Vo(t,{agent:a})}catch{this.logger.error("[ws]","new WebSocket error")}return o?(this.pendingWsInstance=o,new Promise(a=>{let e=!1,i,A=r=>{e||(e=!0,i&&clearTimeout(i),this.pendingWsInstance===o&&(this.pendingWsInstance=null),a(r))};this.handshakeTimeoutMs&&this.handshakeTimeoutMs>0&&(i=setTimeout(()=>{this.logger.error("[ws]",`handshake timeout after ${this.handshakeTimeoutMs}ms`),o.removeAllListeners("open");try{o.terminate()}catch{}A(!1)},this.handshakeTimeoutMs)),o.on("open",()=>{this.logger.debug("[ws]","ws connect success"),this.wsConfig.setWSInstance(o),this.pingLoop(),A(!0)}),o.on("error",()=>{this.logger.error("[ws]","ws connect failed"),A(!1)})})):Promise.resolve(!1)}reConnect(t=!1){return h(this,void 0,void 0,function*(){if(this.isConnecting&&!t){this.logger.debug("[ws]","repeat connection");return}this.isConnecting=!0;let o=++this.reconnectGeneration,a=()=>h(this,void 0,void 0,function*(){if(o!==this.reconnectGeneration)return{ok:!1,retryable:!1,cancelled:!0};this.reconnectInfo.lastConnectTime=Date.now();let c=yield this.pullConnectConfig();if(o!==this.reconnectGeneration)return{ok:!1,retryable:!1,cancelled:!0};if(!c.ok)return c;let I=yield this.connect();return o!==this.reconnectGeneration?{ok:!1,retryable:!1,cancelled:!0}:I?(this.communicate(),{ok:!0}):{ok:!1,retryable:!0}});this.pingInterval&&clearTimeout(this.pingInterval),this.reconnectInterval&&clearTimeout(this.reconnectInterval);let e=this.wsConfig.getWSInstance();if(t){e&&e?.terminate();let c={ok:!1,retryable:!0};try{c=yield a()}finally{o===this.reconnectGeneration&&(this.isConnecting=!1)}if(o!==this.reconnectGeneration||c.cancelled)return;if(c.ok)this.hasEverConnected=!0,this.safeInvoke("onReady",this.onReady);else if(c.retryable)this.logger.error("[ws]","connect failed"),yield this.reConnect();else{this.hasEverConnected=!1,this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error(c.error));return}this.logger.info("[ws]","ws client ready");return}let{autoReconnect:i,reconnectNonce:A,reconnectCount:r,reconnectInterval:s}=this.wsConfig.getWS();if(!i){this.hasEverConnected||(this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error("WebSocket connect failed and autoReconnect is disabled")));return}this.logger.info("[ws]","reconnect"),this.hasEverConnected&&this.safeInvoke("onReconnecting",this.onReconnecting),e&&e?.terminate(),this.wsConfig.setWSInstance(null);let g=A?A*Math.random():0;this.reconnectInterval=setTimeout(()=>h(this,void 0,void 0,function*(){(function c(I){return h(this,void 0,void 0,function*(){if(o!==this.reconnectGeneration)return;I++,this.currentReconnectAttempts=I;let d=yield a();if(o===this.reconnectGeneration){if(d.ok){this.logger.debug("[ws]","reconnect success"),this.currentReconnectAttempts=0,this.hasEverConnected?this.safeInvoke("onReconnected",this.onReconnected):(this.hasEverConnected=!0,this.safeInvoke("onReady",this.onReady)),this.isConnecting=!1;return}if(!d.retryable){this.isConnecting=!1,this.hasEverConnected=!1,this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error(d.error));return}if(this.logger.info("ws",`unable to connect to the server after trying ${I} times")`),r>=0&&I>=r){this.isConnecting=!1,this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error(`WebSocket reconnect exhausted after ${I} attempts`));return}this.reconnectInterval=setTimeout(()=>{c.bind(this)(I)},s),this.reconnectInfo.nextConnectTime=Date.now()+s}})}).bind(this)(0)}),g),this.reconnectInfo.nextConnectTime=Date.now()+g})}pingLoop(){let{serviceId:t,pingInterval:o}=this.wsConfig.getWS(),a=this.wsConfig.getWSInstance();if(a?.readyState===Vo.OPEN){let e={headers:[{key:KC.type,value:nh.ping}],service:Number(t),method:HC.control,SeqID:0,LogID:0};this.sendMessage(e),this.armLiveness(),this.logger.trace("[ws]","ping success")}this.pingInterval=setTimeout(this.pingLoop.bind(this),o)}communicate(){let t=this.wsConfig.getWSInstance();t?.on("message",o=>h(this,void 0,void 0,function*(){this.clearLiveness();let a=kke(o),{method:e}=a;e===HC.control&&(yield this.handleControlData(a)),e===HC.data&&(yield this.handleEventData(a))})),t?.on("error",o=>{this.logger.error("[ws]","ws error")}),t?.on("close",()=>{this.logger.debug("[ws]","client closed"),this.clearLiveness(),this.reConnect()})}handleControlData(t){var o;return h(this,void 0,void 0,function*(){let a=(o=t.headers.find(i=>i.key===KC.type))===null||o===void 0?void 0:o.value,e=t.payload;if(a!==nh.ping&&a===nh.pong&&e){this.logger.trace("[ws]","receive pong");let i=new TextDecoder("utf-8").decode(e),{PingInterval:A,ReconnectCount:r,ReconnectInterval:s,ReconnectNonce:g}=JSON.parse(i);this.wsConfig.updateWs({pingInterval:A*1e3,reconnectCount:r,reconnectInterval:s*1e3,reconnectNonce:g*1e3}),this.logger.trace("[ws]","update wsConfig with pong data")}})}handleEventData(t){var o;return h(this,void 0,void 0,function*(){let a=t.headers.reduce((f,Q)=>(f[Q.key]=Q.value,f),{}),{message_id:e,sum:i,seq:A,type:r,trace_id:s}=a,g=t.payload;if(r!==nh.event)return;let c=this.dataCache.mergeData({message_id:e,sum:Number(i),seq:Number(A),trace_id:s,data:g});if(!c)return;this.logger.debug("[ws]",`receive message, message_type: ${r}; message_id: ${e}; trace_id: ${s}; data: ${c.data}`);let I={code:TS.ok},d=Date.now();try{let f=yield(o=this.eventDispatcher)===null||o===void 0?void 0:o.invoke(c,{needCheck:!1});f&&(I.data=Buffer.from(JSON.stringify(f)).toString("base64"))}catch(f){I.code=TS.internal_server_error,this.logger.error("[ws]",`invoke event failed, message_type: ${r}; message_id: ${e}; trace_id: ${s}; error: ${f}`)}let B=Date.now();this.sendMessage(Object.assign(Object.assign({},t),{headers:[...t.headers,{key:KC.biz_rt,value:String(d-B)}],payload:new TextEncoder().encode(JSON.stringify(I))}))})}sendMessage(t){var o;let a=this.wsConfig.getWSInstance();if(a?.readyState===Vo.OPEN){let e=Q5.Frame.encode(t).finish();(o=this.wsConfig.getWSInstance())===null||o===void 0||o.send(e,i=>{i&&this.logger.error("[ws]","send data failed")})}}getReconnectInfo(){return this.reconnectInfo}getConnectionStatus(){return{state:this.computeState(),lastConnectTime:this.reconnectInfo.lastConnectTime||void 0,nextConnectTime:this.reconnectInfo.nextConnectTime||void 0,reconnectAttempts:this.currentReconnectAttempts}}computeState(){var t;return this.terminalError?"failed":this.isConnecting&&!this.hasEverConnected?"connecting":this.isConnecting&&this.hasEverConnected?"reconnecting":((t=this.wsConfig.getWSInstance())===null||t===void 0?void 0:t.readyState)===Vo.OPEN?"connected":"idle"}close(t={}){let{force:o=!1}=t;this.reconnectGeneration++,this.pingInterval&&(clearTimeout(this.pingInterval),this.pingInterval=void 0),this.reconnectInterval&&(clearTimeout(this.reconnectInterval),this.reconnectInterval=void 0),this.clearLiveness(),this.dataCache.destroy(),this.isConnecting=!1,this.currentReconnectAttempts=0;let a=this.pendingWsInstance;if(a){this.pendingWsInstance=null,a.removeAllListeners("open");try{o?a.terminate():a.close()}catch{}}let e=this.wsConfig.getWSInstance();e&&(e.removeAllListeners(),o?e.terminate():e.close(),this.wsConfig.setWSInstance(null)),this.logger.info("[ws]",`ws client closed manually${o?" (force)":""}`)}start(t){return h(this,void 0,void 0,function*(){let{appId:o}=this.wsConfig.getClient();if(!/^cli_[0-9a-fA-F]{16}$/.test(o)){this.logger.error("[ws]",`invalid appId: ${o}`);return}let{eventDispatcher:a}=t;if(!a){this.logger.warn("[ws]","client need to start with a eventDispatcher");return}let e=this.wsConfig.getWSInstance();if(this.terminalError&&(this.isConnecting=!1),this.isConnecting||e&&e.readyState!==Vo.CLOSED){this.logger.debug("[ws]","start ignored because client is already connecting or connected");return}this.terminalError=!1,this.currentReconnectAttempts=0,this.dataCache.clearAtInterval(),this.logger.info("[ws]",`receive events or callbacks through persistent connection only available in self-build & Feishu app, Configured in: +`+i)}}catch{}}throw a}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=kn(this.defaults,o);let{transitional:a,paramsSerializer:e,headers:i}=o;a!==void 0&&iC.assertOptions(a,{silentJSONParsing:ga.transitional(ga.boolean),forcedJSONParsing:ga.transitional(ga.boolean),clarifyTimeoutError:ga.transitional(ga.boolean),legacyInterceptorReqResOrdering:ga.transitional(ga.boolean),advertiseZstdAcceptEncoding:ga.transitional(ga.boolean),validateStatusUndefinedResolves:ga.transitional(ga.boolean)},!1),e!=null&&(Z.isFunction(e)?o.paramsSerializer={serialize:e}:iC.assertOptions(e,{encode:ga.function,serialize:ga.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),iC.assertOptions(o,{baseUrl:ga.spelling("baseURL"),withXsrfToken:ga.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let A=i&&Z.merge(i.common,i[o.method]);i&&Z.forEach(["delete","get","head","post","put","patch","query","common"],f=>{delete i[f]}),o.headers=jt.concat(A,i);let r=[],s=!0;this.interceptors.request.forEach(function(Q){if(typeof Q.runWhen=="function"&&Q.runWhen(o)===!1)return;s=s&&Q.synchronous;let y=o.transitional||Fc;y&&y.legacyInterceptorReqResOrdering?r.unshift(Q.fulfilled,Q.rejected):r.push(Q.fulfilled,Q.rejected)});let g=[];this.interceptors.response.forEach(function(Q){g.push(Q.fulfilled,Q.rejected)});let c,I=0,d;if(!s){let f=[rC.bind(this),void 0];for(f.unshift(...r),f.push(...g),d=f.length,c=Promise.resolve(o);IrC.call(this,B)))}catch(m){c=Promise.reject(m)}break}}if(!c)try{c=rC.call(this,B)}catch(f){c=Promise.reject(f)}for(I=0,d=g.length;I{if(!a._listeners)return;let i=a._listeners.length;for(;i-- >0;)a._listeners[i](e);a._listeners=null}),this.promise.then=e=>{let i,A=new Promise(r=>{a.subscribe(r),i=r}).then(e);return A.cancel=function(){a.unsubscribe(i)},A},t(function(i,A,r){a.reason||(a.reason=new ho(i,A,r),o(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){let t=new AbortController,o=a=>{t.abort(a)};return this.subscribe(o),t.signal.unsubscribe=()=>this.unsubscribe(o),t.signal}static source(){let t;return{token:new n(function(e){t=e}),cancel:t}}},G8=PN;function GN(n){return function(o){return n.apply(null,o)}}function FN(n){return Z.isObject(n)&&n.isAxiosError===!0}var LN={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(LN).forEach(([n,t])=>{LN[t]=n});var F8=LN;function L8(n){let t=new aC(n),o=Ru(aC.prototype.request,t);return Z.extend(o,aC.prototype,t,{allOwnKeys:!0}),Z.extend(o,t,null,{allOwnKeys:!0}),o.create=function(e){return L8(kn(n,e))},o}var kr=L8(Np);kr.Axios=aC;kr.CanceledError=ho;kr.CancelToken=G8;kr.isCancel=ju;kr.VERSION=_g;kr.toFormData=Gc;kr.AxiosError=Oe;kr.Cancel=kr.CanceledError;kr.all=function(t){return Promise.all(t)};kr.spread=GN;kr.isAxiosError=FN;kr.mergeConfig=kn;kr.AxiosHeaders=jt;kr.formToJSON=n=>gm(Z.isHTMLForm(n)?new FormData(n):n);kr.getAdapter=Bm.getAdapter;kr.HttpStatusCode=F8;kr.default=kr;var Qm=kr;var{Axios:wdA,AxiosError:UN,CanceledError:DdA,isCancel:OdA,CancelToken:bdA,VERSION:MdA,all:_dA,Cancel:TdA,isAxiosError:NdA,spread:RdA,toFormData:kdA,AxiosHeaders:vdA,HttpStatusCode:PdA,formToJSON:GdA,getAdapter:FdA,mergeConfig:LdA,create:UdA}=Qm;var E=ze(Nz()),b=ze(kz()),M=ze(uV()),p5=ze(JV());import it from"fs";import LC from"path";import mS from"crypto";import Ike from"querystring";var VRe=ze(HW(),1),WRe=ze(sS(),1),ZRe=ze($p(),1),XRe=ze(qR(),1),$Re=ze(WR(),1),eke=ze(tk(),1),WW=ze(lS(),1),Ake=ze(VW(),1);var Vo=WW.default;import{gzipSync as lke}from"zlib";import dke from"http";import pke from"https";import{promises as hke}from"dns";import{isIP as h5}from"net";function Y(n,t){var o={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&t.indexOf(a)<0&&(o[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,a=Object.getOwnPropertySymbols(n);e=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function S(n){return this instanceof S?(this.v=n,this):new S(n)}function j(n,t,o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=o.apply(n,t||[]),e,i=[];return e={},A("next"),A("throw"),A("return"),e[Symbol.asyncIterator]=function(){return this},e;function A(d){a[d]&&(e[d]=function(B){return new Promise(function(f,Q){i.push([d,B,f,Q])>1||r(d,B)})})}function r(d,B){try{s(a[d](B))}catch(f){I(i[0][3],f)}}function s(d){d.value instanceof S?Promise.resolve(d.value.v).then(g,c):I(i[0][2],d)}function g(d){r("next",d)}function c(d){r("throw",d)}function I(d,B){d(B),i.shift(),i.length&&r(i[0][0],i[0][1])}}function V6(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n[Symbol.asyncIterator],o;return t?t.call(n):(n=typeof z6=="function"?z6(n):n[Symbol.iterator](),o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o);function a(i){o[i]=n[i]&&function(A){return new Promise(function(r,s){A=n[i](A),e(r,s,A.done,A.value)})}}function e(i,A,r,s){Promise.resolve(s).then(function(g){i({value:g,done:r})},A)}}var BS;function Eke(){if(BS!==void 0)return BS;let n=[LC.resolve(__dirname,"..","package.json"),LC.resolve(__dirname,"..","..","package.json")];for(let t of n)try{let o=JSON.parse(it.readFileSync(t,"utf-8"));if(o.name==="@larksuiteoapi/node-sdk"&&typeof o.version=="string")return BS=o.version,o.version}catch{}return BS="unknown","unknown"}function W6(n){return n.replace(/[^a-zA-Z0-9._-]/g,"_").slice(0,64)}function VP(n,t){let o=`oapi-node-sdk/${Eke()}`;if(n){let a=W6(n);a&&(o+=` source/${a}`)}if(t?.extraTags)for(let a of t.extraTags){let e=W6(a);e&&(o+=` ${e}`)}return o}var gh=Qm.create(),uke=VP();gh.interceptors.request.use(n=>(n.headers&&!n.headers["User-Agent"]&&(n.headers["User-Agent"]=uke),n),void 0,{synchronous:!0});gh.interceptors.response.use(n=>n.config.$return_headers?{data:n.data,headers:n.headers}:n.data);var Rs;(function(n){n[n.SelfBuild=0]="SelfBuild",n[n.ISV=1]="ISV"})(Rs||(Rs={}));var ks;(function(n){n[n.Feishu=0]="Feishu",n[n.Lark=1]="Lark"})(ks||(ks={}));var Bo;(function(n){n[n.fatal=0]="fatal",n[n.error=1]="error",n[n.warn=2]="warn",n[n.info=3]="info",n[n.debug=4]="debug",n[n.trace=5]="trace"})(Bo||(Bo={}));var SS=Symbol("event-type"),wS=Symbol("tenant-key"),xC=Symbol("app-ticket"),FC=Symbol("tenant-access-token"),E5=Symbol("with-helpdesk-authorization"),u5=Symbol("with-user-access-token"),Cke=Symbol("user-access-token"),Z6=Symbol("aily-session-record"),Bke=n=>Buffer.from(n).toString("base64"),DS=class{constructor(){this.values=new Map}getCacheKey(t,o){return o?`${o}/${t.toString()}`:t}get(t,o){return h(this,void 0,void 0,function*(){let a=this.getCacheKey(t,o?.namespace),e=this.values.get(a);if(e){let{value:i,expiredTime:A}=e;if(!A||A-new Date().getTime()>0)return i}})}set(t,o,a,e){return h(this,void 0,void 0,function*(){let i=this.getCacheKey(t,e?.namespace);return this.values.set(i,{value:o,expiredTime:a}),!0})}},jC=new DS,YC=class{constructor(t){let o=mS.createHash("sha256");o.update(t),this.key=o.digest()}decrypt(t){let o=Buffer.from(t,"base64"),a=mS.createDecipheriv("aes-256-cbc",this.key,o.slice(0,16)),e=a.update(o.slice(16).toString("hex"),"hex","utf8");return e+=a.final("utf8"),e}},C5=n=>{switch(n){case ks.Feishu:return"https://open.feishu.cn";case ks.Lark:return"https://open.larksuite.com";default:return n}},u=(n,t={})=>n.replace(/:([^/]+)/g,(o,a)=>{if(t[a]!==void 0)return t[a];throw new Error(`request miss ${a} path argument`)}),OS=(n,t)=>h(void 0,void 0,void 0,function*(){(typeof n=="function"?n():n)&&(yield t())}),fke=n=>n?n.replace(/^\//,""):"",fS=(n,t=[])=>{let o={};return n&&t.forEach(a=>{Object.prototype.hasOwnProperty.call(n,a)&&(o[a]=n[a])}),o},C=n=>{var t;if(n instanceof UN){let{message:o,response:a,request:e,config:i}=fS(n,["message","response","request","config"]),r=[{message:o,config:fS(i,["data","url","params","method"]),request:fS(e,["protocol","host","path","method"]),response:fS(a,["data","status","statusText"])}],s=(t=n?.response)===null||t===void 0?void 0:t.data;return s&&(typeof s=="object"?r.push(Object.assign(Object.assign({},s),s.error?s.error:{})):r.push(s)),r}return[n]},fk=class{constructor(){this.acs={accessRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},device:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/devices`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},accessRecordAccessPhoto:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/access_records/:access_record_id/access_photo`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},user:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userFace:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"PUT",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},ruleExternal:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deviceBind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external/device_bind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},visitor:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/visitors/:visitor_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/visitors`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{accessRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},device:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/devices`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},accessRecordAccessPhoto:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/access_records/:access_record_id/access_photo`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},user:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userFace:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"PUT",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},ruleExternal:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deviceBind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external/device_bind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},visitor:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/visitors/:visitor_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/visitors`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Qk=class extends fk{constructor(){super(...arguments),this.admin={badgeGrant:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},badge:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},password:{reset:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/password/reset`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},badgeImage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badge_images`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},auditInfo:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},adminUserStat:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/admin_user_stats`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},adminDeptStat:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/admin_dept_stats`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{badgeGrant:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},badge:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},password:{reset:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/password/reset`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},badgeImage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badge_images`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},auditInfo:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},adminUserStat:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/admin_user_stats`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},adminDeptStat:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/admin_dept_stats`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},yk=class extends Qk{constructor(){super(...arguments),this.aily_rag={}}},mk=class extends yk{constructor(){super(...arguments),this.aily={v1:{ailySession:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appDataAssetTag:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_asset_tags`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_asset_tags`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appSkill:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),start:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id/start`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appKnowledge:{ask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/knowledges/ask`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appDataAsset:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/:data_asset_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/:data_asset_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadFile:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/upload_file`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},ailySessionRun:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs/:run_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs/:run_id/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ailySessionAilyMessage:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages/:aily_message_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentAgentVisibility:{check:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/agent_visibility/check`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentAgentAttachment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/attachments`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},tenantAppStat:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/app_stats`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/app_stats`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentAgentChat:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/chats/:agent_chat_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/chats`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentAgentChatSession:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions/:agent_chat_session_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions/:agent_chat_session_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentAgentArtifact:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/artifacts/:agent_artifact_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Sk=class extends mk{constructor(){super(...arguments),this.apaas={v1:{approvalTask:{addAssignee:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/add_assignee`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),agree:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/agree`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),transfer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/transfer`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reject:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/reject`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationObjectRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationObject:{oqlQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/oql_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationFunction:{invoke:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/functions/:function_api_name/invoke`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationRoleMember:{batchRemoveAuthorization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member/batch_remove_authorization`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreateAuthorization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member/batch_create_authorization`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationRecordPermissionMember:{batchCreateAuthorization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/record_permissions/:record_permission_api_name/member/batch_create_authorization`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchRemoveAuthorization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/record_permissions/:record_permission_api_name/member/batch_remove_authorization`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationEnvironmentVariable:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/environment_variables/:environment_variable_api_name`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/environment_variables/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userTask:{expediting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/expediting`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/cc`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),chatGroup:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/chat_group`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),rollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/rollback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),rollbackPoints:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/rollback_points`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/user_task/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationFlow:{execute:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/flows/:flow_id/execute`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},approvalInstance:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/approval_instances/:approval_instance_id/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationAuditLog:{auditLogList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/audit_log_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),dataChangeLogsList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/data_change_logs_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),dataChangeLogDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/data_change_log_detail`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},seatAssignment:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/seat_assignments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/seat_assignments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},seatActivity:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/seat_activities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/seat_activities`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},app:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/apps`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/apps`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workspaceTable:{recordsBatchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records_batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recordsDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recordsPatch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recordsGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recordsPost:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),tableGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workspace:{sqlCommands:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/sql_commands`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workspaceView:{viewsGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/views/:view_name/records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workspaceEnum:{enumGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/enums/:enum_name`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/enums`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tenantAppMetrics:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/tenant_app_metrics/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},wk=class extends Sk{constructor(){super(...arguments),this.application={applicationAppUsage:{overview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/overview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),messagePushOverview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/message_push_overview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),departmentOverview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/department_overview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationFeedback:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks/:feedback_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appRecommendRule:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},application:{contactsRangeConfiguration:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),underauditlistWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),underauditlist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationAppVersion:{contactsRangeSuggest:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id/contacts_range_suggest`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationVisibility:{checkWhiteBlackList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility/check_white_black_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationContactsRange:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationCollaborators:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationOwner:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/owner`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationManagement:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/management`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},scope:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/scopes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),apply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/scopes/apply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appBadge:{set:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/app_badge/set`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v5:{application:{favouriteWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v5/applications/favourite`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),favourite:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v5/applications/favourite`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recommendWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v5/applications/recommend`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),recommend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v5/applications/recommend`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v6:{applicationAppUsage:{overview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/overview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),messagePushOverview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/message_push_overview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),departmentOverview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/department_overview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationFeedback:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks/:feedback_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appRecommendRule:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},application:{contactsRangeConfiguration:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),underauditlistWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),underauditlist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationAppVersion:{contactsRangeSuggest:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id/contacts_range_suggest`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationVisibility:{checkWhiteBlackList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility/check_white_black_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationContactsRange:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationCollaborators:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationOwner:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/owner`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationManagement:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/management`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},scope:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/scopes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),apply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/scopes/apply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appBadge:{set:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/app_badge/set`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v7:{applicationBase:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v7/applications/:app_id/base`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationPublish:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v7/applications/:app_id/publish`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appAvatarUpload:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v7/app_avatar/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},applicationConfig:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v7/applications/:app_id/config`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationAbility:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v7/applications/:app_id/ability`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Dk=class extends wk{constructor(){super(...arguments),this.approval={instance:{specifiedRollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/cc`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addSign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/add_sign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchCc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/search_cc`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/preview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/remind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addCc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/add_cc`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recall:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/recall`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),detail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/detail`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),initiatedWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),initiated:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},task:{transfer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/transfer`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reject:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/reject`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),resubmit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/resubmit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),approve:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/approve`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),refuse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/refuse`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),pass:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/pass`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addSign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/add_sign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),rollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/rollback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},approval:{unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals/:approval_code`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},instanceComment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalInstance:{check:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_instances/check`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_instances`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalApproval:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_approvals/:approval_code`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_approvals`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},district:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v4:{instance:{specifiedRollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/cc`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addSign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/add_sign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchCc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/search_cc`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/preview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/remind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addCc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/add_cc`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recall:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/recall`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),detail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/detail`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),initiatedWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),initiated:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},task:{transfer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/transfer`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reject:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/reject`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),resubmit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/resubmit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),approve:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/approve`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),refuse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/refuse`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),pass:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/pass`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addSign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/add_sign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),rollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/rollback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},approval:{unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals/:approval_code`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},instanceComment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalInstance:{check:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_instances/check`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_instances`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalApproval:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_approvals/:approval_code`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_approvals`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},district:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Ok=class extends Dk{constructor(){super(...arguments),this.attendance_machine={}}},bk=class extends Ok{constructor(){super(...arguments),this.attendance={file:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/files/:file_id/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/files/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},group:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/:group_id/list_user`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userDailyShift:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreateTemp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create_temp`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userTaskRemedy:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_task_remedys`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryUserAllowedRemedys:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query_user_allowed_remedys`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},shift:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userStatsField:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_fields/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userStatsView:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_views/:user_stats_view_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_views/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},approvalInfo:{process:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/approval_infos/process`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userSetting:{modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_settings/modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_settings/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userStatsData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_datas/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},archiveRule:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),userStatsFieldsQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule/user_stats_fields_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delReport:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule/del_report`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadReport:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule/upload_report`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leaveEmployExpireRecord:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/leave_employ_expire_records/:leave_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leaveAccrualRecord:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/leave_accrual_record/:leave_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userFlow:{batchDel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/batch_del`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/:user_flow_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userApproval:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_approvals`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_approvals/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userTask:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_tasks/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{file:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/files/:file_id/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/files/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},group:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/:group_id/list_user`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userDailyShift:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreateTemp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create_temp`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userTaskRemedy:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_task_remedys`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryUserAllowedRemedys:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query_user_allowed_remedys`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},shift:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userStatsField:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_fields/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userStatsView:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_views/:user_stats_view_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_views/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},approvalInfo:{process:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/approval_infos/process`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userSetting:{modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_settings/modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_settings/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userStatsData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_datas/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},archiveRule:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),userStatsFieldsQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule/user_stats_fields_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delReport:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule/del_report`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadReport:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule/upload_report`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leaveEmployExpireRecord:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/leave_employ_expire_records/:leave_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leaveAccrualRecord:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/leave_accrual_record/:leave_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userFlow:{batchDel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/batch_del`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/:user_flow_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userApproval:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_approvals`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_approvals/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userTask:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_tasks/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Mk=class extends bk{constructor(){super(...arguments),this.audio_video_ai={}}},_k=class extends Mk{constructor(){super(...arguments),this.auth={appAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/app_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),internal:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/app_access_token/internal`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tenantAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/tenant_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),internal:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTicket:{resend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/app_ticket/resend`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v3:{appAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/app_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),internal:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/app_access_token/internal`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tenantAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/tenant_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),internal:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTicket:{resend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/app_ticket/resend`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Tk=class extends _k{constructor(){super(...arguments),this.authen={userInfo:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/user_info`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},accessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},refreshAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/refresh_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},oidcAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/oidc/access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},oidcRefreshAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/oidc/refresh_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{userInfo:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/user_info`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},accessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},refreshAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/refresh_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},oidcAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/oidc/access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},oidcRefreshAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/oidc/refresh_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Nk=class extends Tk{constructor(){super(...arguments),this.authz={}}},Rk=class extends Nk{constructor(){super(...arguments),this.aweme_ecosystem={}}},kk=class extends Rk{constructor(){super(...arguments),this.baike={entity:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/match`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),highlight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/highlight`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),extract:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/extract`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},classification:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},file:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/files/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/files/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},draft:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/drafts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/drafts/:draft_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{entity:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/match`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),highlight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/highlight`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),extract:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/extract`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},classification:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},file:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/files/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/files/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},draft:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/drafts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/drafts/:draft_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},vk=class extends kk{constructor(){super(...arguments),this.base={v2:{appRole:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/base/v2/apps/:app_token/roles/:role_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Pk=class extends vk{constructor(){super(...arguments),this.bitable={appTable:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appDashboard:{copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards/:block_id/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},app:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableRecord:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appRoleMember:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appRole:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableView:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableForm:{upgrade:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/upgrade`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableFieldGroup:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/field_groups`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableFormField:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields/:field_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appWorkflow:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows/:workflow_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableField:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appBlockWorkflow:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/block_workflows`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{appTable:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appDashboard:{copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards/:block_id/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},app:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableRecord:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appRoleMember:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appRole:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableView:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableForm:{upgrade:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/upgrade`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableFieldGroup:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/field_groups`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableFormField:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields/:field_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appWorkflow:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows/:workflow_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableField:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appBlockWorkflow:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/block_workflows`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Gk=class extends Pk{constructor(){super(...arguments),this.block={entity:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/block/v2/entities`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/block/v2/entities/:block_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},message:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/block/v2/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v2:{entity:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/block/v2/entities`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/block/v2/entities/:block_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},message:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/block/v2/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Fk=class extends Gk{constructor(){super(...arguments),this.board={v1:{whiteboardNode:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),createPlantuml:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes/plantuml`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},whiteboard:{downloadAsImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/download_as_image`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),theme:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/theme`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateTheme:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/update_theme`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Lk=class extends Fk{constructor(){super(...arguments),this.bot={v4:{bot:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/bot/v4/bot/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bot/v4/bot/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Uk=class extends Lk{constructor(){super(...arguments),this.c360={}}},Hk=class extends Uk{constructor(){super(...arguments),this.calendar={exchangeBinding:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/exchange_bindings`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendar:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),primarys:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/primarys`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),primary:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/primary`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarAcl:{unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/:acl_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEvent:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/reply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),instances:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/instances`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),instanceView:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/instance_view`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventAttendee:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},setting:{generateCaldavConf:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/settings/generate_caldav_conf`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},timeoffEvent:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/timeoff_events/:timeoff_event_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/timeoff_events`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventMeetingMinute:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_minute`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventMeetingChat:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},freebusy:{batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/freebusy/batch`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/freebusy/list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventAttendeeChatMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v4:{exchangeBinding:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/exchange_bindings`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendar:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),primarys:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/primarys`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),primary:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/primary`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarAcl:{unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/:acl_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEvent:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/reply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),instances:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/instances`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),instanceView:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/instance_view`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventAttendee:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},setting:{generateCaldavConf:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/settings/generate_caldav_conf`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},timeoffEvent:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/timeoff_events/:timeoff_event_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/timeoff_events`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventMeetingMinute:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_minute`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventMeetingChat:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},freebusy:{batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/freebusy/batch`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/freebusy/list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventAttendeeChatMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Kk=class extends Hk{constructor(){super(...arguments),this.cardkit={v1:{card:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),settings:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/settings`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),idConvert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/id_convert`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},cardElement:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),content:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id/content`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},xk=class extends Kk{constructor(){super(...arguments),this.ccm_unified_resource={}}},Yk=class extends xk{constructor(){super(...arguments),this.collab_plugins={}}},jk=class extends Yk{constructor(){super(...arguments),this.comment_sdk={}}},Jk=class extends jk{constructor(){super(...arguments),this.compensation={v1:{indicator:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/indicators`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/indicators`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},socialPlan:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/social_plans/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/social_plans`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/social_plans`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},item:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/items`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/items`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},plan:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/plans`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/plans`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},socialInsurance:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/social_insurances`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},itemCategory:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/item_categories`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/item_categories`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},changeReason:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/change_reasons`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/change_reasons`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},archive:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/archives`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/archives/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},recurringPayment:{queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/recurring_payment/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/recurring_payment/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchRemove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},socialArchive:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/social_archive/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},socialArchiveAdjustRecord:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/social_archive_adjust_record/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},lumpSumPayment:{batchRemove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryDetailWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query_detail`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query_detail`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},qk=class extends Jk{constructor(){super(...arguments),this.contact={group:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),memberBelong:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/member_belong`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),simplelistWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),simplelist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},unit:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/list_department`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unbindDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/unbind_department`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),bindDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/bind_department`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},groupMember:{simplelist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/simplelist`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),add:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/add`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchRemove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchAdd:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_add`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},department:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateDepartmentId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id/update_department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unbindDepartmentChat:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/unbind_department_chat`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),parentWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),parent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),childrenWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),children:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/batch`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobLevel:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobFamily:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},user:{updateUserId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id/update_user_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),resurrect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id/resurrect`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGetId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/batch_get_id`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),findByDepartmentWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),findByDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),basicBatch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/basic_batch`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/batch`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeeTypeEnum:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},functionalRoleMember:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/:member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_delete`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),scopes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/scopes`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},functionalRole:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobTitle:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_titles/:job_title_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workCity:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/work_cities/:work_city_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},scope:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customAttr:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v3:{group:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),memberBelong:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/member_belong`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),simplelistWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),simplelist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},unit:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/list_department`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unbindDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/unbind_department`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),bindDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/bind_department`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},groupMember:{simplelist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/simplelist`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),add:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/add`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchRemove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchAdd:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_add`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},department:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateDepartmentId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id/update_department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unbindDepartmentChat:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/unbind_department_chat`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),parentWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),parent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),childrenWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),children:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/batch`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobLevel:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobFamily:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},user:{updateUserId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id/update_user_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),resurrect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id/resurrect`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGetId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/batch_get_id`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),findByDepartmentWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),findByDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),basicBatch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/basic_batch`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/batch`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeeTypeEnum:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},functionalRoleMember:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/:member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_delete`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),scopes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/scopes`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},functionalRole:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobTitle:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_titles/:job_title_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workCity:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/work_cities/:work_city_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},scope:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customAttr:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},zk=class extends qk{constructor(){super(...arguments),this.content_check={}}},Vk=class extends zk{constructor(){super(...arguments),this.contract={}}},Wk=class extends Vk{constructor(){super(...arguments),this.corehr={contract:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},company:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeeType:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},nationalIdType:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},subregion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subregions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subregions/:subregion_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},countryRegion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/country_regions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/country_regions/:country_region_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},subdivision:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subdivisions/:subdivision_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subdivisions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},preHire:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},person:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobLevel:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobFamily:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},job:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobChange:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_changes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workingHoursType:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},department:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},location:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},file:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/files/:id`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},processFormVariableData:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/processes/:process_id/form_variable_data`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},commonDataId:{convert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/common_data/id/convert`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leaveGrantingRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leave_granting_records/:leave_granting_record_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leave_granting_records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leave:{leaveTypes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/leave_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),workCalendar:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),workCalendarDate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar_date`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),calendarByScope:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/calendar_by_scope`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leaveBalances:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/leave_balances`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leaveRequestHistory:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/leave_request_history`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offboarding:{submit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/submit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},securityGroup:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/security_groups`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/security_groups/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customField:{listObjectApiName:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/custom_fields/list_object_api_name`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getByParam:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/custom_fields/get_by_param`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/custom_fields/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},commonDataMetaData:{editEnumOption:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/edit_enum_option`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addEnumOption:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/add_enum_option`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},authorization:{updateRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/update_role_assign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/remove_role_assign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/add_role_assign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getByParam:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/get_by_param`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},assignedUser:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/assigned_users/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobData:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},currency:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/currencies`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/currencies/:currency_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},transferReason:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/transfer_reasons/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},transferType:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/transfer_types/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},compensationStandard:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/compensation_standards/match`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{contract:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},company:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeeType:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},nationalIdType:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},subregion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subregions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subregions/:subregion_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},countryRegion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/country_regions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/country_regions/:country_region_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},subdivision:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subdivisions/:subdivision_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subdivisions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},preHire:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},person:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobLevel:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobFamily:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},job:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobChange:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_changes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workingHoursType:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},department:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},location:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},file:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/files/:id`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},processFormVariableData:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/processes/:process_id/form_variable_data`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},commonDataId:{convert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/common_data/id/convert`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leaveGrantingRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leave_granting_records/:leave_granting_record_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leave_granting_records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leave:{leaveTypes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/leave_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),workCalendar:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),workCalendarDate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar_date`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),calendarByScope:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/calendar_by_scope`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leaveBalances:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/leave_balances`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leaveRequestHistory:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/leave_request_history`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offboarding:{submit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/submit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},securityGroup:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/security_groups`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/security_groups/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customField:{listObjectApiName:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/custom_fields/list_object_api_name`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getByParam:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/custom_fields/get_by_param`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/custom_fields/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},commonDataMetaData:{editEnumOption:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/edit_enum_option`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addEnumOption:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/add_enum_option`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},authorization:{updateRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/update_role_assign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/remove_role_assign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/add_role_assign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getByParam:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/get_by_param`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},assignedUser:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/assigned_users/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobData:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},currency:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/currencies`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/currencies/:currency_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},transferReason:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/transfer_reasons/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},transferType:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/transfer_types/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},compensationStandard:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/compensation_standards/match`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{costCenter:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/query_multi_timeline`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),tree:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/tree`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoCountryRegionSubdivision:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/country_region_subdivisions/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/country_region_subdivisions/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},probation:{submit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/submit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),withdraw:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/withdraw`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),enableDisableAssessment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/enable_disable_assessment`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),edit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/edit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},probationAssessment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/assessments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customOrg:{deleteOrg:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs/delete_org`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs/active`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs/:org_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateRule:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs/update_rule`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},preHire:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),transitTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/transit_task`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),withdrawOnboarding:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/withdraw_onboarding`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),restoreFlowInstance:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/restore_flow_instance`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),transformOnboardingTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/transform_onboarding_task`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),complete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/complete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobGrade:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_grades/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_grades/:job_grade_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_grades/:job_grade_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_grades`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_grades/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_grades/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},position:{active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/positions/active`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delPosition:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/positions/del_position`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/positions/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/positions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/positions/:position_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeesBp:{batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/bps/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},bp:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/bps`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/bps`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getByDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/bps/get_by_department`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeesAdditionalJob:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoNationality:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/nationalities/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/nationalities/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoCountryRegion:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/country_regions/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/country_regions/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoCity:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/cities/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/cities/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoDistrict:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/districts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/districts/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoBank:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/banks/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/banks/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoCurrency:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/currencies/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/currencies/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeeCustomOrg:{del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_org/del`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),createEmpCustomOrg:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_org/create_emp_custom_org`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),editEmpCustomOrg:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_org/edit_emp_custom_org`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),employmentCustomOrgRecord:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_org/employment_custom_org_record`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),querybyid:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_org/querybyid`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},signatureFile:{listByBizId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_files/list_by_biz_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_files/:signature_file_id/download`,A),method:"POST",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),terminate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_files/terminate`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_files/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_files/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_files`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_files`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},signatureNode:{listByFileId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_nodes/list_by_file_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},company:{active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/companies/active`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/companies/query_multi_timeline`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/companies/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},department:{queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryOperationLogsWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/query_operation_logs`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryOperationLogs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/query_operation_logs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/:department_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/:department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/query_timeline`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/query_multi_timeline`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),parents:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/parents`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),tree:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/tree`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},draft:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/drafts/:draft_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},approvalGroups:{openQueryPositionChangeListByIds:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_position_change_list_by_ids`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/approval_groups/:process_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),openQueryJobChangeListByIds:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_job_change_list_by_ids`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),openQueryDepartmentChangeListByIds:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_department_change_list_by_ids`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},location:{active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/active`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/query_multi_timeline`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/:location_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},locationAddress:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoLanguage:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/languages/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/languages/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoTimeZone:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reportDetailRow:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchDelete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchSave:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchSave`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workforcePlanDetailRow:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/workforce_plan_detail_row/batchDelete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchSave:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/workforce_plan_detail_row/batchSave`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offboarding:{submitV2:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/offboardings/submit_v2`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),edit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/offboardings/edit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),revoke:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/offboardings/revoke`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoBankBranch:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/bank_branchs/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/bank_branchs/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},enum:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/enums/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},process:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),flowVariableData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes/:process_id/flow_variable_data`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes/:process_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processApprover:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes/:process_id/approvers/:approver_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processWithdraw:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/process_withdraw/:process_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},approver:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/approvers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/approvers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processTransfer:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes/:process_id/transfer`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processExtra:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes/:process_id/extra`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobLevel:{queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_levels/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_levels/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_levels/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobFamily:{queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_families/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_families/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_families/query_multi_timeline`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_families/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},job:{queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/jobs/query_multi_timeline`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/jobs/:job_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/jobs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/jobs/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeesInternationalAssignment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/international_assignments/:international_assignment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/international_assignments/:international_assignment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processFormVariableData:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes/:process_id/form_variable_data`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},pathway:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pathways`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pathways/:pathway_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pathways/:pathway_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pathways/active`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pathways/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processStart:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/process_start`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},costAllocation:{batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_allocations/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_allocations/update_version`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),createVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_allocations/create_version`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_allocations/remove_version`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},costCenterVersion:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions/:version_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions/:version_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processQueryFlowDataTemplate:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/query_flow_data_template`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},defaultCostCenter:{createVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/default_cost_centers/create_version`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/default_cost_centers/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/default_cost_centers/remove_version`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/default_cost_centers/update_version`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processRevoke:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/process_revoke/:process_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},signatureTemplateInfoWithThumbnail:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobChange:{revoke:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_changes/:job_change_id/revoke`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_changes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_changes/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_changes/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},contract:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/contracts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/contracts/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workforcePlanDetail:{batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/workforce_plan_details/batch`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchV2:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/workforce_plan_details/batch_v2`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employee:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},signatureTemplate:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_templates/search`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeesJobData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/job_datas/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/job_datas/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},person:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/persons/:person_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/persons`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workforcePlan:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/workforce_plans`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/workforce_plans`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Zk=class extends Wk{constructor(){super(...arguments),this.data_cube={}}},Xk=class extends Zk{constructor(){super(...arguments),this.device={}}},$k=class extends Xk{constructor(){super(...arguments),this.directory={v1:{employee:{resurrect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/:employee_id/resurrect`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),regular:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/:employee_id/regular`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),toBeResigned:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/:employee_id/to_be_resigned`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/:employee_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/:employee_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),filter:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/filter`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},collaborationTenant:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/collaboration_tenants`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/collaboration_tenants`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},collaborationRule:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/collaboration_rules/:collaboration_rule_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/collaboration_rules`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/collaboration_rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/collaboration_rules`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/collaboration_rules/:collaboration_rule_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},collborationShareEntity:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/share_entities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/share_entities`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},department:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/departments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/departments/:department_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/departments/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/departments/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/departments/:department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),filter:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/departments/filter`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},ev=class extends $k{constructor(){super(...arguments),this.docs_ai={}}},Av=class extends ev{constructor(){super(...arguments),this.docs_tool={}}},tv=class extends Av{constructor(){super(...arguments),this.docs={v1:{content:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docs/v1/content`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},rv=class extends tv{constructor(){super(...arguments),this.document_ai={v1:{businessCard:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/business_card/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},contract:{fieldExtraction:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/contract/field_extraction`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},businessLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/business_license/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},drivingLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/driving_license/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},vehicleLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/vehicle_license/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},foodManageLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/food_manage_license/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},foodProduceLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/food_produce_license/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},hkmMainlandTravelPermit:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/hkm_mainland_travel_permit/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},chinesePassport:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/chinese_passport/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},twMainlandTravelPermit:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/tw_mainland_travel_permit/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},healthCertificate:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/health_certificate/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},vehicleInvoice:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/vehicle_invoice/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},resume:{parse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/resume/parse`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},bankCard:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/bank_card/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},trainInvoice:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/train_invoice/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},taxiInvoice:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/taxi_invoice/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},vatInvoice:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/vat_invoice/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},idCard:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/id_card/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})}}}}},iv=class extends rv{constructor(){super(...arguments),this.docx={document:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),rawContent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/raw_content`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),convert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncementBlockChildren:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},documentBlockChildren:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncement:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncementBlock:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},documentBlock:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},documentBlockDescendant:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/descendant`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{document:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),rawContent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/raw_content`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),convert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncementBlockChildren:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},documentBlockChildren:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncement:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncementBlock:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},documentBlock:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},documentBlockDescendant:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/descendant`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},av=class extends iv{constructor(){super(...arguments),this.drive={file:{createFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/create_folder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),move:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/move`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),createShortcut:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/create_shortcut`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_part`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),taskCheck:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/task_check`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deleteSubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/delete_subscribe`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getSubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/get_subscribe`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),uploadPrepare:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_prepare`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadFinish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_finish`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadAll:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_all`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meta:{batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/metas/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileSubscription:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},exportTask:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/export_tasks/file/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/export_tasks/:ticket`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/export_tasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileVersion:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileViewRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileStatistics:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/statistics`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},permissionPublicPassword:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileComment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},media:{batchGetTmpDownloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/batch_get_tmp_download_url`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_part`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),uploadFinish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_finish`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadAll:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_all`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),uploadPrepare:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_prepare`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},importTask:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/import_tasks/:ticket`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/import_tasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},user:{subscriptionStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/user/subscription_status`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeSubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/user/remove_subscription`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/user/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileCommentReply:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},permissionPublic:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},permissionMember:{batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),transferOwner:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/transfer_owner`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),auth:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/auth`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{file:{createFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/create_folder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),move:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/move`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),createShortcut:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/create_shortcut`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_part`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),taskCheck:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/task_check`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deleteSubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/delete_subscribe`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getSubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/get_subscribe`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),uploadPrepare:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_prepare`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadFinish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_finish`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadAll:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_all`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meta:{batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/metas/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileSubscription:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},exportTask:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/export_tasks/file/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/export_tasks/:ticket`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/export_tasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileVersion:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileViewRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileStatistics:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/statistics`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},permissionPublicPassword:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileComment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},media:{batchGetTmpDownloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/batch_get_tmp_download_url`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_part`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),uploadFinish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_finish`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadAll:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_all`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),uploadPrepare:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_prepare`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},importTask:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/import_tasks/:ticket`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/import_tasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},user:{subscriptionStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/user/subscription_status`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeSubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/user/remove_subscription`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/user/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileCommentReply:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},permissionPublic:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},permissionMember:{batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),transferOwner:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/transfer_owner`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),auth:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/auth`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{fileLike:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v2/files/:file_token/likes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v2/files/:file_token/likes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},commentReaction:{updateReaction:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v2/files/:file_token/comments/reaction`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},permissionPublic:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v2/permissions/:token/public`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v2/permissions/:token/public`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},ov=class extends av{constructor(){super(...arguments),this.ea_symphony={}}},nv=class extends ov{constructor(){super(...arguments),this.edu={}}},sv=class extends nv{constructor(){super(...arguments),this.ehr={attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/ehr/v1/attachments/:token`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},employee:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/ehr/v1/attachments/:token`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},employee:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},gv=class extends sv{constructor(){super(...arguments),this.elearning={}}},cv=class extends gv{constructor(){super(...arguments),this.event={outboundIp:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},connection:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/event/v1/connection`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{outboundIp:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},connection:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/event/v1/connection`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Iv=class extends cv{constructor(){super(...arguments),this.exam={}}},lv=class extends Iv{constructor(){super(...arguments),this.face_detection={}}},dv=class extends lv{constructor(){super(...arguments),this.financial_access_platform={}}},pv=class extends dv{constructor(){super(...arguments),this.grounding={}}},hv=class extends pv{constructor(){super(...arguments),this.gtm_ai={}}},Ev=class extends hv{constructor(){super(...arguments),this.helpdesk={agent:{agentEmail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_emails`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSchedule:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSkill:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSkillRule:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skill_rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},category:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},event:{subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/events/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/events/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},faq:{faqImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id/image/:image_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSchedules:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ticket:{customizedFields:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/customized_fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),ticketImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_images`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),startService:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/start_service`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),answerUserQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/answer_user_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ticketCustomizedField:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},notification:{cancelApprove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_approve`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancelSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),executeSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/execute_send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/preview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),submitApprove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/submit_approve`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ticketMessage:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},botMessage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{agent:{agentEmail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_emails`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSchedule:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSkill:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSkillRule:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skill_rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},category:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},event:{subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/events/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/events/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},faq:{faqImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id/image/:image_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSchedules:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ticket:{customizedFields:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/customized_fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),ticketImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_images`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),startService:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/start_service`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),answerUserQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/answer_user_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ticketCustomizedField:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},notification:{cancelApprove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_approve`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancelSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),executeSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/execute_send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/preview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),submitApprove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/submit_approve`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ticketMessage:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},botMessage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},uv=class extends Ev{constructor(){super(...arguments),this.hire={websiteChannel:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRoundType:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_round_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerCustomField:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_custom_fields/:offer_custom_field_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteDelivery:{createByAttachment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_attachment`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),createByResume:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_resume`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRecordAttachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records/attachments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talent:{batchGetId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/batch_get_id`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),onboardStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/onboard_status`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addToFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/add_to_folder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),tag:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeToFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/remove_to_folder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/combined_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/combined_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalInterviewAssessment:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interview_assessments/:external_interview_assessment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interview_assessments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},referralWebsiteJobPost:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts/:job_post_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},job:{config:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/config`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),close:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/close`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateConfig:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/update_config`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),open:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/open`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recruiter:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/recruiter`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/combined_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/combined_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/get_detail`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},location:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/locations/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalReferralReward:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_referral_rewards`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_referral_rewards/:external_referral_reward_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},note:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerApprovalTemplate:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_approval_templates`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},website:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},examMarkingTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},referral:{getByApplication:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referrals/get_by_application`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referrals/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},exam:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/exams`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobRequirementSchema:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirement_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoAccountCustomField:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentExternalInfo:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},questionnaire:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/questionnaires`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoExamPaper:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exam_papers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offer:{internOfferStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id/intern_offer_status`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),offerStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id/offer_status`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoBackgroundCheck:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_checks/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateResult:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_result`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateProgress:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_progress`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agency:{protect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/protect`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/:agency_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),protectSearch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/protection_period/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),operateAgencyAccount:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/operate_agency_account`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getAgencyAccount:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/get_agency_account`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentPool:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchChangeTalentPool:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/batch_change_talent_pool`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),moveTalent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/talent_relationship`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},diversityInclusion:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/diversity_inclusions/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoExam:{loginInfo:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/login_info`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateResult:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/update_result`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},terminationReason:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobManager:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/:manager_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobPublishRecord:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_publish_records/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteJobPost:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/:job_post_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobType:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalApplication:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoBackgroundCheckCustomField:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},application:{transferStage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_stage`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recover:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/recover`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),terminate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/terminate`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),transferOnboard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_onboard`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),offer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/offer`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancelOnboard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/cancel_onboard`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/get_detail`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},registrationSchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},role:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/roles/:role_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRecord:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records/:interview_record_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewer:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviewers/:interviewer_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentFolder:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interview:{getByTalent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviews/get_by_talent`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviews`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},referralAccount:{enable:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/enable`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),withdraw:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/withdraw`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deactivate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/deactivate`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reconciliation:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/reconciliation`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getAccountAssets:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/get_account_assets`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ehrImportTask:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/ehr_import_tasks/:ehr_import_task_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteDeliveryTask:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/delivery_tasks/:delivery_task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentObject:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_objects/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobSchema:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobFunction:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},advertisement:{publish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/advertisements/:advertisement_id/publish`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerSchema:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_schemas/:offer_schema_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id/preview`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/attachments`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},applicationInterview:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/interviews`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteSiteUser:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/site_users`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tripartiteAgreement:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoBackgroundCheckPackage:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_packages`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},resumeSource:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerApplicationForm:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_application_forms`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_application_forms/:offer_application_form_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentTag:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentOperationLog:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_operation_logs/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userRole:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalInterview:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalBackgroundCheck:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},todo:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalOffer:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentBlocklist:{changeTalentBlock:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_blocklist/change_talent_block`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},portalApplySchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRegistrationSchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobRequirement:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listById:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},backgroundCheckOrder:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/background_check_orders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employee:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getByApplication:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/employees/get_by_application`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},subject:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/subjects`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewFeedbackForm:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},evaluationTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},evaluation:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobProcess:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_processes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},minutes:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/minutes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},test:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{websiteChannel:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRoundType:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_round_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerCustomField:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_custom_fields/:offer_custom_field_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteDelivery:{createByAttachment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_attachment`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),createByResume:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_resume`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRecordAttachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records/attachments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talent:{batchGetId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/batch_get_id`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),onboardStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/onboard_status`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addToFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/add_to_folder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),tag:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeToFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/remove_to_folder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/combined_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/combined_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalInterviewAssessment:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interview_assessments/:external_interview_assessment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interview_assessments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},referralWebsiteJobPost:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts/:job_post_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},job:{config:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/config`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),close:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/close`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateConfig:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/update_config`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),open:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/open`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recruiter:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/recruiter`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/combined_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/combined_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/get_detail`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},location:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/locations/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalReferralReward:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_referral_rewards`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_referral_rewards/:external_referral_reward_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},note:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerApprovalTemplate:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_approval_templates`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},website:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},examMarkingTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},referral:{getByApplication:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referrals/get_by_application`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referrals/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},exam:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/exams`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobRequirementSchema:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirement_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoAccountCustomField:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentExternalInfo:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},questionnaire:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/questionnaires`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoExamPaper:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exam_papers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offer:{internOfferStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id/intern_offer_status`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),offerStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id/offer_status`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoBackgroundCheck:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_checks/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateResult:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_result`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateProgress:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_progress`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agency:{protect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/protect`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/:agency_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),protectSearch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/protection_period/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),operateAgencyAccount:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/operate_agency_account`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getAgencyAccount:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/get_agency_account`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentPool:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchChangeTalentPool:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/batch_change_talent_pool`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),moveTalent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/talent_relationship`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},diversityInclusion:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/diversity_inclusions/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoExam:{loginInfo:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/login_info`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateResult:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/update_result`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},terminationReason:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobManager:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/:manager_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobPublishRecord:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_publish_records/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteJobPost:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/:job_post_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobType:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalApplication:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoBackgroundCheckCustomField:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},application:{transferStage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_stage`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recover:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/recover`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),terminate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/terminate`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),transferOnboard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_onboard`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),offer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/offer`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancelOnboard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/cancel_onboard`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/get_detail`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},registrationSchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},role:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/roles/:role_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRecord:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records/:interview_record_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewer:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviewers/:interviewer_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentFolder:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interview:{getByTalent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviews/get_by_talent`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviews`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},referralAccount:{enable:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/enable`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),withdraw:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/withdraw`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deactivate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/deactivate`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reconciliation:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/reconciliation`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getAccountAssets:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/get_account_assets`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ehrImportTask:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/ehr_import_tasks/:ehr_import_task_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteDeliveryTask:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/delivery_tasks/:delivery_task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentObject:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_objects/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobSchema:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobFunction:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},advertisement:{publish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/advertisements/:advertisement_id/publish`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerSchema:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_schemas/:offer_schema_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id/preview`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/attachments`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},applicationInterview:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/interviews`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteSiteUser:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/site_users`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tripartiteAgreement:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoBackgroundCheckPackage:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_packages`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},resumeSource:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerApplicationForm:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_application_forms`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_application_forms/:offer_application_form_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentTag:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentOperationLog:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_operation_logs/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userRole:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalInterview:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalBackgroundCheck:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},todo:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalOffer:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentBlocklist:{changeTalentBlock:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_blocklist/change_talent_block`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},portalApplySchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRegistrationSchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobRequirement:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listById:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},backgroundCheckOrder:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/background_check_orders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employee:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getByApplication:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/employees/get_by_application`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},subject:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/subjects`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewFeedbackForm:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},evaluationTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},evaluation:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobProcess:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_processes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},minutes:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/minutes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},test:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{talent:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v2/talents/:talent_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v2/interview_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v2/interview_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v2/interview_records/:interview_record_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Cv=class extends uv{constructor(){super(...arguments),this.human_authentication={identity:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/human_authentication/v1/identities`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{identity:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/human_authentication/v1/identities`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Bv=class extends Cv{constructor(){super(...arguments),this.im={message:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),pushFollowUp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/push_follow_up`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),urgentApp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_app`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),urgentPhone:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_phone`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),urgentSms:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_sms`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mergeForward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/merge_forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),readUsers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/read_users`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),replyByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=i,g=Y(i,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:c,params:e,headers:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(C(I)),I})}),createByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=i,g=Y(i,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:c,params:e,headers:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(C(I)),I})}),updateByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=i,g=Y(i,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:c,params:e,headers:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(C(I)),I})})},batchMessage:{readUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/read_user`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getProgress:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/get_progress`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatMembers:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),isInChat:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/is_in_chat`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),meJoin:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/me_join`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},pin:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins/:message_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chat:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),link:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/link`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatModeration:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatTab:{listTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/list_tabs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sortTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/sort_tabs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deleteTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/delete_tabs`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/update_tabs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatTopNotice:{deleteTopNotice:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/delete_top_notice`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),putTopNotice:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/put_top_notice`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncement:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatMenuTree:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sort:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree/sort`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatManagers:{deleteManagers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/delete_managers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addManagers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/add_managers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatMenuItem:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_items/:menu_item_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},image:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/images/:image_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/images`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},messageReaction:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions/:reaction_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/reactions/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},file:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/files/:file_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/files`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},messageResource:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/resources/:file_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},thread:{forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/threads/:thread_id/forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{message:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),pushFollowUp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/push_follow_up`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),urgentApp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_app`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),urgentPhone:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_phone`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),urgentSms:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_sms`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mergeForward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/merge_forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),readUsers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/read_users`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),replyByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=i,g=Y(i,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:c,params:e,headers:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(C(I)),I})}),createByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=i,g=Y(i,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:c,params:e,headers:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(C(I)),I})}),updateByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=i,g=Y(i,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:c,params:e,headers:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(C(I)),I})})},batchMessage:{readUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/read_user`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getProgress:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/get_progress`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatMembers:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),isInChat:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/is_in_chat`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),meJoin:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/me_join`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},pin:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins/:message_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chat:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),link:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/link`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatModeration:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatTab:{listTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/list_tabs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sortTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/sort_tabs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deleteTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/delete_tabs`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/update_tabs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatTopNotice:{deleteTopNotice:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/delete_top_notice`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),putTopNotice:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/put_top_notice`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncement:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatMenuTree:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sort:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree/sort`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatManagers:{deleteManagers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/delete_managers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addManagers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/add_managers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatMenuItem:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_items/:menu_item_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},image:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/images/:image_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/images`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},messageReaction:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions/:reaction_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/reactions/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},file:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/files/:file_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/files`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},messageResource:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/resources/:file_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},thread:{forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/threads/:thread_id/forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{bizEntityTagRelation:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},urlPreview:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/url_previews/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appFeedCardBatch:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/app_feed_card/batch`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/app_feed_card/batch`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},feedCard:{botTimeSentive:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/feed_cards/bot_time_sentive`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/feed_cards/:feed_card_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tag:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/tags`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/tags/:tag_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatButton:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/chat_button`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appFeedCard:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/app_feed_card`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chat:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/chats/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/chats/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},fv=class extends Bv{constructor(){super(...arguments),this.inline_platform={}}},Qv=class extends fv{constructor(){super(...arguments),this.laps={}}},yv=class extends Qv{constructor(){super(...arguments),this.lingo={v1:{file:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/files/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/files/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},entity:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities/match`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),highlight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities/highlight`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},repo:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/repos`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},classification:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/classifications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/classifications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},draft:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/drafts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/drafts/:draft_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},mv=class extends yv{constructor(){super(...arguments),this.llpp={}}},Sv=class extends mv{constructor(){super(...arguments),this.mail={mailgroupMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroupPermissionMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroup:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},publicMailboxMember:{clear:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/clear`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroupAlias:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases/:alias_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},publicMailboxAlias:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailbox:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),accessibleMailboxes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/accessible_mailboxes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),profile:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/profile`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxAlias:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroupManager:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},publicMailbox:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeToRecycleBin:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/remove_to_recycle_bin`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},user:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/users/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxMessage:{getByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/get_by_card`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),send:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchModify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sendStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/send_status`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/modify`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchTrash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),trash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listThreadMessage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxThread:{batchModify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchTrash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),trash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxEvent:{unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscription`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxMailContact:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxLabel:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxDraft:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancelScheduledSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/cancel_scheduled_send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),send:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id/send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxRule:{reorder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/reorder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxSetting:{sendAs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/send_as`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getSignatures:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/signatures`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxSentMessage:{getRecallDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recall:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxTemplate:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxTemplateAttachment:{downloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id/attachments/download_url`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},multiEntity:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/multi_entity/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxFolder:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxMessageAttachment:{downloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/attachments/download_url`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{mailgroupMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroupPermissionMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroup:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},publicMailboxMember:{clear:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/clear`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroupAlias:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases/:alias_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},publicMailboxAlias:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailbox:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),accessibleMailboxes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/accessible_mailboxes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),profile:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/profile`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxAlias:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroupManager:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},publicMailbox:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeToRecycleBin:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/remove_to_recycle_bin`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},user:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/users/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxMessage:{getByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/get_by_card`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),send:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchModify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sendStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/send_status`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/modify`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchTrash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),trash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listThreadMessage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxThread:{batchModify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchTrash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),trash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxEvent:{unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscription`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxMailContact:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxLabel:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxDraft:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancelScheduledSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/cancel_scheduled_send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),send:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id/send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxRule:{reorder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/reorder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxSetting:{sendAs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/send_as`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getSignatures:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/signatures`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxSentMessage:{getRecallDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recall:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxTemplate:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxTemplateAttachment:{downloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id/attachments/download_url`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},multiEntity:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/multi_entity/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxFolder:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxMessageAttachment:{downloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/attachments/download_url`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},wv=class extends Sv{constructor(){super(...arguments),this.mcp={}}},Dv=class extends wv{constructor(){super(...arguments),this.mdm={userAuthDataRelation:{unbind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/unbind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),bind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/bind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{userAuthDataRelation:{unbind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/unbind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),bind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/bind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v3:{countryRegion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mdm/v3/country_regions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},batchCountryRegion:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mdm/v3/batch_country_region`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Ov=class extends Dv{constructor(){super(...arguments),this.meeting_room={}}},bv=class extends Ov{constructor(){super(...arguments),this.mindnote={}}},Mv=class extends bv{constructor(){super(...arguments),this.minutes={v1:{minuteTranscript:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/transcript`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},minuteStatistics:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/statistics`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},minuteMedia:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/media`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},minute:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),artifacts:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/artifacts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},_v=class extends Mv{constructor(){super(...arguments),this.moments={post:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/moments/v1/posts/:post_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{post:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/moments/v1/posts/:post_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Tv=class extends _v{constructor(){super(...arguments),this.myai_ai_extension={}}},Nv=class extends Tv{constructor(){super(...arguments),this.myai_assistant={}}},Rv=class extends Nv{constructor(){super(...arguments),this.myai_base_ai={}}},kv=class extends Rv{constructor(){super(...arguments),this.myai_ccm_extension={}}},vv=class extends kv{constructor(){super(...arguments),this.myai_data={}}},Pv=class extends vv{constructor(){super(...arguments),this.myai_im_extension={}}},Gv=class extends Pv{constructor(){super(...arguments),this.myai_mail={}}},Fv=class extends Gv{constructor(){super(...arguments),this.myai_memory_reflection={}}},Lv=class extends Fv{constructor(){super(...arguments),this.myai_scenario_summary={}}},Uv=class extends Lv{constructor(){super(...arguments),this.myai_slides={}}},Hv=class extends Uv{constructor(){super(...arguments),this.myai_url_extension={}}},Kv=class extends Hv{constructor(){super(...arguments),this.myai={}}},xv=class extends Kv{constructor(){super(...arguments),this.okr={review:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/reviews/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},periodRule:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/period_rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},progressRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},period:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/periods`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/periods`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/periods/:period_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okr:{batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/okrs/batch_get`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userOkr:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/users/:user_id/okrs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},image:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/images/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},v1:{review:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/reviews/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},periodRule:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/period_rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},progressRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},period:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/periods`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/periods`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/periods/:period_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okr:{batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/okrs/batch_get`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userOkr:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/users/:user_id/okrs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},image:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/images/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})}},v2:{okrAlignment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/alignments/:alignment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/alignments/:alignment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrObjective:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),keyResultsPosition:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results_position`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),keyResultsWeight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results_weight`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrKeyResult:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrObjectiveAlignment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/alignments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/alignments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/alignments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrCategory:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/categories`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/categories`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrCycle:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/cycles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/cycles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),objectivesWeight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives_weight`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),objectivesPosition:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives_position`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrObjectiveKeyResult:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrKeyResultIndicator:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id/indicators`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrObjectiveIndicator:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/indicators`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrCycleObjective:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrIndicator:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/indicators/:indicator_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrObjectiveProgress:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/progresses`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/progresses`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrKeyResultProgress:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id/progresses`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id/progresses`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Yv=class extends xv{constructor(){super(...arguments),this.optical_char_recognition={image:{basicRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/optical_char_recognition/v1/image/basic_recognize`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{image:{basicRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/optical_char_recognition/v1/image/basic_recognize`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},jv=class extends Yv{constructor(){super(...arguments),this.partner_ai={}}},Jv=class extends jv{constructor(){super(...arguments),this.passport={session:{logout:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/passport/v1/sessions/logout`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/passport/v1/sessions/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},password:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/passport/v1/password`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{session:{logout:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/passport/v1/sessions/logout`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/passport/v1/sessions/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},password:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/passport/v1/password`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},qv=class extends Jv{constructor(){super(...arguments),this.payroll={v1:{datasourceRecord:{save:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/datasource_records/save`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/datasource_records/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/datasource_records/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},paymentDetail:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/payment_detail/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},paymentActivity:{archive:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/payment_activitys/archive`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/payment_activitys`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/payment_activitys`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},costAllocationPlan:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/cost_allocation_plans`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/cost_allocation_plans`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},paymentActivityDetail:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/payment_activity_details`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},datasource:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/datasources`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/datasources`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},costAllocationDetail:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},costAllocationReport:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/cost_allocation_reports`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/cost_allocation_reports`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},paygroup:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/paygroups`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/paygroups`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},acctItem:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/acct_items`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/acct_items`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},zv=class extends qv{constructor(){super(...arguments),this.people_admin={}}},Vv=class extends zv{constructor(){super(...arguments),this.people_ai={}}},Wv=class extends Vv{constructor(){super(...arguments),this.people_bytedance={}}},Zv=class extends Wv{constructor(){super(...arguments),this.performance={v1:{reviewData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v1/review_datas/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},stageTask:{findByUserList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v1/stage_tasks/find_by_user_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),findByPage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v1/stage_tasks/find_by_page`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},semester:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v1/semesters`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{reviewee:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/reviewees/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},additionalInformationsBatch:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/additional_informations/batch`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},metricDetail:{import:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/metric_details/import`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/metric_details/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},question:{queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/questions/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/questions/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},indicator:{queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/indicators/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/indicators/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},activity:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/activity/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},metricTag:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/metric_tags`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/metric_tags`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},metricField:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/metric_fields/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},metricLib:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/metric_libs/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reviewData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/review_datas/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},metricTemplate:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/metric_templates/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userInfo:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/user_info/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reviewTemplate:{queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/review_templates/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/review_templates/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userGroupUserRel:{write:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/user_group_user_rels/write`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},additionalInformation:{import:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/additional_informations/import`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/additional_informations/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/additional_informations/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Xv=class extends Zv{constructor(){super(...arguments),this.personal_settings={systemStatus:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchClose:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_close`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchOpen:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_open`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{systemStatus:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchClose:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_close`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchOpen:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_open`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},$v=class extends Xv{constructor(){super(...arguments),this.profile={}}},eP=class extends $v{constructor(){super(...arguments),this.report={rule:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/report/v1/rules/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ruleView:{remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/report/v1/rules/:rule_id/views/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},task:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/report/v1/tasks/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{rule:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/report/v1/rules/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ruleView:{remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/report/v1/rules/:rule_id/views/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},task:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/report/v1/tasks/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},AP=class extends eP{constructor(){super(...arguments),this.rule_engine={}}},tP=class extends AP{constructor(){super(...arguments),this.saasbi={}}},rP=class extends tP{constructor(){super(...arguments),this.scim={}}},iP=class extends rP{constructor(){super(...arguments),this.search_in_app={}}},aP=class extends iP{constructor(){super(...arguments),this.search={dataSource:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},message:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},schema:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},dataSourceItem:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},app:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/app`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},docWiki:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v2:{dataSource:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},message:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},schema:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},dataSourceItem:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},app:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/app`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},docWiki:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},oP=class extends aP{constructor(){super(...arguments),this.security_and_compliance={openapiLog:{listData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/openapi_logs/list_data`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMigration:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/:user_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},multiGeoEntityTenant:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/multi_geo_entity/tenant`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{openapiLog:{listData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/openapi_logs/list_data`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMigration:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/:user_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},multiGeoEntityTenant:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/multi_geo_entity/tenant`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{deviceApplyRecord:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_apply_records/:device_apply_record_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},deviceRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mine:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_records/mine`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},nP=class extends oP{constructor(){super(...arguments),this.security_plugin={}}},sP=class extends nP{constructor(){super(...arguments),this.sheet_ai={}}},gP=class extends sP{constructor(){super(...arguments),this.sheets={spreadsheet:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheet:{replace:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/replace`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),moveDimension:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/move_dimension`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),find:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/find`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFilter:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFilterView:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFilterViewCondition:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFloatImage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v3:{spreadsheet:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheet:{replace:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/replace`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),moveDimension:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/move_dimension`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),find:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/find`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFilter:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFilterView:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFilterViewCondition:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFloatImage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},cP=class extends gP{constructor(){super(...arguments),this.slides_ai={}}},IP=class extends cP{constructor(){super(...arguments),this.slides={}}},lP=class extends IP{constructor(){super(...arguments),this.spark={v1:{appTable:{deleteTableRecords:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),postTableRecords:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patchTableRecords:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdateTableRecords:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records_batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getTableDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getTableList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getTableRecordList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appEnum:{getEnumDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/enums/:enum_name`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getEnumList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/enums`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appView:{getViewRecordList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/views/:view_name/records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appStorage:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage`,A),method:"GET",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),uploadInitialize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload/initialize`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload/part`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),uploadComplete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload/complete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},app:{icon:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/icon`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),uploadHtmlCodeAndRelease:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/upload_and_release_html_code`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),getAppVisibility:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/access-scope`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateAppVisibility:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/access-scope`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sqlCommands:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/sql_commands`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},directoryUser:{idConvert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/directory/user/id_convert`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},dP=class extends lP{constructor(){super(...arguments),this.speech_to_text={speech:{fileRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/speech_to_text/v1/speech/file_recognize`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),streamRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/speech_to_text/v1/speech/stream_recognize`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{speech:{fileRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/speech_to_text/v1/speech/file_recognize`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),streamRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/speech_to_text/v1/speech/stream_recognize`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},pP=class extends dP{constructor(){super(...arguments),this.subscriptions={}}},hP=class extends pP{constructor(){super(...arguments),this.task={task:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDeleteFollower:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_follower`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDeleteCollaborator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_collaborator`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uncomplete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/uncomplete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),complete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/complete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskComment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskCollaborator:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators/:collaborator_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskFollower:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers/:follower_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskReminder:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders/:reminder_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{task:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDeleteFollower:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_follower`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDeleteCollaborator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_collaborator`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uncomplete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/uncomplete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),complete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/complete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskComment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskCollaborator:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators/:collaborator_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskFollower:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers/:follower_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskReminder:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders/:reminder_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{task:{tasklists:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/tasklists`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addDependencies:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_dependencies`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeDependencies:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_dependencies`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setAncestorTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/set_ancestor_task`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addMembers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addReminders:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_reminders`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeMembers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeReminders:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_reminders`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeTasklist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_tasklist`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addTasklist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_tasklist`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},comment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/comments/:comment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/comments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/comments/:comment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/comments/:comment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/comments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},section:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections/:section_guid`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),tasksWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections/:section_guid/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),tasks:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections/:section_guid/tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections/:section_guid`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections/:section_guid`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tasklist:{tasks:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addMembers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/add_members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeMembers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/remove_members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customField:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),add:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/add`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tasklistActivitySubscription:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/attachments/:attachment_guid`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/attachments/:attachment_guid`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/attachments/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/attachments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/attachments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customFieldOption:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/options/:option_guid`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/options`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskV2:{taskSubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/task_v2/task_subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listRelatedTaskWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/task_v2/list_related_task`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),listRelatedTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/task_v2/list_related_task`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskSubtask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},EP=class extends hP{constructor(){super(...arguments),this.tenant={tenant:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/tenant/v2/tenant/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tenantProductAssignInfo:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/tenant/v2/tenant/assign_info_list/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v2:{tenant:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/tenant/v2/tenant/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tenantProductAssignInfo:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/tenant/v2/tenant/assign_info_list/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},uP=class extends EP{constructor(){super(...arguments),this.translation={text:{translate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/translation/v1/text/translate`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),detect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/translation/v1/text/detect`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{text:{translate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/translation/v1/text/translate`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),detect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/translation/v1/text/detect`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},CP=class extends uP{constructor(){super(...arguments),this.trust_layer={}}},BP=class extends CP{constructor(){super(...arguments),this.trust_party={v1:{collaborationTenantCollaborationUser:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key/collaboration_users/:target_user_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},collaborationTenantCollaborationDepartment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key/collaboration_departments/:target_department_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},collaborationTenant:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),visibleOrganization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key/visible_organization`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},fP=class extends BP{constructor(){super(...arguments),this.unified_kms_log={}}},QP=class extends fP{constructor(){super(...arguments),this.unified_kms={}}},yP=class extends QP{constructor(){super(...arguments),this.vault={}}},mP=class extends yP{constructor(){super(...arguments),this.vc={material:{uploadMeta:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/materials/upload_meta`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/materials/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),pullMeta:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/materials/pull_meta`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meetingRecording:{start:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/start`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),stop:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/stop`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setPermission:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/set_permission`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},roomConfig:{del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/del`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setCheckboardAccessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/set_checkboard_access_code`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setRoomAccessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/set_room_access_code`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),set:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/set`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserve:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),apply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/apply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getActiveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id/get_active_meeting`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiVcMeeting:{getCommonReply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_common_reply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),doOperation:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/do_operation`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getTodoTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_todo_task`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),seedAiPullData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/seed_ai_pull_data`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),docBasedSuggestQuestion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/doc_based_suggest_question`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),callback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/callback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sectionSummary:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/section_summary`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getRecap:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_recap`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchStepSummaryStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_step_summary_stream`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchSectionSummaryStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_section_summary_stream`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchRecapStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_recap_stream`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meeting:{end:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/end`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),kickout:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/kickout`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setHost:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/set_host`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),invite:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/invite`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),changeName:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/change_name`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listByNoWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),listByNo:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiRoom:{joinOfflineMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/join_offline_meeting`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reserveInstantEvent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/reserve_instant_event`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),helpSceneType:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/help_scene_type`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),joinMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),checkInSchedule:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/check_in_schedule`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),exit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/exit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),autoReleaseEvent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_release_event`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),autoWelcome:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_welcome`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),roomCalling:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/room_calling`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),joinMeetingNumber:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting_number`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leaveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/leave_meeting`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiMm:{mediaParse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_parse`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),extensionBoarding:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/extension_boarding`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),querySuggestContext:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/query_suggest_context`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mediaBind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_bind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiSip:{createEventCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_sip/create_event_card`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},alert:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiVc:{cardCallback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/card_callback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),startAnalysis:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/start_analysis`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchMeetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setMeetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/set_meeting_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),meetingAnalyze:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/meeting_analyze`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchMeetingAnalyze:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_analyze`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},report:{getDaily:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reports/get_daily`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getTopUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reports/get_top_user`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},room:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},resourceReservationList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},participantQualityList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},roomLevel:{mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/search`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/del`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},scopeConfig:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),accessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/scope_config/access_code`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfigForm:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfigAdmin:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfigDisableInform:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfig:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reserveScope:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/reserve_scope`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},export:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/:task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),resourceReservationList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/resource_reservation_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),participantQualityList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/participant_quality_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),participantList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/participant_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),meetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/meeting_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meetingList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},participantList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meetingPullSubtitle:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},note:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unifiedNoteTranscriptWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),unifiedNoteTranscript:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/:note_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},recording:{unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/recordings/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/recordings/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},bot:{realtimeEndpoint:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/realtime/endpoint`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leave:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/leave`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),message:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),userActiveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/user_active_meeting`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),join:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/join`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),eventsWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),events:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{material:{uploadMeta:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/materials/upload_meta`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/materials/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),pullMeta:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/materials/pull_meta`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meetingRecording:{start:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/start`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),stop:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/stop`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setPermission:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/set_permission`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},roomConfig:{del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/del`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setCheckboardAccessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/set_checkboard_access_code`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setRoomAccessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/set_room_access_code`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),set:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/set`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserve:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),apply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/apply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getActiveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id/get_active_meeting`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiVcMeeting:{getCommonReply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_common_reply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),doOperation:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/do_operation`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getTodoTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_todo_task`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),seedAiPullData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/seed_ai_pull_data`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),docBasedSuggestQuestion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/doc_based_suggest_question`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),callback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/callback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sectionSummary:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/section_summary`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getRecap:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_recap`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchStepSummaryStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_step_summary_stream`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchSectionSummaryStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_section_summary_stream`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchRecapStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_recap_stream`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meeting:{end:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/end`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),kickout:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/kickout`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setHost:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/set_host`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),invite:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/invite`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),changeName:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/change_name`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listByNoWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),listByNo:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiRoom:{joinOfflineMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/join_offline_meeting`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reserveInstantEvent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/reserve_instant_event`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),helpSceneType:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/help_scene_type`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),joinMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),checkInSchedule:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/check_in_schedule`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),exit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/exit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),autoReleaseEvent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_release_event`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),autoWelcome:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_welcome`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),roomCalling:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/room_calling`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),joinMeetingNumber:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting_number`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leaveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/leave_meeting`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiMm:{mediaParse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_parse`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),extensionBoarding:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/extension_boarding`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),querySuggestContext:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/query_suggest_context`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mediaBind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_bind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiSip:{createEventCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_sip/create_event_card`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},alert:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiVc:{cardCallback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/card_callback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),startAnalysis:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/start_analysis`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchMeetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setMeetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/set_meeting_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),meetingAnalyze:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/meeting_analyze`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchMeetingAnalyze:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_analyze`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},report:{getDaily:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reports/get_daily`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getTopUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reports/get_top_user`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},room:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},resourceReservationList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},participantQualityList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},roomLevel:{mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/search`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/del`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},scopeConfig:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),accessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/scope_config/access_code`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfigForm:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfigAdmin:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfigDisableInform:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfig:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reserveScope:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/reserve_scope`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},export:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/:task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=it.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),resourceReservationList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/resource_reservation_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),participantQualityList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/participant_quality_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),participantList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/participant_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),meetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/meeting_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meetingList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},participantList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meetingPullSubtitle:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},note:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unifiedNoteTranscriptWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),unifiedNoteTranscript:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/:note_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},recording:{unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/recordings/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/recordings/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},bot:{realtimeEndpoint:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/realtime/endpoint`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leave:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/leave`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),message:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),userActiveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/user_active_meeting`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),join:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/join`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),eventsWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),events:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},SP=class extends mP{constructor(){super(...arguments),this.verification={v1:{verification:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/verification/v1/verification`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},wP=class extends SP{constructor(){super(...arguments),this.wiki={spaceSetting:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/setting`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spaceNode:{updateTitle:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/update_title`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),moveDocsToWiki:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/move_docs_to_wiki`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),move:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/move`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spaceMember:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},space:{getNode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/get_node`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},task:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/tasks/:task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{node:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v1/nodes/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v1/nodes/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{spaceSetting:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/setting`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spaceNode:{updateTitle:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/update_title`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),moveDocsToWiki:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/move_docs_to_wiki`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),move:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/move`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spaceMember:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},space:{getNode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/get_node`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},task:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/tasks/:task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},DP=class extends wP{constructor(){super(...arguments),this.workplace={workplaceAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/workplace/v1/workplace_access_data/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workplaceBlockAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/workplace/v1/workplace_block_access_data/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customWorkplaceAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/workplace/v1/custom_workplace_access_data/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{workplaceAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/workplace/v1/workplace_access_data/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workplaceBlockAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/workplace/v1/workplace_block_access_data/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customWorkplaceAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/workplace/v1/custom_workplace_access_data/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},xg={error:(...n)=>{console.log("[error]:",...n)},warn:(...n)=>{console.warn("[warn]:",...n)},info:(...n)=>{console.info("[info]:",...n)},debug:(...n)=>{console.debug("[debug]:",...n)},trace:(...n)=>{console.trace("[trace]:",...n)}},Wc=class{constructor(t,o){this.level=t,this.logger=o}error(...t){this.level>=Bo.error&&this.logger.error(t)}warn(...t){this.level>=Bo.warn&&this.logger.warn(t)}info(...t){this.level>=Bo.info&&this.logger.info(t)}debug(...t){this.level>=Bo.debug&&this.logger.debug(t)}trace(...t){this.level>=Bo.trace&&this.logger.trace(t)}},OP=class{constructor(t){this.appId=t.appId,this.appSecret=t.appSecret,this.cache=t.cache,this.domain=t.domain,this.logger=t.logger,this.appType=t.appType,this.httpInstance=t.httpInstance,this.logger.debug("app ticket manager is ready"),this.checkAppTicket()}checkAppTicket(){var t;return h(this,void 0,void 0,function*(){this.appType===Rs.ISV&&((yield(t=this.cache)===null||t===void 0?void 0:t.get(xC,{namespace:this.appId}))||this.requestAppTicket())})}requestAppTicket(){return h(this,void 0,void 0,function*(){this.logger.debug("request app ticket"),yield this.httpInstance.post(`${this.domain}/open-apis/auth/v3/app_ticket/resend`,{app_id:this.appId,app_secret:this.appSecret}).catch(t=>{this.logger.error(t)})})}getAppTicket(){var t;return h(this,void 0,void 0,function*(){let o=yield(t=this.cache)===null||t===void 0?void 0:t.get(xC,{namespace:this.appId});if(o)return this.logger.debug("use cache app ticket"),o;yield this.requestAppTicket()})}},bS="/oauth/v3/token",Qke="urn:ietf:params:oauth:grant-type:jwt-bearer",B5="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",yke="authorization_code",mke="refresh_token",WP="X-Target-Service",f5=7100,ZP=7101,Q5=7102,XP=7104,Ske=Object.freeze({"open.feishu.cn":"https://accounts.feishu.cn","open.larksuite.com":"https://accounts.larksuite.com"}),ca=class extends Error{constructor(t,o){super(o),this.name="ClientAssertionError",this.code=t,this.msg=o}},sh=class extends Error{constructor(t,o,a,e){super(e||a||"access token request failed"),this.name="AccessTokenError",this.statusCode=t,this.code=o,this.error=a,this.errorDescription=e}},$P=n=>n.includes("://")?n:`https://${n}`;function eG(n){let t=new URL($P(n));if(!t.host)throw new Error(`invalid url: ${n}`);return t.host}function AG(n){if(n.oauthBaseUrl)return $P(n.oauthBaseUrl).replace(/\/+$/,"");let t=eG(n.domain),o=Ske[t];if(o)return o;throw new Error("oauthBaseUrl is not configured. When domain is a non-default value (neither open.feishu.cn nor open.larksuite.com), set oauthBaseUrl explicitly.")}function y5(n){return eG(AG(n))}function tG(n,t){let o=new URL($P(n.targetService));if(o.protocol!=="https:")throw new Error("targetService must use https");if(o.username||o.password)throw new Error("targetService must not contain userinfo");let e=`${n.targetPrefix||""}${t}`.replace(/\/{2,}/g,"/");if(/(^|\/)\.\.(\/|$)/.test(e))throw new Error("targetPrefix must not contain path traversal");return`${o.protocol}//${o.host}${e}`}function wke(n,t){var o,a;let e=(o=t?.code)!==null&&o!==void 0?o:"unknown",i=(a=t?.msg)!==null&&a!==void 0?a:"no message";return`failed to get ${n}, code: ${e}, msg: ${i}`}var bP=class{constructor(t){this.appId=t.appId,this.appSecret=t.appSecret,this.cache=t.cache,this.domain=t.domain,this.logger=t.logger,this.appType=t.appType,this.httpInstance=t.httpInstance,this.clientAssertionProvider=t.clientAssertionProvider,this.oauthBaseUrl=t.oauthBaseUrl,this.appTicketManager=new OP({appId:this.appId,appSecret:this.appSecret,cache:this.cache,domain:this.domain,logger:this.logger,appType:this.appType,httpInstance:this.httpInstance}),this.logger.debug("token manager is ready")}requestToken(t,o,a){return h(this,void 0,void 0,function*(){let e=yield this.httpInstance.post(t,o).catch(i=>{throw this.logger.error(i),i});if(!e||!e[a])throw new Error(wke(a,e));return e})}getCustomTenantAccessToken(){var t,o;return h(this,void 0,void 0,function*(){if(this.clientAssertionProvider)return this.getTenantTokenByClientAssertion();let a=yield(t=this.cache)===null||t===void 0?void 0:t.get(FC,{namespace:this.appId});if(a)return this.logger.debug("use cache token"),a;this.logger.debug("request token");let{tenant_access_token:e,expire:i}=yield this.requestToken(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`,{app_id:this.appId,app_secret:this.appSecret},"tenant_access_token");return yield(o=this.cache)===null||o===void 0?void 0:o.set(FC,e,new Date().getTime()+i*1e3-180*1e3,{namespace:this.appId}),e})}getTenantTokenByClientAssertion(){var t,o,a,e,i,A,r,s;return h(this,void 0,void 0,function*(){let g=AG({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),c=y5({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),I=yield(t=this.cache)===null||t===void 0?void 0:t.get(FC,{namespace:this.appId});if(I)return this.logger.debug("use cache token"),I;let d;try{d=yield this.clientAssertionProvider.retrieveToken(c)}catch(_){throw new ca(Q5,_?.message||"client assertion provider failed")}if(!d||!d.value)throw new ca(ZP,"client assertion token is empty");let B=`${g}${bS}`,f={};d.targetInfo&&(B=tG(d.targetInfo,bS),f[WP]=c),this.logger.debug("request token (client assertion)");let Q;try{Q=yield this.httpInstance.request({method:"post",url:B,headers:f,data:{grant_type:Qke,client_assertion_type:B5,client_assertion:d.value,client_id:this.appId}})}catch(_){throw this.logger.error(_),new ca(((a=(o=_?.response)===null||o===void 0?void 0:o.data)===null||a===void 0?void 0:a.code)||0,((i=(e=_?.response)===null||e===void 0?void 0:e.data)===null||i===void 0?void 0:i.error_description)||((r=(A=_?.response)===null||A===void 0?void 0:A.data)===null||r===void 0?void 0:r.error)||"client assertion token exchange failed")}let y=Q?.access_token;if(!y)throw new ca(Q?.code||0,Q?.error_description||Q?.error||"oauth token response missing access token");let m=Number(Q?.expires_in)||0;return yield(s=this.cache)===null||s===void 0?void 0:s.set(FC,y,new Date().getTime()+Math.max(m-180,0)*1e3,{namespace:this.appId}),y})}getMarketTenantAccessToken(t){var o;return h(this,void 0,void 0,function*(){if(this.clientAssertionProvider)throw new ca(f5,"ClientAssertion mode is not supported for ISV apps");if(!t){this.logger.error("market app request need tenant key");return}let a=yield(o=this.cache)===null||o===void 0?void 0:o.get(`larkMarketAccessToken${t}`,{namespace:this.appId});if(a)return this.logger.debug("use cache token"),a;this.logger.debug("get app ticket");let e=yield this.appTicketManager.getAppTicket();if(!e){this.logger.warn("no app ticket");return}this.logger.debug("get app access token");let{app_access_token:i}=yield this.requestToken(`${this.domain}/open-apis/auth/v3/app_access_token`,{app_id:this.appId,app_secret:this.appSecret,app_ticket:e},"app_access_token");this.logger.debug("get tenant access token");let{tenant_access_token:A,expire:r}=yield this.requestToken(`${this.domain}/open-apis/auth/v3/tenant_access_token`,{app_access_token:i,tenant_key:t},"tenant_access_token");return yield this.cache.set(`larkMarketAccessToken${t}`,A,new Date().getTime()+r*1e3-180*1e3,{namespace:this.appId}),A})}getTenantAccessToken(t){return h(this,void 0,void 0,function*(){return OS(this.appType===Rs.SelfBuild,()=>h(this,void 0,void 0,function*(){this.logger.debug("get custom app token")})),OS(this.appType===Rs.ISV,()=>h(this,void 0,void 0,function*(){this.logger.debug("get market app token ")})),this.appType===Rs.SelfBuild?yield this.getCustomTenantAccessToken():yield this.getMarketTenantAccessToken(t?.[wS])})}},m5=(n,t)=>{let o=Object.assign({},n);for(let[a,e]of Object.entries(t))e!==void 0&&(o[a]=e);return o},MP=class{constructor(t){this.client=t.client}getCacheKey(t,o){return`${o?.namespace||this.client.appId}/${Cke.toString()}/${t}`}calibrateTime(t){return new Date().getTime()+(t||0)*1e3-180*1e3}initWithCode(t,o){return h(this,void 0,void 0,function*(){let a={};for(let[e,i]of Object.entries(t)){let A=yield this.client.authen.oidcAccessToken.create({data:{grant_type:"authorization_code",code:i}});if(A.code!==0){this.client.logger.error("init user access token error",e,A.msg||A.message);continue}if(!A.data){this.client.logger.error("user access code expired",e,i);continue}a[e]={code:i,token:A.data.access_token,refreshToken:A.data.refresh_token,expiredTime:this.calibrateTime(A.data.expires_in)}}return yield this.update(a,{namespace:o?.namespace}),a})}update(t,o){return h(this,void 0,void 0,function*(){for(let[a,e]of Object.entries(t)){let i=this.getCacheKey(a,{namespace:o?.namespace}),A=(yield this.client.cache.get(i))||{},{code:r,token:s,refreshToken:g,expiredTime:c}=e,I=m5(A,{code:r,token:s,refreshToken:g,expiredTime:c});yield this.client.cache.set(i,I,1/0)}})}get(t,o){return h(this,void 0,void 0,function*(){let a=this.getCacheKey(t,{namespace:o?.namespace}),e=yield this.client.cache.get(a);if(!e){this.client.logger.error("user access token needs to be initialized or updated first");return}let{token:i,code:A,refreshToken:r,expiredTime:s}=e;if(i&&s&&s-new Date().getTime()>0)return i;if(r){let g=yield this.client.authen.oidcRefreshAccessToken.create({data:{grant_type:"refresh_token",refresh_token:r}});if(g.code===0&&g.data)return yield this.update({[t]:{token:g.data.access_token,refreshToken:g.data.refresh_token,expiredTime:this.calibrateTime(g.data.expires_in)}}),g.data.access_token;this.client.logger.error("get user access token by refresh token failed.",g.msg);return}if(A){let g=yield this.client.authen.oidcAccessToken.create({data:{grant_type:"authorization_code",code:A}});g.code===0&&g.data?yield this.update({[t]:{token:g.data.access_token,refreshToken:g.data.refresh_token,expiredTime:this.calibrateTime(g.data.expires_in)}}):this.client.logger.error("get user access token by code failed.",g.msg)}})}},oh=n=>n===""||n===0||n===null||n===void 0?void 0:n,Dke=n=>{if(!n||n.error)return!0;let{code:t}=n;return t!==void 0&&t!==0&&t!=="0"&&t!==""},_P=class{constructor(t){this.appId=t.appId,this.appSecret=t.appSecret,this.clientAssertionProvider=t.clientAssertionProvider,this.oauthBaseUrl=t.oauthBaseUrl,this.domain=t.domain,this.httpInstance=t.httpInstance,this.logger=t.logger}retrieveByAuthorizationCode(t){return h(this,void 0,void 0,function*(){return this.doRequest({grant_type:yke,code:t.code,redirect_uri:t.redirectUri,code_verifier:t.codeVerifier,scope:t.scope},t.headers)})}refresh(t){return h(this,void 0,void 0,function*(){return this.doRequest({grant_type:mke,refresh_token:t.refreshToken,scope:t.scope},t.headers)})}doRequest(t,o){return h(this,void 0,void 0,function*(){let a=AG({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),e=y5({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),i={client_id:this.appId};for(let[I,d]of Object.entries(t))d!=null&&(i[I]=d);let A=`${a}${bS}`,r=Object.assign({},o||{});if(this.clientAssertionProvider){let I;try{I=yield this.clientAssertionProvider.retrieveToken(e)}catch(d){throw new ca(Q5,d?.message||"client assertion provider failed")}if(!I||!I.value)throw new ca(ZP,"client assertion token is empty");i.client_assertion_type=B5,i.client_assertion=I.value,I.targetInfo&&(A=tG(I.targetInfo,bS),r[WP]=e)}else if(this.appSecret)i.client_secret=this.appSecret;else throw new ca(XP,"appSecret and clientAssertionProvider cannot both be empty for accessToken APIs");let s=200,g;try{g=yield this.httpInstance.request({method:"post",url:A,headers:r,data:i})}catch(I){if(this.logger.error(I),I?.response)s=I.response.status,g=I.response.data;else throw new sh(0,0,"",I?.message||"oauth token request failed")}if(s!==200||Dke(g))throw new sh(s,g?.code||0,g?.error||"",g?.error_description||g?.msg||"");let c=oh(g?.access_token);if(!c)throw new sh(s,g?.code||0,g?.error||"",g?.error_description||"oauth token response missing access_token");return{accessToken:c,tokenType:oh(g.token_type),expiresIn:oh(g.expires_in),refreshToken:oh(g.refresh_token),refreshTokenExpiresIn:oh(g.refresh_token_expires_in),scope:oh(g.scope)}})}},MS=class extends DP{constructor(t){if(super(),this.appId="",this.appSecret="",this.helpDeskId="",this.helpDeskToken="",this.appType=Rs.SelfBuild,this.logger=new Wc(t.loggerLevel||Bo.info,t.logger||xg),this.appId=t.appId,this.appSecret=t.appSecret||"",this.clientAssertionProvider=t.clientAssertionProvider,this.oauthBaseUrl=t.oauthBaseUrl,this.disableTokenCache=t.disableTokenCache,this.userAgent=VP(t.source,{extraTags:t.extraUaTags}),OS(!this.appId,()=>this.logger.error("appId is needed")),this.helpDeskId=t.helpDeskId,this.helpDeskToken=t.helpDeskToken,this.appType=t?.appType||Rs.SelfBuild,!this.appSecret&&!this.clientAssertionProvider)throw new ca(XP,"appSecret or clientAssertionProvider is required");if(this.clientAssertionProvider&&this.appType===Rs.ISV)throw new ca(f5,"ClientAssertion mode is not supported for ISV apps");this.domain=C5(t.domain||ks.Feishu),this.logger.debug(`use domain url: ${this.domain}`),this.cache=t.cache||jC,this.httpInstance=t.httpInstance||gh,this.tokenManager=new bP({appId:this.appId,appSecret:this.appSecret,cache:this.cache,domain:this.domain,logger:this.logger,appType:this.appType,httpInstance:this.httpInstance,clientAssertionProvider:this.clientAssertionProvider,oauthBaseUrl:this.oauthBaseUrl}),this.userAccessToken=new MP({client:this}),this.accessToken=new _P({appId:this.appId,appSecret:this.appSecret,clientAssertionProvider:this.clientAssertionProvider,oauthBaseUrl:this.oauthBaseUrl,domain:this.domain,httpInstance:this.httpInstance,logger:this.logger}),this.logger.info("client ready")}formatPayload(t,o){var a,e,i;return h(this,void 0,void 0,function*(){let A=["lark","params","data","headers","path"].reduce((g,c)=>(g[c]=o?.[c]||{},g),{}),r=(a=A?.lark)===null||a===void 0?void 0:a[u5];if(r)this.logger.debug("use passed token"),A.headers.Authorization=`Bearer ${r}`;else if(!this.disableTokenCache){let g=yield this.tokenManager.getTenantAccessToken({[wS]:(e=A?.lark)===null||e===void 0?void 0:e[wS]});g?A.headers.Authorization=`Bearer ${g}`:this.logger.warn("failed to obtain token")}if((i=A?.lark)===null||i===void 0?void 0:i[E5]){this.logger.debug("generate help desk credential");let g=Bke(`${this.helpDeskId}:${this.helpDeskToken}`);A.headers["X-Lark-Helpdesk-Authorization"]=`Bearer ${g}`}return{params:Object.assign(Object.assign({},t?.params||{}),A.params),headers:Object.assign(Object.assign({"User-Agent":this.userAgent},t?.headers||{}),A.headers),data:Object.assign(Object.assign({},t?.data||{}),A.data),path:Object.assign(Object.assign({},t?.path||{}),A.path)}})}request(t,o){var a;return h(this,void 0,void 0,function*(){let{data:e,params:i,headers:A,url:r}=t,s=Y(t,["data","params","headers","url"]),g=yield this.formatPayload({data:e,params:i,headers:A},o),c=((a=t.method)===null||a===void 0?void 0:a.toLowerCase())==="get"&&Object.keys(g.data).length===0?void 0:g.data;return this.logger.trace(`send request [${t.method}]: ${t.url}`),yield this.httpInstance.request(Object.assign(Object.assign({},s),{url:/^http/.test(r)?r:`${this.domain}/${fke(r)}`,headers:g.headers,data:c,params:g.params})).catch(d=>{throw this.logger.error(d),d})})}},Oke=n=>n.reduce((t,o)=>(0,p5.default)(t,o),{}),bke=n=>({lark:{[wS]:n}}),Mke=()=>({lark:{[E5]:!0}}),_ke=n=>({headers:{Authorization:`Bearer ${n}`}}),Tke=n=>({lark:{[u5]:n}}),_S=class{constructor(t){let{encryptKey:o,verificationToken:a,logger:e}=t;this.verificationToken=a,this.encryptKey=o,this.logger=e,o&&(this.aesCipher=new YC(o))}parse(t){var o,a;let e=(()=>{var r;let s=t||{},{encrypt:g}=s,c=Y(s,["encrypt"]);if(g)try{return Object.assign(Object.assign({},JSON.parse((r=this.aesCipher)===null||r===void 0?void 0:r.decrypt(g))),c)}catch{return this.logger.error("parse encrypt data failed"),{}}return c})();if("schema"in e){let{header:r,event:s}=e,g=Y(e,["header","event"]);return Object.assign(Object.assign(Object.assign({[SS]:(o=e?.header)===null||o===void 0?void 0:o.event_type},g),r),s)}let{event:i}=e,A=Y(e,["event"]);return Object.assign(Object.assign({[SS]:(a=e?.event)===null||a===void 0?void 0:a.type},i),A)}checkIsCardEventValidated(t){if("encrypt"in t||"schema"in t)return this.checkIsEventValidated(t);let{"x-lark-request-timestamp":o,"x-lark-request-nonce":a,"x-lark-signature":e}=t.headers;return this.verificationToken?mS.createHash("sha1").update(o+a+this.verificationToken+JSON.stringify(t)).digest("hex")===e:!0}checkIsEventValidated(t){if(!this.encryptKey)return!0;let{"x-lark-request-timestamp":o,"x-lark-request-nonce":a,"x-lark-signature":e}=t.headers,i=o+a+this.encryptKey+JSON.stringify(t);return mS.createHash("sha256").update(i).digest("hex")===e}},Nke="app_ticket",TS=class{constructor(t){this.verificationToken="",this.encryptKey="",this.handles=new Map;let{encryptKey:o,verificationToken:a}=t;this.encryptKey=o||"",this.verificationToken=a||"",this.logger=new Wc(t.loggerLevel||Bo.info,t.logger||xg),this.requestHandle=new _S({encryptKey:o,verificationToken:a,logger:this.logger}),this.cache=t.cache||jC,this.registerAppTicketHandle(),this.logger.info("event-dispatch is ready")}registerAppTicketHandle(){this.register({app_ticket:t=>h(this,void 0,void 0,function*(){let{app_ticket:o,app_id:a}=t;o?(yield this.cache.set(xC,o,void 0,{namespace:a}),this.logger.debug("set app ticket")):this.logger.warn("response not include app ticket")})})}register(t){return Object.keys(t).forEach(o=>{this.handles.has(o)&&o!==Nke&&this.logger.error(`this ${o} handle is registered`),this.handles.set(o,t[o]),this.logger.debug(`register ${o} handle`)}),this}invoke(t,o){var a,e;return h(this,void 0,void 0,function*(){if(o?.needCheck!==!1&&!(!((a=this.requestHandle)===null||a===void 0)&&a.checkIsEventValidated(t))){this.logger.warn("verification failed event");return}let A=(e=this.requestHandle)===null||e===void 0?void 0:e.parse(t),r=A[SS];if(this.handles.has(r)){let s=yield this.handles.get(r)(A);return this.logger.debug(`execute ${r} handle`),s}return this.logger.warn(`no ${r} handle`),`no ${r} event handle`})}},TP=class{constructor(t,o){this.verificationToken="",this.encryptKey="",this.handles=new Map;let{verificationToken:a,encryptKey:e}=t;this.encryptKey=e||"",this.verificationToken=a||"",this.cardHandler=o,this.logger=new Wc(t.loggerLevel||Bo.info,t.logger||xg),this.requestHandle=new _S({encryptKey:e,verificationToken:a,logger:this.logger}),this.cache=t.cache||jC,this.registerAppTicketHandle(),this.logger.info("card-action-handle is ready")}registerAppTicketHandle(){this.register({app_ticket:t=>h(this,void 0,void 0,function*(){let{app_ticket:o,app_id:a}=t;o?(yield this.cache.set(xC,o,void 0,{namespace:a}),this.logger.debug("set app ticket")):this.logger.warn("response not include app ticket")})})}register(t){return Object.keys(t).forEach(o=>{this.handles.set(o,t[o]),this.logger.debug(`register ${o} handle`)}),this}invoke(t){var o,a;return h(this,void 0,void 0,function*(){if(!(!((o=this.requestHandle)===null||o===void 0)&&o.checkIsCardEventValidated(t))){this.logger.warn("verification failed event");return}let e=(a=this.requestHandle)===null||a===void 0?void 0:a.parse(t),i=e[SS];if(this.handles.has(i))try{return yield this.handles.get(i)(e)}catch(A){this.logger.error(A);return}try{let A=yield this.cardHandler(e);return this.logger.debug("execute card handle"),A}catch(A){this.logger.error(A)}})}},FS=n=>new Promise(t=>{let o="";n.on("data",a=>{o+=a}),n.on("end",()=>{try{let a=JSON.parse(o);t(a)}catch{t("")}})}),JC=(n,t)=>{if("encrypt"in n&&!t.encryptKey)throw new Error("auto-challenge need encryptKey, please check for missing in dispatcher");let o="encrypt"in n?JSON.parse(new YC(t.encryptKey).decrypt(n.encrypt)):n;return{isChallenge:o.type==="url_verification",challenge:{challenge:o.challenge}}},Rke=(n,t,o)=>(a,e)=>h(void 0,void 0,void 0,function*(){if(a.url!==n)return;let i=Object.assign(Object.create({headers:a.headers}),yield FS(a));if(o?.autoChallenge||!1){let{isChallenge:s,challenge:g}=JC(i,{encryptKey:t.encryptKey});if(s){e.end(JSON.stringify(g));return}}let r=yield t.invoke(i);e.end(JSON.stringify(r))}),kke=(n,t)=>(o,a)=>h(void 0,void 0,void 0,function*(){let e=yield h(void 0,void 0,void 0,function*(){return o.body?o.body:o.complete?((t?.logger||xg).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield FS(o)}),i=Object.assign(Object.create({headers:o.headers}),e);if(t?.autoChallenge||!1){let{isChallenge:s,challenge:g}=JC(i,{encryptKey:n.encryptKey});if(s){a.json(g);return}}let r=yield n.invoke(i);a.json(r)}),vke=(n,t,o)=>(a,e)=>h(void 0,void 0,void 0,function*(){let{originalUrl:i,req:A,request:r}=a;if(i===n){let s=yield h(void 0,void 0,void 0,function*(){return r.body?r.body:A.complete?((o?.logger||xg).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield FS(A)}),g=Object.assign(Object.create({headers:A.headers}),s);if(o?.autoChallenge||!1){let{isChallenge:d,challenge:B}=JC(g,{encryptKey:t.encryptKey});if(d){a.body=B,yield e();return}}let I=yield t.invoke(g);a.body=JSON.stringify(I)}yield e()}),Pke=(n,t)=>(o,a)=>h(void 0,void 0,void 0,function*(){let{req:e,request:i}=o,A=yield h(void 0,void 0,void 0,function*(){return i.body?i.body:e.complete?((t?.logger||xg).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield FS(e)}),r=Object.assign(Object.create({headers:e.headers}),A);if(t?.autoChallenge||!1){let{isChallenge:c,challenge:I}=JC(r,{encryptKey:n.encryptKey});if(c){o.body=I,yield a();return}}let g=yield n.invoke(r);o.body=JSON.stringify(g),yield a()}),Gke=n=>{let{title:t,content:o}=n;return JSON.stringify({config:{wide_screen_mode:!0},elements:[{tag:"markdown",content:o}],header:{template:"blue",title:{content:t,tag:"plain_text"}}})},Fke=Object.freeze({__proto__:null,defaultCard:Gke}),Kg=CS();Kg.util.Long=void 0;Kg.configure();var Vc=Kg.Reader,X6=Kg.Writer,HA=Kg.util,Xo=Kg.roots.default||(Kg.roots.default={}),S5=Xo.pbbp2=(()=>{let n={};return n.Header=(function(){function t(o){if(o)for(let a=Object.keys(o),e=0;e>>3){case 1:{A.key=a.string();break}case 2:{A.value=a.string();break}default:a.skipType(r&7);break}}if(!A.hasOwnProperty("key"))throw HA.ProtocolError("missing required 'key'",{instance:A});if(!A.hasOwnProperty("value"))throw HA.ProtocolError("missing required 'value'",{instance:A});return A},t.decodeDelimited=function(a){return a instanceof Vc||(a=new Vc(a)),this.decode(a,a.uint32())},t.verify=function(a){return typeof a!="object"||a===null?"object expected":HA.isString(a.key)?HA.isString(a.value)?null:"value: string expected":"key: string expected"},t.fromObject=function(a){if(a instanceof Xo.pbbp2.Header)return a;let e=new Xo.pbbp2.Header;return a.key!=null&&(e.key=String(a.key)),a.value!=null&&(e.value=String(a.value)),e},t.toObject=function(a,e){e||(e={});let i={};return e.defaults&&(i.key="",i.value=""),a.key!=null&&a.hasOwnProperty("key")&&(i.key=a.key),a.value!=null&&a.hasOwnProperty("value")&&(i.value=a.value),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,Kg.util.toJSONOptions)},t.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/pbbp2.Header"},t})(),n.Frame=(function(){function t(o){if(this.headers=[],o)for(let a=Object.keys(o),e=0;e>>3){case 1:{A.SeqID=a.uint64();break}case 2:{A.LogID=a.uint64();break}case 3:{A.service=a.int32();break}case 4:{A.method=a.int32();break}case 5:{A.headers&&A.headers.length||(A.headers=[]),A.headers.push(Xo.pbbp2.Header.decode(a,a.uint32()));break}case 6:{A.payloadEncoding=a.string();break}case 7:{A.payloadType=a.string();break}case 8:{A.payload=a.bytes();break}case 9:{A.LogIDNew=a.string();break}default:a.skipType(r&7);break}}if(!A.hasOwnProperty("SeqID"))throw HA.ProtocolError("missing required 'SeqID'",{instance:A});if(!A.hasOwnProperty("LogID"))throw HA.ProtocolError("missing required 'LogID'",{instance:A});if(!A.hasOwnProperty("service"))throw HA.ProtocolError("missing required 'service'",{instance:A});if(!A.hasOwnProperty("method"))throw HA.ProtocolError("missing required 'method'",{instance:A});return A},t.decodeDelimited=function(a){return a instanceof Vc||(a=new Vc(a)),this.decode(a,a.uint32())},t.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(!HA.isInteger(a.SeqID)&&!(a.SeqID&&HA.isInteger(a.SeqID.low)&&HA.isInteger(a.SeqID.high)))return"SeqID: integer|Long expected";if(!HA.isInteger(a.LogID)&&!(a.LogID&&HA.isInteger(a.LogID.low)&&HA.isInteger(a.LogID.high)))return"LogID: integer|Long expected";if(!HA.isInteger(a.service))return"service: integer expected";if(!HA.isInteger(a.method))return"method: integer expected";if(a.headers!=null&&a.hasOwnProperty("headers")){if(!Array.isArray(a.headers))return"headers: array expected";for(let e=0;e>>0,a.SeqID.high>>>0).toNumber(!0))),a.LogID!=null&&(HA.Long?(e.LogID=HA.Long.fromValue(a.LogID)).unsigned=!0:typeof a.LogID=="string"?e.LogID=parseInt(a.LogID,10):typeof a.LogID=="number"?e.LogID=a.LogID:typeof a.LogID=="object"&&(e.LogID=new HA.LongBits(a.LogID.low>>>0,a.LogID.high>>>0).toNumber(!0))),a.service!=null&&(e.service=a.service|0),a.method!=null&&(e.method=a.method|0),a.headers){if(!Array.isArray(a.headers))throw TypeError(".pbbp2.Frame.headers: array expected");e.headers=[];for(let i=0;i=0&&(e.payload=a.payload)),a.LogIDNew!=null&&(e.LogIDNew=String(a.LogIDNew)),e},t.toObject=function(a,e){e||(e={});let i={};if((e.arrays||e.defaults)&&(i.headers=[]),e.defaults){if(HA.Long){let A=new HA.Long(0,0,!0);i.SeqID=e.longs===String?A.toString():e.longs===Number?A.toNumber():A}else i.SeqID=e.longs===String?"0":0;if(HA.Long){let A=new HA.Long(0,0,!0);i.LogID=e.longs===String?A.toString():e.longs===Number?A.toNumber():A}else i.LogID=e.longs===String?"0":0;i.service=0,i.method=0,i.payloadEncoding="",i.payloadType="",e.bytes===String?i.payload="":(i.payload=[],e.bytes!==Array&&(i.payload=HA.newBuffer(i.payload))),i.LogIDNew=""}if(a.SeqID!=null&&a.hasOwnProperty("SeqID")&&(typeof a.SeqID=="number"?i.SeqID=e.longs===String?String(a.SeqID):a.SeqID:i.SeqID=e.longs===String?HA.Long.prototype.toString.call(a.SeqID):e.longs===Number?new HA.LongBits(a.SeqID.low>>>0,a.SeqID.high>>>0).toNumber(!0):a.SeqID),a.LogID!=null&&a.hasOwnProperty("LogID")&&(typeof a.LogID=="number"?i.LogID=e.longs===String?String(a.LogID):a.LogID:i.LogID=e.longs===String?HA.Long.prototype.toString.call(a.LogID):e.longs===Number?new HA.LongBits(a.LogID.low>>>0,a.LogID.high>>>0).toNumber(!0):a.LogID),a.service!=null&&a.hasOwnProperty("service")&&(i.service=a.service),a.method!=null&&a.hasOwnProperty("method")&&(i.method=a.method),a.headers&&a.headers.length){i.headers=[];for(let A=0;AS5.Frame.decode(n),NP=class{constructor(){this.client={appId:"",appSecret:"",domain:ks.Feishu},this.ws={connectUrl:"",pingInterval:120*1e3,reconnectCount:-1,reconnectInterval:120*1e3,reconnectNonce:30*1e3,deviceId:"",serviceId:"",autoReconnect:!0},this.wsInstance=null}updateClient(t){Object.assign(this.client,t)}updateWs(t){Object.assign(this.ws,t)}getClient(t){return t===void 0?this.client:this.client[t]}getWS(t){return t===void 0?this.ws:this.ws[t]}get wsConfigUrl(){return`${this.getClient("domain")}/callback/ws/endpoint`}setWSInstance(t){this.wsInstance=t}getWSInstance(){return this.wsInstance}},RP=class{constructor(t){this.cache=new Map,this.logger=t.logger,this.clearAtInterval()}mergeData(t){let{message_id:o,sum:a,seq:e,trace_id:i,data:A}=t,r=this.cache.get(o);if(r)r.buffer[e]=A;else{let g=new Array(a).fill(void 0);g[e]=A,this.cache.set(o,{buffer:g,trace_id:i,message_id:o,create_time:Date.now()})}let s=this.cache.get(o);if(s?.buffer.every(g=>!!g)){let g=s.buffer.reduce((d,B)=>{let f=new Uint8Array(d.byteLength+B.byteLength);return f.set(d,0),f.set(B,d.length),f},new Uint8Array([])),c=new TextDecoder("utf-8").decode(g),I=JSON.parse(c);return this.deleteCache(o),I}return null}deleteCache(t){this.cache.delete(t)}clearAtInterval(){if(this.timer)return;let t=1e4;this.timer=setInterval(()=>{let o=Date.now();this.cache.forEach((a,e)=>{var i;let{create_time:A,trace_id:r,message_id:s}=a;o-A>t&&((i=this.logger)===null||i===void 0||i.debug(`${s} event data is deleted as expired, trace_id: ${r}`),this.deleteCache(e))})},t),typeof this.timer.unref=="function"&&this.timer.unref()}destroy(){this.timer&&(clearInterval(this.timer),this.timer=void 0),this.cache.clear()}},UC;(function(n){n[n.ok=0]="ok",n[n.system_busy=1]="system_busy",n[n.forbidden=403]="forbidden",n[n.auth_failed=514]="auth_failed",n[n.internal_error=1000040343]="internal_error",n[n.exceed_conn_limit=1000040350]="exceed_conn_limit"})(UC||(UC={}));var HC;(function(n){n[n.control=0]="control",n[n.data=1]="data"})(HC||(HC={}));var KC;(function(n){n.type="type",n.message_id="message_id",n.sum="sum",n.seq="seq",n.trace_id="trace_id",n.biz_rt="biz_rt",n.handshake_status="handshake-status",n.handshake_msg="handshake-msg",n.handshake_autherrcode="handshake-autherrcode"})(KC||(KC={}));var nh;(function(n){n.event="event",n.card="card",n.ping="ping",n.pong="pong"})(nh||(nh={}));var NS;(function(n){n[n.ok=200]="ok",n[n.internal_server_error=500]="internal_server_error"})(NS||(NS={}));var RS=class{constructor(t){var o;this.wsConfig=new NP,this.reconnectGeneration=0,this.pendingWsInstance=null,this.isConnecting=!1,this.reconnectInfo={lastConnectTime:0,nextConnectTime:0},this.hasEverConnected=!1,this.terminalError=!1,this.currentReconnectAttempts=0;let{appId:a,appSecret:e,clientAssertionProvider:i,agent:A,domain:r=ks.Feishu,httpInstance:s=gh,loggerLevel:g=Bo.info,logger:c=xg,autoReconnect:I=!0,source:d,extraUaTags:B,onReady:f,onError:Q,onReconnecting:y,onReconnected:m,handshakeTimeoutMs:_,wsConfig:T}=t;if(this.userAgent=VP(d,{extraTags:B}),this.logger=new Wc(g,c),OS(!a,()=>this.logger.error("appId is needed")),!e&&!i)throw new ca(XP,"appSecret or clientAssertionProvider is required");this.agent=A,this.dataCache=new RP({logger:this.logger}),this.httpInstance=s,this.wsConfig.updateClient({appId:a,appSecret:e||"",clientAssertionProvider:i,domain:C5(r)}),this.wsConfig.updateWs({autoReconnect:I}),this.onReady=f,this.onError=Q,this.onReconnecting=y,this.onReconnected=m,this.handshakeTimeoutMs=_,this.pingTimeoutSec=(o=T?.pingTimeout)!==null&&o!==void 0?o:0}armLiveness(){this.pingTimeoutSec&&(this.livenessTimer&&clearTimeout(this.livenessTimer),this.livenessTimer=setTimeout(()=>{var t;this.livenessTimer=void 0,this.logger.warn("[ws]",`no pong/inbound within ${this.pingTimeoutSec}s of last ping, terminating to trigger reconnect`);try{(t=this.wsConfig.getWSInstance())===null||t===void 0||t.terminate()}catch{}},this.pingTimeoutSec*1e3))}clearLiveness(){this.livenessTimer&&(clearTimeout(this.livenessTimer),this.livenessTimer=void 0)}safeInvoke(t,o,...a){if(o)try{o(...a)}catch(e){this.logger.error(`[ws] ${t} callback threw`,e)}}pullConnectConfig(){return h(this,void 0,void 0,function*(){let{appId:t,appSecret:o,clientAssertionProvider:a,domain:e}=this.wsConfig.getClient(),i="/callback/ws/endpoint",A=this.wsConfig.wsConfigUrl,r={locale:"zh","User-Agent":this.userAgent},s={AppID:t};try{if(a){let Q=eG(e),y=yield a.retrieveToken(Q);if(!y||!y.value)throw new ca(ZP,"client assertion token is empty");s.AppSecret="",s.ClientAssertion=y.value,y.targetInfo&&(A=tG(y.targetInfo,i),r[WP]=Q)}else s.AppSecret=o;let{code:g,data:{URL:c,ClientConfig:I},msg:d}=yield this.httpInstance.request({method:"post",url:A,data:s,headers:r,timeout:15e3});if(g!==UC.ok){let Q=g===UC.system_busy?"system busy":d;return this.logger.error("[ws]",`code: ${g}, ${Q}`),g===UC.internal_error?{ok:!1,retryable:!0}:{ok:!1,retryable:!1,error:`pullConnectConfig failed: code=${g}, msg=${Q}`}}let{device_id:B,service_id:f}=Ike.parse(c);return this.wsConfig.updateWs({connectUrl:c,deviceId:B,serviceId:f,pingInterval:I.PingInterval*1e3,reconnectCount:I.ReconnectCount,reconnectInterval:I.ReconnectInterval*1e3,reconnectNonce:I.ReconnectNonce*1e3}),this.logger.debug("[ws]",`get connect config success, ws url: ${c}`),{ok:!0}}catch(g){return this.logger.error("[ws]",g?.message||"system busy"),g instanceof ca?{ok:!1,retryable:!1,error:g.message}:{ok:!1,retryable:!0}}})}connect(){let t=this.wsConfig.getWS("connectUrl"),o;try{let{agent:a}=this;o=new Vo(t,{agent:a})}catch{this.logger.error("[ws]","new WebSocket error")}return o?(this.pendingWsInstance=o,new Promise(a=>{let e=!1,i,A=r=>{e||(e=!0,i&&clearTimeout(i),this.pendingWsInstance===o&&(this.pendingWsInstance=null),a(r))};this.handshakeTimeoutMs&&this.handshakeTimeoutMs>0&&(i=setTimeout(()=>{this.logger.error("[ws]",`handshake timeout after ${this.handshakeTimeoutMs}ms`),o.removeAllListeners("open");try{o.terminate()}catch{}A(!1)},this.handshakeTimeoutMs)),o.on("open",()=>{this.logger.debug("[ws]","ws connect success"),this.wsConfig.setWSInstance(o),this.pingLoop(),A(!0)}),o.on("error",()=>{this.logger.error("[ws]","ws connect failed"),A(!1)})})):Promise.resolve(!1)}reConnect(t=!1){return h(this,void 0,void 0,function*(){if(this.isConnecting&&!t){this.logger.debug("[ws]","repeat connection");return}this.isConnecting=!0;let o=++this.reconnectGeneration,a=()=>h(this,void 0,void 0,function*(){if(o!==this.reconnectGeneration)return{ok:!1,retryable:!1,cancelled:!0};this.reconnectInfo.lastConnectTime=Date.now();let c=yield this.pullConnectConfig();if(o!==this.reconnectGeneration)return{ok:!1,retryable:!1,cancelled:!0};if(!c.ok)return c;let I=yield this.connect();return o!==this.reconnectGeneration?{ok:!1,retryable:!1,cancelled:!0}:I?(this.communicate(),{ok:!0}):{ok:!1,retryable:!0}});this.pingInterval&&clearTimeout(this.pingInterval),this.reconnectInterval&&clearTimeout(this.reconnectInterval);let e=this.wsConfig.getWSInstance();if(t){e&&e?.terminate();let c={ok:!1,retryable:!0};try{c=yield a()}finally{o===this.reconnectGeneration&&(this.isConnecting=!1)}if(o!==this.reconnectGeneration||c.cancelled)return;if(c.ok)this.hasEverConnected=!0,this.safeInvoke("onReady",this.onReady);else if(c.retryable)this.logger.error("[ws]","connect failed"),yield this.reConnect();else{this.hasEverConnected=!1,this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error(c.error));return}this.logger.info("[ws]","ws client ready");return}let{autoReconnect:i,reconnectNonce:A,reconnectCount:r,reconnectInterval:s}=this.wsConfig.getWS();if(!i){this.hasEverConnected||(this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error("WebSocket connect failed and autoReconnect is disabled")));return}this.logger.info("[ws]","reconnect"),this.hasEverConnected&&this.safeInvoke("onReconnecting",this.onReconnecting),e&&e?.terminate(),this.wsConfig.setWSInstance(null);let g=A?A*Math.random():0;this.reconnectInterval=setTimeout(()=>h(this,void 0,void 0,function*(){(function c(I){return h(this,void 0,void 0,function*(){if(o!==this.reconnectGeneration)return;I++,this.currentReconnectAttempts=I;let d=yield a();if(o===this.reconnectGeneration){if(d.ok){this.logger.debug("[ws]","reconnect success"),this.currentReconnectAttempts=0,this.hasEverConnected?this.safeInvoke("onReconnected",this.onReconnected):(this.hasEverConnected=!0,this.safeInvoke("onReady",this.onReady)),this.isConnecting=!1;return}if(!d.retryable){this.isConnecting=!1,this.hasEverConnected=!1,this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error(d.error));return}if(this.logger.info("ws",`unable to connect to the server after trying ${I} times")`),r>=0&&I>=r){this.isConnecting=!1,this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error(`WebSocket reconnect exhausted after ${I} attempts`));return}this.reconnectInterval=setTimeout(()=>{c.bind(this)(I)},s),this.reconnectInfo.nextConnectTime=Date.now()+s}})}).bind(this)(0)}),g),this.reconnectInfo.nextConnectTime=Date.now()+g})}pingLoop(){let{serviceId:t,pingInterval:o}=this.wsConfig.getWS(),a=this.wsConfig.getWSInstance();if(a?.readyState===Vo.OPEN){let e={headers:[{key:KC.type,value:nh.ping}],service:Number(t),method:HC.control,SeqID:0,LogID:0};this.sendMessage(e),this.armLiveness(),this.logger.trace("[ws]","ping success")}this.pingInterval=setTimeout(this.pingLoop.bind(this),o)}communicate(){let t=this.wsConfig.getWSInstance();t?.on("message",o=>h(this,void 0,void 0,function*(){this.clearLiveness();let a=Lke(o),{method:e}=a;e===HC.control&&(yield this.handleControlData(a)),e===HC.data&&(yield this.handleEventData(a))})),t?.on("error",o=>{this.logger.error("[ws]","ws error")}),t?.on("close",()=>{this.logger.debug("[ws]","client closed"),this.clearLiveness(),this.reConnect()})}handleControlData(t){var o;return h(this,void 0,void 0,function*(){let a=(o=t.headers.find(i=>i.key===KC.type))===null||o===void 0?void 0:o.value,e=t.payload;if(a!==nh.ping&&a===nh.pong&&e){this.logger.trace("[ws]","receive pong");let i=new TextDecoder("utf-8").decode(e),{PingInterval:A,ReconnectCount:r,ReconnectInterval:s,ReconnectNonce:g}=JSON.parse(i);this.wsConfig.updateWs({pingInterval:A*1e3,reconnectCount:r,reconnectInterval:s*1e3,reconnectNonce:g*1e3}),this.logger.trace("[ws]","update wsConfig with pong data")}})}handleEventData(t){var o;return h(this,void 0,void 0,function*(){let a=t.headers.reduce((f,Q)=>(f[Q.key]=Q.value,f),{}),{message_id:e,sum:i,seq:A,type:r,trace_id:s}=a,g=t.payload;if(r!==nh.event)return;let c=this.dataCache.mergeData({message_id:e,sum:Number(i),seq:Number(A),trace_id:s,data:g});if(!c)return;this.logger.debug("[ws]",`receive message, message_type: ${r}; message_id: ${e}; trace_id: ${s}; data: ${c.data}`);let I={code:NS.ok},d=Date.now();try{let f=yield(o=this.eventDispatcher)===null||o===void 0?void 0:o.invoke(c,{needCheck:!1});f&&(I.data=Buffer.from(JSON.stringify(f)).toString("base64"))}catch(f){I.code=NS.internal_server_error,this.logger.error("[ws]",`invoke event failed, message_type: ${r}; message_id: ${e}; trace_id: ${s}; error: ${f}`)}let B=Date.now();this.sendMessage(Object.assign(Object.assign({},t),{headers:[...t.headers,{key:KC.biz_rt,value:String(d-B)}],payload:new TextEncoder().encode(JSON.stringify(I))}))})}sendMessage(t){var o;let a=this.wsConfig.getWSInstance();if(a?.readyState===Vo.OPEN){let e=S5.Frame.encode(t).finish();(o=this.wsConfig.getWSInstance())===null||o===void 0||o.send(e,i=>{i&&this.logger.error("[ws]","send data failed")})}}getReconnectInfo(){return this.reconnectInfo}getConnectionStatus(){return{state:this.computeState(),lastConnectTime:this.reconnectInfo.lastConnectTime||void 0,nextConnectTime:this.reconnectInfo.nextConnectTime||void 0,reconnectAttempts:this.currentReconnectAttempts}}computeState(){var t;return this.terminalError?"failed":this.isConnecting&&!this.hasEverConnected?"connecting":this.isConnecting&&this.hasEverConnected?"reconnecting":((t=this.wsConfig.getWSInstance())===null||t===void 0?void 0:t.readyState)===Vo.OPEN?"connected":"idle"}close(t={}){let{force:o=!1}=t;this.reconnectGeneration++,this.pingInterval&&(clearTimeout(this.pingInterval),this.pingInterval=void 0),this.reconnectInterval&&(clearTimeout(this.reconnectInterval),this.reconnectInterval=void 0),this.clearLiveness(),this.dataCache.destroy(),this.isConnecting=!1,this.currentReconnectAttempts=0;let a=this.pendingWsInstance;if(a){this.pendingWsInstance=null,a.removeAllListeners("open");try{o?a.terminate():a.close()}catch{}}let e=this.wsConfig.getWSInstance();e&&(e.removeAllListeners(),o?e.terminate():e.close(),this.wsConfig.setWSInstance(null)),this.logger.info("[ws]",`ws client closed manually${o?" (force)":""}`)}start(t){return h(this,void 0,void 0,function*(){let{appId:o}=this.wsConfig.getClient();if(!/^cli_[0-9a-fA-F]{16}$/.test(o)){this.logger.error("[ws]",`invalid appId: ${o}`);return}let{eventDispatcher:a}=t;if(!a){this.logger.warn("[ws]","client need to start with a eventDispatcher");return}let e=this.wsConfig.getWSInstance();if(this.terminalError&&(this.isConnecting=!1),this.isConnecting||e&&e.readyState!==Vo.CLOSED){this.logger.debug("[ws]","start ignored because client is already connecting or connected");return}this.terminalError=!1,this.currentReconnectAttempts=0,this.dataCache.clearAtInterval(),this.logger.info("[ws]",`receive events or callbacks through persistent connection only available in self-build & Feishu app, Configured in: Developer Console(\u5F00\u53D1\u8005\u540E\u53F0) -> Events and Callbacks(\u4E8B\u4EF6\u4E0E\u56DE\u8C03) -> Mode of event/callback subscription(\u8BA2\u9605\u65B9\u5F0F) -> - Receive events/callbacks through persistent connection(\u4F7F\u7528 \u957F\u8FDE\u63A5 \u63A5\u6536\u4E8B\u4EF6/\u56DE\u8C03)`),this.eventDispatcher=a,this.reConnect(!0)})}},kP=class{constructor(){this.sessions=new Map}set(t,o){return h(this,void 0,void 0,function*(){let a=this.sessions.get(t.toString())||{},e=f5(a,o);return this.sessions.set(t.toString(),e),!0})}get(t){return h(this,void 0,void 0,function*(){return this.sessions.get(t.toString())})}},Co;(function(n){n[n.ERROR=-1]="ERROR",n[n.SUCCESS=0]="SUCCESS",n[n.EXPIRED=1]="EXPIRED",n[n.CANCELLED=2]="CANCELLED",n[n.FAILED=3]="FAILED",n[n.OTHER=4]="OTHER"})(Co||(Co={}));var vP=class{constructor(t){this.completions={create:this.create.bind(this),createWithStream:this.createWithStream.bind(this),sessionRecords:{get:this.getRecords.bind(this),update:this.updateRecords.bind(this)}},this.client=t.client,this.logger=t.client.logger,this.cache=t.cache||new kP}getSessionId(t){var o;return h(this,void 0,void 0,function*(){let{sessionId:a,payload:e,options:i}=t,A=yield this.getRecords();if(a&&a in A)return A[a];let r=yield this.client.aily.v1.ailySession.create({data:e},i);if(r.code===0&&r.data){let s=(o=r.data.session)===null||o===void 0?void 0:o.id;return a&&(yield this.updateRecords({[a]:s})),s}else{this.logger.error("get aily session id error",r.msg);return}})}waitReply(t,o){var a,e;return h(this,void 0,void 0,function*(){let{sessionId:i,ailyAppId:A,message:r,sessionInfo:s,messageInfo:g,runInfo:c,skillId:I}=t,d=yield this.getSessionId({sessionId:i,payload:s,options:o});if(!d)throw Co.ERROR;let B=yield this.client.aily.v1.ailySessionAilyMessage.create({path:{aily_session_id:d},data:Object.assign(Object.assign({},g),{content:r,idempotent_id:`${Date.now()}`,content_type:"MDX"})},o);if(!(B.code===0&&B.data))throw this.logger.error("create aily message error",B.msg),Co.ERROR;let f=(a=B.data.message)===null||a===void 0?void 0:a.id,Q=yield this.client.aily.v1.ailySessionRun.create({path:{aily_session_id:d},data:Object.assign({app_id:A,skill_id:I},c)},o);if(!(Q.code===0&&Q.data))throw this.logger.error("create aily session run error",Q.msg),Co.ERROR;let y=(e=Q.data.run)===null||e===void 0?void 0:e.id;if(!y)throw this.logger.error("run id is empty"),Co.ERROR;let m=()=>h(this,void 0,void 0,function*(){return new Promise(T=>{setTimeout(()=>h(this,void 0,void 0,function*(){var R,L;let U=yield this.client.aily.v1.ailySessionRun.get({path:{aily_session_id:d,run_id:y}},o);if(!(U.code===0&&U.data)){T(3);return}switch((L=(R=U.data)===null||R===void 0?void 0:R.run)===null||L===void 0?void 0:L.status){case"QUEUED":case"IN_PROGRESS":yield h(this,void 0,void 0,function*(){let z=yield m();T(z)});case"COMPLETED":T(Co.SUCCESS);case"EXPIRED":T(Co.EXPIRED);case"CANCELLED":T(Co.CANCELLED);case"FAILED":T(Co.FAILED);default:T(Co.OTHER)}}),500)})}),_=yield m();if(_!==Co.SUCCESS)throw this.logger.error("aily run error"),_;return{ailySessionId:d,runId:y,messageId:f}})}create(t,o){var a,e,i,A,r;return h(this,void 0,void 0,function*(){let{ailySessionId:s,runId:g}=yield this.waitReply(t,o),c;try{for(var I=!0,d=J6(yield this.client.aily.v1.ailySessionAilyMessage.listWithIterator({path:{aily_session_id:s},params:{run_id:g,with_partial_message:!1}},o)),B;B=yield d.next(),a=B.done,!a;){A=B.value,I=!1;try{let f=A;if(!f)continue;(r=f?.messages)===null||r===void 0||r.forEach(Q=>{var y;((y=Q.sender)===null||y===void 0?void 0:y.sender_type)==="ASSISTANT"&&(c=Q)})}finally{I=!0}}}catch(f){e={error:f}}finally{try{!I&&!a&&(i=d.return)&&(yield i.call(d))}finally{if(e)throw e.error}}if(!c)throw this.logger.error("no aily reply"),Co.ERROR;return c})}createWithStream(t,o){return h(this,void 0,void 0,function*(){let{ailySessionId:a,runId:e,messageId:i}=yield this.waitReply(t,o),A=()=>this.client.aily.v1.ailySessionAilyMessage.listWithIterator({path:{aily_session_id:a},params:{run_id:e,with_partial_message:!0}},o),r=!1;return{[Symbol.asyncIterator](){return j(this,arguments,function*(){var c,I,d,B;try{for(var f=!0,Q=J6(yield S(A())),y;y=yield S(Q.next()),c=y.done,!c;){B=y.value,f=!1;try{let m=B;if(!m)continue;for(let _ of m.messages||[])if(r){if(yield yield S(_),_.status==="COMPLETED")return yield S(void 0)}else _.id===i&&_.status==="COMPLETED"&&(r=!0)}finally{f=!0}}}catch(m){I={error:m}}finally{try{!f&&!c&&(d=Q.return)&&(yield S(d.call(Q)))}finally{if(I)throw I.error}}})}}})}getRecords(){return h(this,void 0,void 0,function*(){return(yield this.cache.get(z6))||{}})}updateRecords(t){return h(this,void 0,void 0,function*(){yield this.cache.set(z6,t)})}};function kC(n,t){if(typeof n!="object"||n===null||Array.isArray(n))throw new Error(`${t} must be an object`)}function vC(n,t,o){for(let a of Object.keys(n))if(!t.includes(a))throw new Error(`${o}.${a} is not allowed; allowed keys: ${t.join(", ")}`)}function vke(n,t){if(n!==void 0){if(!Array.isArray(n))throw new Error(`${t} must be an array of strings`);return n.forEach((o,a)=>{if(typeof o!="string"||o==="")throw new Error(`${t}[${a}] must be a non-empty string`)}),n}}function Pke(n){kC(n,"addons"),vC(n,["preset","scopes","events","callbacks"],"addons");let t=0,o=(e,i)=>{var A;let r=vke(e,i);return t+=(A=r?.length)!==null&&A!==void 0?A:0,r},a={};if(n.preset!==void 0){if(typeof n.preset!="boolean")throw new Error("addons.preset must be a boolean");a.preset=n.preset}if(n.scopes!==void 0&&(kC(n.scopes,"addons.scopes"),vC(n.scopes,["tenant","user"],"addons.scopes"),a.scopes={tenant:o(n.scopes.tenant,"addons.scopes.tenant"),user:o(n.scopes.user,"addons.scopes.user")}),n.events!==void 0&&(kC(n.events,"addons.events"),vC(n.events,["items"],"addons.events"),n.events.items!==void 0&&(kC(n.events.items,"addons.events.items"),vC(n.events.items,["tenant","user"],"addons.events.items"),a.events={items:{tenant:o(n.events.items.tenant,"addons.events.items.tenant"),user:o(n.events.items.user,"addons.events.items.user")}})),n.callbacks!==void 0&&(kC(n.callbacks,"addons.callbacks"),vC(n.callbacks,["items"],"addons.callbacks"),a.callbacks={items:o(n.callbacks.items,"addons.callbacks.items")}),t===0&&n.preset!==!1)throw new Error("addons must contain at least one scope, event or callback");return a}function Gke(n){let t=JSON.stringify(Pke(n));return nke(Buffer.from(t,"utf8")).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function PC(n,t){return{code:n,description:t}}var W6="node-sdk",Fke="accounts.feishu.cn",Lke="accounts.larksuite.com",Uke="/oauth/v1/app/registration",Z6=6;function Hke(n,t){let{avatar:o,name:a,desc:e}=t;if(o!==void 0){let i=Array.isArray(o)?o:[o];if(i.length===0)throw new Error("appPreset.avatar must contain at least 1 URL");if(i.length>Z6)throw new Error(`appPreset.avatar supports at most ${Z6} URLs, got ${i.length}`);i.forEach((A,r)=>{if(typeof A!="string"||A==="")throw new Error(`appPreset.avatar[${r}] must be a non-empty string`);n.searchParams.append("avatar",A)})}a!==void 0&&n.searchParams.set("name",a),e!==void 0&&n.searchParams.set("desc",e)}function y5(n,t){var o;return h(this,void 0,void 0,function*(){try{return yield gh.post(`${n}${Uke}`,new URLSearchParams(t).toString(),{headers:{"Content-Type":"application/x-www-form-urlencoded"}})}catch(a){if(a instanceof UN&&(!((o=a.response)===null||o===void 0)&&o.data))return a.response.data;throw a}})}function Kke(n){return y5(n,{action:"begin",archetype:"PersonalAgent",auth_method:"client_secret",request_user_info:"open_id"})}function xke(n){return new Promise((t,o)=>{var a,e;let{baseUrl:i,interval:A}=n,r=!1,s=null,g=null,c=()=>{var B;s!==null&&(clearTimeout(s),s=null),g!==null&&(clearTimeout(g),g=null),(B=n.signal)===null||B===void 0||B.removeEventListener("abort",I)},I=()=>{c(),o(PC("abort","Registration was aborted"))};if(!((a=n.signal)===null||a===void 0)&&a.aborted)return o(PC("abort","Registration was aborted"));(e=n.signal)===null||e===void 0||e.addEventListener("abort",I,{once:!0}),g=setTimeout(()=>{c(),o(PC("expired_token","Polling timed out"))},n.expireIn);let d=()=>h(this,void 0,void 0,function*(){var B,f,Q,y,m,_;try{let T=yield y5(i,{action:"poll",device_code:n.deviceCode});if(((B=T.user_info)===null||B===void 0?void 0:B.tenant_brand)==="lark"&&!r){i=n.larkBaseUrl,r=!0,(f=n.onStatusChange)===null||f===void 0||f.call(n,{status:"domain_switched"}),d();return}if(T.client_id&&T.client_secret){c(),t({client_id:T.client_id,client_secret:T.client_secret,user_info:T.user_info});return}switch(T.error){case"authorization_pending":(Q=n.onStatusChange)===null||Q===void 0||Q.call(n,{status:"polling"});break;case"slow_down":A+=5e3,(y=n.onStatusChange)===null||y===void 0||y.call(n,{status:"slow_down",interval:A/1e3});break;case"access_denied":case"expired_token":c(),o(PC(T.error,(m=T.error_description)!==null&&m!==void 0?m:"Unknown error"));return;default:if(T.error){c(),o(PC(T.error,(_=T.error_description)!==null&&_!==void 0?_:"Unknown error"));return}break}s=setTimeout(d,A)}catch(T){c(),o(T)}});d()})}function Yke(n){var t,o,a,e;return h(this,void 0,void 0,function*(){let{domain:i,source:A,signal:r,onQRCodeReady:s,onStatusChange:g,appPreset:c,addons:I,createOnly:d,appId:B}=n;if(B!==void 0&&(typeof B!="string"||B===""))throw new Error("appId must be a non-empty string");let f=`https://${i??Fke}`,Q=yield Kke(f),y=new URL(Q.verification_uri_complete);return y.searchParams.set("from","sdk"),y.searchParams.set("source",A?`${W6}/${A}`:W6),y.searchParams.set("tp","sdk"),c&&Hke(y,c),I&&y.searchParams.set("addons",Gke(I)),d===!0&&y.searchParams.set("createOnly","true"),B&&y.searchParams.set("clientID",B),s({url:y.toString(),expireIn:(t=Q.expires_in)!==null&&t!==void 0?t:600}),xke({baseUrl:f,deviceCode:Q.device_code,interval:((o=Q.interval)!==null&&o!==void 0?o:5)*1e3,expireIn:((a=Q.expires_in)!==null&&a!==void 0?a:600)*1e3,larkBaseUrl:`https://${(e=n.larkDomain)!==null&&e!==void 0?e:Lke}`,signal:r,onStatusChange:g})})}var Kt=class extends Error{constructor(t,o,a){super(o),this.name="LarkChannelError",this.code=t,this.cause=a?.cause,this.context=a?.context}},RS=class{constructor(t,o){this.opts=t,this.fire=o,this.pendingChars=0,this.lastFireAt=0}note(t){if(this.pendingChars+=t,this.pendingChars>=this.opts.chars){this.fireSoon(0);return}if(!this.timer){let o=Date.now()-this.lastFireAt,a=Math.max(0,this.opts.ms-o);this.fireSoon(a)}}fireSoon(t){this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.timer=void 0,this.doFire()},t)}flushNow(){return h(this,void 0,void 0,function*(){this.timer&&(clearTimeout(this.timer),this.timer=void 0),this.inFlight&&(yield this.inFlight),yield this.doFire()})}doFire(){return h(this,void 0,void 0,function*(){if(this.inFlight){this.fireSoon(this.opts.ms);return}let t=h(this,void 0,void 0,function*(){this.pendingChars=0,this.lastFireAt=Date.now(),yield this.fire()});this.inFlight=t;try{yield t}finally{this.inFlight=void 0}})}dispose(){this.timer&&(clearTimeout(this.timer),this.timer=void 0)}},kS=class{constructor(){this.tail=Promise.resolve()}enqueue(t){let o=this.tail.then(t,t);return this.tail=o.then(()=>{},()=>{}),o}drain(){return this.tail}};function jke(n,t){if(!n)return t;if(!t)return n;if(t.startsWith(n))return t;if(n.startsWith(t))return n;let o=Math.min(n.length,t.length);for(let a=o;a>0;a--)if(n.endsWith(t.substring(0,a)))return n+t.substring(a);return n+t}function m5(n,t){if(n.length<=t)return[n];let o=n.split(` + Receive events/callbacks through persistent connection(\u4F7F\u7528 \u957F\u8FDE\u63A5 \u63A5\u6536\u4E8B\u4EF6/\u56DE\u8C03)`),this.eventDispatcher=a,this.reConnect(!0)})}},kP=class{constructor(){this.sessions=new Map}set(t,o){return h(this,void 0,void 0,function*(){let a=this.sessions.get(t.toString())||{},e=m5(a,o);return this.sessions.set(t.toString(),e),!0})}get(t){return h(this,void 0,void 0,function*(){return this.sessions.get(t.toString())})}},Co;(function(n){n[n.ERROR=-1]="ERROR",n[n.SUCCESS=0]="SUCCESS",n[n.EXPIRED=1]="EXPIRED",n[n.CANCELLED=2]="CANCELLED",n[n.FAILED=3]="FAILED",n[n.OTHER=4]="OTHER"})(Co||(Co={}));var vP=class{constructor(t){this.completions={create:this.create.bind(this),createWithStream:this.createWithStream.bind(this),sessionRecords:{get:this.getRecords.bind(this),update:this.updateRecords.bind(this)}},this.client=t.client,this.logger=t.client.logger,this.cache=t.cache||new kP}getSessionId(t){var o;return h(this,void 0,void 0,function*(){let{sessionId:a,payload:e,options:i}=t,A=yield this.getRecords();if(a&&a in A)return A[a];let r=yield this.client.aily.v1.ailySession.create({data:e},i);if(r.code===0&&r.data){let s=(o=r.data.session)===null||o===void 0?void 0:o.id;return a&&(yield this.updateRecords({[a]:s})),s}else{this.logger.error("get aily session id error",r.msg);return}})}waitReply(t,o){var a,e;return h(this,void 0,void 0,function*(){let{sessionId:i,ailyAppId:A,message:r,sessionInfo:s,messageInfo:g,runInfo:c,skillId:I}=t,d=yield this.getSessionId({sessionId:i,payload:s,options:o});if(!d)throw Co.ERROR;let B=yield this.client.aily.v1.ailySessionAilyMessage.create({path:{aily_session_id:d},data:Object.assign(Object.assign({},g),{content:r,idempotent_id:`${Date.now()}`,content_type:"MDX"})},o);if(!(B.code===0&&B.data))throw this.logger.error("create aily message error",B.msg),Co.ERROR;let f=(a=B.data.message)===null||a===void 0?void 0:a.id,Q=yield this.client.aily.v1.ailySessionRun.create({path:{aily_session_id:d},data:Object.assign({app_id:A,skill_id:I},c)},o);if(!(Q.code===0&&Q.data))throw this.logger.error("create aily session run error",Q.msg),Co.ERROR;let y=(e=Q.data.run)===null||e===void 0?void 0:e.id;if(!y)throw this.logger.error("run id is empty"),Co.ERROR;let m=()=>h(this,void 0,void 0,function*(){return new Promise(T=>{setTimeout(()=>h(this,void 0,void 0,function*(){var R,L;let U=yield this.client.aily.v1.ailySessionRun.get({path:{aily_session_id:d,run_id:y}},o);if(!(U.code===0&&U.data)){T(3);return}switch((L=(R=U.data)===null||R===void 0?void 0:R.run)===null||L===void 0?void 0:L.status){case"QUEUED":case"IN_PROGRESS":yield h(this,void 0,void 0,function*(){let J=yield m();T(J)});case"COMPLETED":T(Co.SUCCESS);case"EXPIRED":T(Co.EXPIRED);case"CANCELLED":T(Co.CANCELLED);case"FAILED":T(Co.FAILED);default:T(Co.OTHER)}}),500)})}),_=yield m();if(_!==Co.SUCCESS)throw this.logger.error("aily run error"),_;return{ailySessionId:d,runId:y,messageId:f}})}create(t,o){var a,e,i,A,r;return h(this,void 0,void 0,function*(){let{ailySessionId:s,runId:g}=yield this.waitReply(t,o),c;try{for(var I=!0,d=V6(yield this.client.aily.v1.ailySessionAilyMessage.listWithIterator({path:{aily_session_id:s},params:{run_id:g,with_partial_message:!1}},o)),B;B=yield d.next(),a=B.done,!a;){A=B.value,I=!1;try{let f=A;if(!f)continue;(r=f?.messages)===null||r===void 0||r.forEach(Q=>{var y;((y=Q.sender)===null||y===void 0?void 0:y.sender_type)==="ASSISTANT"&&(c=Q)})}finally{I=!0}}}catch(f){e={error:f}}finally{try{!I&&!a&&(i=d.return)&&(yield i.call(d))}finally{if(e)throw e.error}}if(!c)throw this.logger.error("no aily reply"),Co.ERROR;return c})}createWithStream(t,o){return h(this,void 0,void 0,function*(){let{ailySessionId:a,runId:e,messageId:i}=yield this.waitReply(t,o),A=()=>this.client.aily.v1.ailySessionAilyMessage.listWithIterator({path:{aily_session_id:a},params:{run_id:e,with_partial_message:!0}},o),r=!1;return{[Symbol.asyncIterator](){return j(this,arguments,function*(){var c,I,d,B;try{for(var f=!0,Q=V6(yield S(A())),y;y=yield S(Q.next()),c=y.done,!c;){B=y.value,f=!1;try{let m=B;if(!m)continue;for(let _ of m.messages||[])if(r){if(yield yield S(_),_.status==="COMPLETED")return yield S(void 0)}else _.id===i&&_.status==="COMPLETED"&&(r=!0)}finally{f=!0}}}catch(m){I={error:m}}finally{try{!f&&!c&&(d=Q.return)&&(yield S(d.call(Q)))}finally{if(I)throw I.error}}})}}})}getRecords(){return h(this,void 0,void 0,function*(){return(yield this.cache.get(Z6))||{}})}updateRecords(t){return h(this,void 0,void 0,function*(){yield this.cache.set(Z6,t)})}};function kC(n,t){if(typeof n!="object"||n===null||Array.isArray(n))throw new Error(`${t} must be an object`)}function vC(n,t,o){for(let a of Object.keys(n))if(!t.includes(a))throw new Error(`${o}.${a} is not allowed; allowed keys: ${t.join(", ")}`)}function Uke(n,t){if(n!==void 0){if(!Array.isArray(n))throw new Error(`${t} must be an array of strings`);return n.forEach((o,a)=>{if(typeof o!="string"||o==="")throw new Error(`${t}[${a}] must be a non-empty string`)}),n}}function Hke(n){kC(n,"addons"),vC(n,["preset","scopes","events","callbacks"],"addons");let t=0,o=(e,i)=>{var A;let r=Uke(e,i);return t+=(A=r?.length)!==null&&A!==void 0?A:0,r},a={};if(n.preset!==void 0){if(typeof n.preset!="boolean")throw new Error("addons.preset must be a boolean");a.preset=n.preset}if(n.scopes!==void 0&&(kC(n.scopes,"addons.scopes"),vC(n.scopes,["tenant","user"],"addons.scopes"),a.scopes={tenant:o(n.scopes.tenant,"addons.scopes.tenant"),user:o(n.scopes.user,"addons.scopes.user")}),n.events!==void 0&&(kC(n.events,"addons.events"),vC(n.events,["items"],"addons.events"),n.events.items!==void 0&&(kC(n.events.items,"addons.events.items"),vC(n.events.items,["tenant","user"],"addons.events.items"),a.events={items:{tenant:o(n.events.items.tenant,"addons.events.items.tenant"),user:o(n.events.items.user,"addons.events.items.user")}})),n.callbacks!==void 0&&(kC(n.callbacks,"addons.callbacks"),vC(n.callbacks,["items"],"addons.callbacks"),a.callbacks={items:o(n.callbacks.items,"addons.callbacks.items")}),t===0&&n.preset!==!1)throw new Error("addons must contain at least one scope, event or callback");return a}function Kke(n){let t=JSON.stringify(Hke(n));return lke(Buffer.from(t,"utf8")).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function PC(n,t){return{code:n,description:t}}var $6="node-sdk",xke="accounts.feishu.cn",Yke="accounts.larksuite.com",jke="/oauth/v1/app/registration",e5=6;function Jke(n,t){let{avatar:o,name:a,desc:e}=t;if(o!==void 0){let i=Array.isArray(o)?o:[o];if(i.length===0)throw new Error("appPreset.avatar must contain at least 1 URL");if(i.length>e5)throw new Error(`appPreset.avatar supports at most ${e5} URLs, got ${i.length}`);i.forEach((A,r)=>{if(typeof A!="string"||A==="")throw new Error(`appPreset.avatar[${r}] must be a non-empty string`);n.searchParams.append("avatar",A)})}a!==void 0&&n.searchParams.set("name",a),e!==void 0&&n.searchParams.set("desc",e)}function w5(n,t){var o;return h(this,void 0,void 0,function*(){try{return yield gh.post(`${n}${jke}`,new URLSearchParams(t).toString(),{headers:{"Content-Type":"application/x-www-form-urlencoded"}})}catch(a){if(a instanceof UN&&(!((o=a.response)===null||o===void 0)&&o.data))return a.response.data;throw a}})}function qke(n){return w5(n,{action:"begin",archetype:"PersonalAgent",auth_method:"client_secret",request_user_info:"open_id"})}function zke(n){return new Promise((t,o)=>{var a,e;let{baseUrl:i,interval:A}=n,r=!1,s=null,g=null,c=()=>{var B;s!==null&&(clearTimeout(s),s=null),g!==null&&(clearTimeout(g),g=null),(B=n.signal)===null||B===void 0||B.removeEventListener("abort",I)},I=()=>{c(),o(PC("abort","Registration was aborted"))};if(!((a=n.signal)===null||a===void 0)&&a.aborted)return o(PC("abort","Registration was aborted"));(e=n.signal)===null||e===void 0||e.addEventListener("abort",I,{once:!0}),g=setTimeout(()=>{c(),o(PC("expired_token","Polling timed out"))},n.expireIn);let d=()=>h(this,void 0,void 0,function*(){var B,f,Q,y,m,_;try{let T=yield w5(i,{action:"poll",device_code:n.deviceCode});if(((B=T.user_info)===null||B===void 0?void 0:B.tenant_brand)==="lark"&&!r){i=n.larkBaseUrl,r=!0,(f=n.onStatusChange)===null||f===void 0||f.call(n,{status:"domain_switched"}),d();return}if(T.client_id&&T.client_secret){c(),t({client_id:T.client_id,client_secret:T.client_secret,user_info:T.user_info});return}switch(T.error){case"authorization_pending":(Q=n.onStatusChange)===null||Q===void 0||Q.call(n,{status:"polling"});break;case"slow_down":A+=5e3,(y=n.onStatusChange)===null||y===void 0||y.call(n,{status:"slow_down",interval:A/1e3});break;case"access_denied":case"expired_token":c(),o(PC(T.error,(m=T.error_description)!==null&&m!==void 0?m:"Unknown error"));return;default:if(T.error){c(),o(PC(T.error,(_=T.error_description)!==null&&_!==void 0?_:"Unknown error"));return}break}s=setTimeout(d,A)}catch(T){c(),o(T)}});d()})}function Vke(n){var t,o,a,e;return h(this,void 0,void 0,function*(){let{domain:i,source:A,signal:r,onQRCodeReady:s,onStatusChange:g,appPreset:c,addons:I,createOnly:d,appId:B}=n;if(B!==void 0&&(typeof B!="string"||B===""))throw new Error("appId must be a non-empty string");let f=`https://${i??xke}`,Q=yield qke(f),y=new URL(Q.verification_uri_complete);return y.searchParams.set("from","sdk"),y.searchParams.set("source",A?`${$6}/${A}`:$6),y.searchParams.set("tp","sdk"),c&&Jke(y,c),I&&y.searchParams.set("addons",Kke(I)),d===!0&&y.searchParams.set("createOnly","true"),B&&y.searchParams.set("clientID",B),s({url:y.toString(),expireIn:(t=Q.expires_in)!==null&&t!==void 0?t:600}),zke({baseUrl:f,deviceCode:Q.device_code,interval:((o=Q.interval)!==null&&o!==void 0?o:5)*1e3,expireIn:((a=Q.expires_in)!==null&&a!==void 0?a:600)*1e3,larkBaseUrl:`https://${(e=n.larkDomain)!==null&&e!==void 0?e:Yke}`,signal:r,onStatusChange:g})})}var Kt=class extends Error{constructor(t,o,a){super(o),this.name="LarkChannelError",this.code=t,this.cause=a?.cause,this.context=a?.context}},kS=class{constructor(t,o){this.opts=t,this.fire=o,this.pendingChars=0,this.lastFireAt=0}note(t){if(this.pendingChars+=t,this.pendingChars>=this.opts.chars){this.fireSoon(0);return}if(!this.timer){let o=Date.now()-this.lastFireAt,a=Math.max(0,this.opts.ms-o);this.fireSoon(a)}}fireSoon(t){this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.timer=void 0,this.doFire()},t)}flushNow(){return h(this,void 0,void 0,function*(){this.timer&&(clearTimeout(this.timer),this.timer=void 0),this.inFlight&&(yield this.inFlight),yield this.doFire()})}doFire(){return h(this,void 0,void 0,function*(){if(this.inFlight){this.fireSoon(this.opts.ms);return}let t=h(this,void 0,void 0,function*(){this.pendingChars=0,this.lastFireAt=Date.now(),yield this.fire()});this.inFlight=t;try{yield t}finally{this.inFlight=void 0}})}dispose(){this.timer&&(clearTimeout(this.timer),this.timer=void 0)}},vS=class{constructor(){this.tail=Promise.resolve()}enqueue(t){let o=this.tail.then(t,t);return this.tail=o.then(()=>{},()=>{}),o}drain(){return this.tail}};function Wke(n,t){if(!n)return t;if(!t)return n;if(t.startsWith(n))return t;if(n.startsWith(t))return n;let o=Math.min(n.length,t.length);for(let a=o;a>0;a--)if(n.endsWith(t.substring(0,a)))return n+t.substring(a);return n+t}function D5(n,t){if(n.length<=t)return[n];let o=n.split(` `),a=[],e=[],i=0,A=null,r=()=>{if(e.length===0)return;let s=e.join(` -`);A!==null&&(s+="\n```"),a.push(s),e=[],i=0,A!==null&&(e.push("```"+A),i=e[0].length)};for(let s of o){let g=s.match(/^```(\w*)$/),c=s.length+(e.length>0?1:0),I=/^#{1,6}\s/.test(s),d=i>t*.75;(i+c>t||I&&d&&e.length>0)&&r(),e.push(s),i+=c,g&&(A=A===null?g[1]||"":null)}return r(),a}var Jke=100,qke=50,zke="Thinking...",X6="(no content)",Vke="[Generating...]",Wke=50,Zke=` +`);A!==null&&(s+="\n```"),a.push(s),e=[],i=0,A!==null&&(e.push("```"+A),i=e[0].length)};for(let s of o){let g=s.match(/^```(\w*)$/),c=s.length+(e.length>0?1:0),I=/^#{1,6}\s/.test(s),d=i>t*.75;(i+c>t||I&&d&&e.length>0)&&r(),e.push(s),i+=c,g&&(A=A===null?g[1]||"":null)}return r(),a}var Zke=100,Xke=50,$ke="Thinking...",A5="(no content)",eve="[Generating...]",Ave=50,tve=` -\u2014 _(Generation interrupted)_`,Xke=3e4,QS="stream_md";function Bk(n,t=Wke){if(!n)return"";let o=n.replace(/\s+/g," ").trim();return o.length<=t?o:o.slice(0,t-1)+"\u2026"}function $6(n){return{schema:"2.0",config:{streaming_mode:!0,summary:{content:Vke},streaming_config:{print_frequency_ms:{default:70},print_step:{default:1},print_strategy:"fast"}},body:{elements:[{tag:"markdown",element_id:QS,content:n}]}}}var PP=class{constructor(t,o,a,e){var i,A,r;this.sender=t,this.to=o,this.idType=a,this.opts=e,this.content="",this.fullAccumulated="",this._messageId="",this.cardId="",this.sequence=0,this.queue=new kS,this.started=!1,this.streamingFailed=!1,this.rolloverMessageIds=[];let s=this.sender.config;this.throttle=new RS({ms:(i=s.streamThrottleMs)!==null&&i!==void 0?i:Jke,chars:(A=s.streamThrottleChars)!==null&&A!==void 0?A:qke},()=>this.pushContent()),this.maxChars=(r=s.streamMaxElementChars)!==null&&r!==void 0?r:Xke}get messageId(){return this._messageId}append(t){return h(this,void 0,void 0,function*(){if(!t)return;yield this.ensureStarted();let o=jke(this.fullAccumulated,t),a=o.slice(this.fullAccumulated.length);this.fullAccumulated=o,this.content+=a,this.throttle.note(t.length)})}setContent(t){return h(this,void 0,void 0,function*(){yield this.ensureStarted(),this.fullAccumulated=t??"",this.content=t??"",this.throttle.note(Number.MAX_SAFE_INTEGER)})}run(t){return h(this,void 0,void 0,function*(){yield this.ensureStarted();try{yield t(this)}catch(o){throw yield this.failTerminal(o),o}return yield this.completeTerminal(),{messageId:this._messageId}})}ensureStarted(){var t;return h(this,void 0,void 0,function*(){if(this.started)return;this.started=!0;let o=(t=this.sender.config.streamInitialText)!==null&&t!==void 0?t:zke,a=$6(o||"...");this.cardId=yield this.sender.createCardInstance(a),this._messageId=yield this.sender.sendCardByReference(this.to,this.idType,this.cardId,this.opts)})}pushContent(){return h(this,void 0,void 0,function*(){!this.cardId||this.streamingFailed||(yield this.queue.enqueue(()=>h(this,void 0,void 0,function*(){var t,o;if(!this.streamingFailed)try{yield this.pushSnapshot()}catch(a){this.streamingFailed=!0,(o=(t=this.sender.logger).warn)===null||o===void 0||o.call(t,"[stream] update failed",a)}})))})}pushSnapshot(){return h(this,void 0,void 0,function*(){for(;this.content.length>this.maxChars;)yield this.rollover();let t=this.content||"...";yield this.sender.updateCardElementContent(this.cardId,QS,t,++this.sequence)})}rollover(){return h(this,void 0,void 0,function*(){let t=m5(this.content,this.maxChars);if(t.length<2)throw new Error("rollover: content not splittable below limit");let o=t[0],a=t.slice(1).join(` -`);yield this.sender.updateCardElementContent(this.cardId,QS,o,++this.sequence);try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,Bk(o))}catch{}let e=$6(a||"..."),i=yield this.sender.createCardInstance(e),A=yield this.sender.sendCardByReference(this.to,this.idType,i,this.opts);this.cardId=i,this.content=a,this.sequence=0,this.rolloverMessageIds.push(A)})}completeTerminal(){var t,o;return h(this,void 0,void 0,function*(){if(yield this.throttle.flushNow(),yield this.queue.drain(),!!this.cardId){!this.content&&!this.streamingFailed&&(yield this.queue.enqueue(()=>h(this,void 0,void 0,function*(){try{yield this.sender.updateCardElementContent(this.cardId,QS,X6,++this.sequence)}catch{}})),yield this.queue.drain());try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,Bk(this.content||X6))}catch(a){(o=(t=this.sender.logger).warn)===null||o===void 0||o.call(t,"[stream] finishStreamingCard failed",a)}}})}failTerminal(t){return h(this,void 0,void 0,function*(){if(this.throttle.dispose(),!!this.cardId){this.content=(this.content||"")+Zke,yield this.queue.enqueue(()=>h(this,void 0,void 0,function*(){try{yield this.pushSnapshot()}catch{}})),yield this.queue.drain();try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,Bk(this.content))}catch{}}})}},GP=class{constructor(t,o,a,e){this.impl=new PP(t,o,a,e)}run(t){return this.impl.run(t)}},$ke=100,eve=50,FP=class{constructor(t,o,a,e,i){var A,r;this.sender=t,this.to=o,this.idType=a,this.opts=e,this._messageId="",this.queue=new kS,this._current=i;let s=t.config;this.throttle=new RS({ms:(A=s.streamThrottleMs)!==null&&A!==void 0?A:$ke,chars:(r=s.streamThrottleChars)!==null&&r!==void 0?r:eve},()=>this.patch())}get messageId(){return this._messageId}get current(){return this._current}update(t){return h(this,void 0,void 0,function*(){let o=typeof t=="function"?t(this._current):t;this._current=o,this.throttle.note(JSON.stringify(o).length)})}run(t){return h(this,void 0,void 0,function*(){yield this.sendInitial();try{yield t(this)}catch(o){throw yield this.failTerminal(o),o}return yield this.completeTerminal(),{messageId:this._messageId}})}sendInitial(){return h(this,void 0,void 0,function*(){let t=yield this.sender.sendOneWithFallback({to:this.to,idType:this.idType,msgType:"interactive",content:this._current,replyTo:this.opts.replyTo,replyInThread:this.opts.replyInThread});this._messageId=t})}patch(){return h(this,void 0,void 0,function*(){if(!this._messageId)return;let t=this._current;yield this.queue.enqueue(()=>h(this,void 0,void 0,function*(){yield this.sender.patchCard(this._messageId,t)}))})}completeTerminal(){return h(this,void 0,void 0,function*(){yield this.throttle.flushNow(),yield this.queue.drain()})}failTerminal(t){return h(this,void 0,void 0,function*(){this.throttle.dispose();let o=Ave(this._current);yield this.queue.enqueue(()=>h(this,void 0,void 0,function*(){try{yield this.sender.patchCard(this._messageId,o)}catch{}})),yield this.queue.drain()})}};function Ave(n){let t=n,o=Array.isArray(t?.elements)?[...t.elements]:[];return o.push({tag:"note",elements:[{tag:"plain_text",content:"\u26A0\uFE0F \u751F\u6210\u4E2D\u65AD"}]}),Object.assign(Object.assign({},n),{elements:o})}var LP=class{constructor(t,o,a,e,i){this.impl=new FP(t,o,a,e,i)}run(t){return this.impl.run(t)}};function tve(n){if(!(!n||n.length<27)){for(let t=n.length-27;t>=0;t--)if(n[t]===79&&n[t+1]===103&&n[t+2]===103&&n[t+3]===83){let o=n.readBigInt64LE(t+6);if(on.length)return;let e=n.readUInt8(a),i=a+4,A,r;if(e===1){if(i+28>n.length)return;A=n.readUInt32BE(i+16),r=Number(n.readBigUInt64BE(i+20))}else{if(i+16>n.length)return;A=n.readUInt32BE(i+8),r=n.readUInt32BE(i+12)}if(!(!A||!Number.isFinite(A)||!Number.isFinite(r)))return Math.round(r/A*1e3)}function e5(n,t,o,a){let e=t;for(;e+8<=o&&e+8<=n.length;){let i=n.readUInt32BE(e),A=n.slice(e+4,e+8).toString("ascii"),r=i===1?e+Number(n.readBigUInt64BE(e+8)):i===0?o:e+i;if(r<=e||r>o)return;if(A===a)return{start:i===1?e+16:e+8,end:r};e=r}}var ive=[[0,8],[167772160,8],[2130706432,8],[2851995648,16],[2886729728,12],[3232235520,16],[1681915904,10],[3221225472,24],[3221225984,24],[3323068416,15],[3325256704,24],[3405803776,24],[3758096384,4],[4026531840,4]];function ave(n,t={}){var o,a;return h(this,void 0,void 0,function*(){let e=new URL(n);if(e.protocol!=="http:"&&e.protocol!=="https:")throw new Error(`ssrf_blocked: protocol ${e.protocol}`);let i=e.hostname,A=i.startsWith("[")&&i.endsWith("]")?i.slice(1,-1):i,r=(a=(o=t.allowlist)===null||o===void 0?void 0:o.includes(A))!==null&&a!==void 0?a:!1,s;if(l5(A))s=A,r||A5(s);else{let g=yield cke.lookup(A,{all:!0});if(g.length===0)throw new Error(`ssrf_blocked: no DNS records for ${A}`);if(!r)for(let c of g)A5(c.address);s=g[0].address}return{resolvedIp:s,originalHost:A}})}function A5(n){let t=l5(n);if(t===4&&S5(n))throw new Error(`ssrf_blocked: ${n}`);if(t===6&&lve(n))throw new Error(`ssrf_blocked: ${n}`);if(t===0)throw new Error(`ssrf_blocked: not a valid IP: ${n}`)}function S5(n){let t=n.split(".").map(Number);if(t.length!==4||t.some(a=>a<0||a>255))return!0;let o=(t[0]<<24|t[1]<<16|t[2]<<8|t[3])>>>0;return ive.some(([a,e])=>{let i=e===0?0:-1<<32-e>>>0;return(o&i)===(a&i)})}var ove=[[BigInt("0xfe800000000000000000000000000000"),10],[BigInt("0xfc000000000000000000000000000000"),7],[BigInt("0xff000000000000000000000000000000"),8],[BigInt("0x01000000000000000000000000000000"),64],[BigInt("0x20010db8000000000000000000000000"),32],[BigInt("0x20010000000000000000000000000000"),32]],nve=BigInt("0xffffffffffffffffffffffff00000000"),sve=BigInt("0x00000000000000000000ffff00000000"),gve=BigInt(0),cve=BigInt("0x0064ff9b000000000000000000000000"),Ive=BigInt("0xffffffff");function lve(n){let t;try{t=dve(n)}catch{return!0}let o=t&nve;if(o===sve||o===cve||o===gve){let a=Number(t&Ive),e=[a>>>24&255,a>>>16&255,a>>>8&255,a&255].join(".");return S5(e)}return ove.some(([a,e])=>{let i=BigInt(128-e),r=(BigInt(1)<>i<!Number.isFinite(g)||g<0||g>255))throw new Error("bad v4 suffix");let r=(A[0]<<8|A[1]).toString(16),s=(A[2]<<8|A[3]).toString(16);t=t.slice(0,t.length-o[1].length)+`${r}:${s}`}let a=t.split("::");if(a.length>2)throw new Error('multiple "::"');let e;if(a.length===2){let A=a[0]?a[0].split(":"):[],r=a[1]?a[1].split(":"):[],s=8-A.length-r.length;if(s<0)throw new Error("too many groups");e=[...A,...Array(s).fill("0"),...r]}else e=t.split(":");if(e.length!==8)throw new Error("wrong group count");let i=BigInt(0);for(let A of e){if(!/^[0-9a-f]{0,4}$/.test(A))throw new Error("bad group");i=i<0&&!(yield Promise.all(r.map(d=>h(this,void 0,void 0,function*(){let B=LC.resolve(d);try{return yield it.promises.realpath(B)}catch{return B}})))).some(d=>g===d||g.startsWith(d+LC.sep)))throw new Kt("upload_failed",`file path is outside allowed directories: ${g}`);return yield it.promises.readFile(g)}catch(g){throw g instanceof Kt?g:new Kt("upload_failed",`source is neither an http(s) URL nor a readable local file: ${t}`,{cause:g})}}let e=(a=this.config)===null||a===void 0?void 0:a.ssrfGuard,i=e!==!1,A;if(i){let r=typeof e=="object"&&e?{allowlist:e.allowlist}:{};try{({resolvedIp:A}=yield ave(t,r))}catch(s){throw new Kt("ssrf_blocked",`URL blocked: ${String(s)}`,{cause:s})}}try{let r={url:t,method:"GET",responseType:"arraybuffer",timeout:15e3,maxContentLength:t5,maxBodyLength:t5};if(A){let g=hve(t,A);r.httpAgent=g,r.httpsAgent=g}let s=yield this.client.httpInstance.request(r);return Buffer.from(s)}catch(r){throw new Kt("upload_failed","fetch source URL failed",{cause:r})}})}assertNotOnPosixBlocklist(t){if(process.platform!=="win32"&&pve.some(o=>t===o.slice(0,-1)||t.startsWith(o)))throw new Kt("upload_failed",`file path is not allowed: ${t}`)}resolveDuration(t,o){if(t.duration!=null&&t.duration>0)return t.duration;let a=t.kind==="audio"?tve(o):t.kind==="video"?rve(o):void 0;if(a!=null)return a;throw new Kt("upload_failed",`duration could not be determined for ${t.kind}; pass it explicitly`)}uploadImage(t){var o,a;return h(this,void 0,void 0,function*(){try{let e=yield this.client.im.v1.image.create({data:{image_type:"message",image:t}}),i=(o=e?.image_key)!==null&&o!==void 0?o:(a=e?.data)===null||a===void 0?void 0:a.image_key;if(!i)throw new Error("image_key missing in upload response");return{kind:"image",fileKey:i}}catch(e){throw new Kt("upload_failed","image upload failed",{cause:e})}})}uploadFile(t,o,a,e){var i,A;return h(this,void 0,void 0,function*(){try{let r={file_type:o,file_name:a,file:t};e!=null&&(r.duration=e);let s=yield this.client.im.v1.file.create({data:r}),g=(i=s?.file_key)!==null&&i!==void 0?i:(A=s?.data)===null||A===void 0?void 0:A.file_key;if(!g)throw new Error("file_key missing in upload response");return{kind:o==="opus"?"audio":o==="mp4"?"video":"file",fileKey:g,durationMs:e}}catch(r){throw r instanceof Kt?r:new Kt("upload_failed","file upload failed",{cause:r})}})}};function hve(n,t){let o=n.startsWith("https:")?gke.Agent:ske.Agent,a=new o,e=t.includes(":")?6:4,i=(r,s,g)=>{g(null,t,e)},A=a.createConnection.bind(a);return a.createConnection=(r,s)=>A(Object.assign(Object.assign({},r),{lookup:i}),s),a}function w5(n){var t;if(!n?.length)return"";let o=[];for(let a of n){if(!a.openId)continue;let e=(t=a.name)!==null&&t!==void 0?t:"";o.push(`${e}`)}return o.length>0?o.join(" ")+" ":""}function Eve(n,t=1){try{return uve(n,t)}catch{return n}}function uve(n,t){let o="___CB_",a=[],e=n.replace(/(^|\n)(`{3,})([^\n]*)\n[\s\S]*?\n\2(?=\n|$)/g,(A,r="")=>{let s=A.slice(String(r).length);return`${r}${o}${a.push(s)-1}___`});return/^#{1,3} /m.test(n)&&(e=e.replace(/^#{2,6} (.+)$/gm,"##### $1"),e=e.replace(/^# (.+)$/gm,"#### $1")),t>=2?(e=e.replace(/^(#{4,5} .+)\n{1,2}(#{4,5} )/gm,`$1 +\u2014 _(Generation interrupted)_`,rve=3e4,yS="stream_md";function Bk(n,t=Ave){if(!n)return"";let o=n.replace(/\s+/g," ").trim();return o.length<=t?o:o.slice(0,t-1)+"\u2026"}function t5(n){return{schema:"2.0",config:{streaming_mode:!0,summary:{content:eve},streaming_config:{print_frequency_ms:{default:70},print_step:{default:1},print_strategy:"fast"}},body:{elements:[{tag:"markdown",element_id:yS,content:n}]}}}var PP=class{constructor(t,o,a,e){var i,A,r;this.sender=t,this.to=o,this.idType=a,this.opts=e,this.content="",this.fullAccumulated="",this._messageId="",this.cardId="",this.sequence=0,this.queue=new vS,this.started=!1,this.streamingFailed=!1,this.rolloverMessageIds=[];let s=this.sender.config;this.throttle=new kS({ms:(i=s.streamThrottleMs)!==null&&i!==void 0?i:Zke,chars:(A=s.streamThrottleChars)!==null&&A!==void 0?A:Xke},()=>this.pushContent()),this.maxChars=(r=s.streamMaxElementChars)!==null&&r!==void 0?r:rve}get messageId(){return this._messageId}append(t){return h(this,void 0,void 0,function*(){if(!t)return;yield this.ensureStarted();let o=Wke(this.fullAccumulated,t),a=o.slice(this.fullAccumulated.length);this.fullAccumulated=o,this.content+=a,this.throttle.note(t.length)})}setContent(t){return h(this,void 0,void 0,function*(){yield this.ensureStarted(),this.fullAccumulated=t??"",this.content=t??"",this.throttle.note(Number.MAX_SAFE_INTEGER)})}run(t){return h(this,void 0,void 0,function*(){yield this.ensureStarted();try{yield t(this)}catch(o){throw yield this.failTerminal(o),o}return yield this.completeTerminal(),{messageId:this._messageId}})}ensureStarted(){var t;return h(this,void 0,void 0,function*(){if(this.started)return;this.started=!0;let o=(t=this.sender.config.streamInitialText)!==null&&t!==void 0?t:$ke,a=t5(o||"...");this.cardId=yield this.sender.createCardInstance(a),this._messageId=yield this.sender.sendCardByReference(this.to,this.idType,this.cardId,this.opts)})}pushContent(){return h(this,void 0,void 0,function*(){!this.cardId||this.streamingFailed||(yield this.queue.enqueue(()=>h(this,void 0,void 0,function*(){var t,o;if(!this.streamingFailed)try{yield this.pushSnapshot()}catch(a){this.streamingFailed=!0,(o=(t=this.sender.logger).warn)===null||o===void 0||o.call(t,"[stream] update failed",a)}})))})}pushSnapshot(){return h(this,void 0,void 0,function*(){for(;this.content.length>this.maxChars;)yield this.rollover();let t=this.content||"...";yield this.sender.updateCardElementContent(this.cardId,yS,t,++this.sequence)})}rollover(){return h(this,void 0,void 0,function*(){let t=D5(this.content,this.maxChars);if(t.length<2)throw new Error("rollover: content not splittable below limit");let o=t[0],a=t.slice(1).join(` +`);yield this.sender.updateCardElementContent(this.cardId,yS,o,++this.sequence);try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,Bk(o))}catch{}let e=t5(a||"..."),i=yield this.sender.createCardInstance(e),A=yield this.sender.sendCardByReference(this.to,this.idType,i,this.opts);this.cardId=i,this.content=a,this.sequence=0,this.rolloverMessageIds.push(A)})}completeTerminal(){var t,o;return h(this,void 0,void 0,function*(){if(yield this.throttle.flushNow(),yield this.queue.drain(),!!this.cardId){!this.content&&!this.streamingFailed&&(yield this.queue.enqueue(()=>h(this,void 0,void 0,function*(){try{yield this.sender.updateCardElementContent(this.cardId,yS,A5,++this.sequence)}catch{}})),yield this.queue.drain());try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,Bk(this.content||A5))}catch(a){(o=(t=this.sender.logger).warn)===null||o===void 0||o.call(t,"[stream] finishStreamingCard failed",a)}}})}failTerminal(t){return h(this,void 0,void 0,function*(){if(this.throttle.dispose(),!!this.cardId){this.content=(this.content||"")+tve,yield this.queue.enqueue(()=>h(this,void 0,void 0,function*(){try{yield this.pushSnapshot()}catch{}})),yield this.queue.drain();try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,Bk(this.content))}catch{}}})}},GP=class{constructor(t,o,a,e){this.impl=new PP(t,o,a,e)}run(t){return this.impl.run(t)}},ive=100,ave=50,FP=class{constructor(t,o,a,e,i){var A,r;this.sender=t,this.to=o,this.idType=a,this.opts=e,this._messageId="",this.queue=new vS,this._current=i;let s=t.config;this.throttle=new kS({ms:(A=s.streamThrottleMs)!==null&&A!==void 0?A:ive,chars:(r=s.streamThrottleChars)!==null&&r!==void 0?r:ave},()=>this.patch())}get messageId(){return this._messageId}get current(){return this._current}update(t){return h(this,void 0,void 0,function*(){let o=typeof t=="function"?t(this._current):t;this._current=o,this.throttle.note(JSON.stringify(o).length)})}run(t){return h(this,void 0,void 0,function*(){yield this.sendInitial();try{yield t(this)}catch(o){throw yield this.failTerminal(o),o}return yield this.completeTerminal(),{messageId:this._messageId}})}sendInitial(){return h(this,void 0,void 0,function*(){let t=yield this.sender.sendOneWithFallback({to:this.to,idType:this.idType,msgType:"interactive",content:this._current,replyTo:this.opts.replyTo,replyInThread:this.opts.replyInThread});this._messageId=t})}patch(){return h(this,void 0,void 0,function*(){if(!this._messageId)return;let t=this._current;yield this.queue.enqueue(()=>h(this,void 0,void 0,function*(){yield this.sender.patchCard(this._messageId,t)}))})}completeTerminal(){return h(this,void 0,void 0,function*(){yield this.throttle.flushNow(),yield this.queue.drain()})}failTerminal(t){return h(this,void 0,void 0,function*(){this.throttle.dispose();let o=ove(this._current);yield this.queue.enqueue(()=>h(this,void 0,void 0,function*(){try{yield this.sender.patchCard(this._messageId,o)}catch{}})),yield this.queue.drain()})}};function ove(n){let t=n,o=Array.isArray(t?.elements)?[...t.elements]:[];return o.push({tag:"note",elements:[{tag:"plain_text",content:"\u26A0\uFE0F \u751F\u6210\u4E2D\u65AD"}]}),Object.assign(Object.assign({},n),{elements:o})}var LP=class{constructor(t,o,a,e,i){this.impl=new FP(t,o,a,e,i)}run(t){return this.impl.run(t)}};function nve(n){if(!(!n||n.length<27)){for(let t=n.length-27;t>=0;t--)if(n[t]===79&&n[t+1]===103&&n[t+2]===103&&n[t+3]===83){let o=n.readBigInt64LE(t+6);if(on.length)return;let e=n.readUInt8(a),i=a+4,A,r;if(e===1){if(i+28>n.length)return;A=n.readUInt32BE(i+16),r=Number(n.readBigUInt64BE(i+20))}else{if(i+16>n.length)return;A=n.readUInt32BE(i+8),r=n.readUInt32BE(i+12)}if(!(!A||!Number.isFinite(A)||!Number.isFinite(r)))return Math.round(r/A*1e3)}function r5(n,t,o,a){let e=t;for(;e+8<=o&&e+8<=n.length;){let i=n.readUInt32BE(e),A=n.slice(e+4,e+8).toString("ascii"),r=i===1?e+Number(n.readBigUInt64BE(e+8)):i===0?o:e+i;if(r<=e||r>o)return;if(A===a)return{start:i===1?e+16:e+8,end:r};e=r}}var gve=[[0,8],[167772160,8],[2130706432,8],[2851995648,16],[2886729728,12],[3232235520,16],[1681915904,10],[3221225472,24],[3221225984,24],[3323068416,15],[3325256704,24],[3405803776,24],[3758096384,4],[4026531840,4]];function cve(n,t={}){var o,a;return h(this,void 0,void 0,function*(){let e=new URL(n);if(e.protocol!=="http:"&&e.protocol!=="https:")throw new Error(`ssrf_blocked: protocol ${e.protocol}`);let i=e.hostname,A=i.startsWith("[")&&i.endsWith("]")?i.slice(1,-1):i,r=(a=(o=t.allowlist)===null||o===void 0?void 0:o.includes(A))!==null&&a!==void 0?a:!1,s;if(h5(A))s=A,r||i5(s);else{let g=yield hke.lookup(A,{all:!0});if(g.length===0)throw new Error(`ssrf_blocked: no DNS records for ${A}`);if(!r)for(let c of g)i5(c.address);s=g[0].address}return{resolvedIp:s,originalHost:A}})}function i5(n){let t=h5(n);if(t===4&&O5(n))throw new Error(`ssrf_blocked: ${n}`);if(t===6&&uve(n))throw new Error(`ssrf_blocked: ${n}`);if(t===0)throw new Error(`ssrf_blocked: not a valid IP: ${n}`)}function O5(n){let t=n.split(".").map(Number);if(t.length!==4||t.some(a=>a<0||a>255))return!0;let o=(t[0]<<24|t[1]<<16|t[2]<<8|t[3])>>>0;return gve.some(([a,e])=>{let i=e===0?0:-1<<32-e>>>0;return(o&i)===(a&i)})}var Ive=[[BigInt("0xfe800000000000000000000000000000"),10],[BigInt("0xfc000000000000000000000000000000"),7],[BigInt("0xff000000000000000000000000000000"),8],[BigInt("0x01000000000000000000000000000000"),64],[BigInt("0x20010db8000000000000000000000000"),32],[BigInt("0x20010000000000000000000000000000"),32]],lve=BigInt("0xffffffffffffffffffffffff00000000"),dve=BigInt("0x00000000000000000000ffff00000000"),pve=BigInt(0),hve=BigInt("0x0064ff9b000000000000000000000000"),Eve=BigInt("0xffffffff");function uve(n){let t;try{t=Cve(n)}catch{return!0}let o=t&lve;if(o===dve||o===hve||o===pve){let a=Number(t&Eve),e=[a>>>24&255,a>>>16&255,a>>>8&255,a&255].join(".");return O5(e)}return Ive.some(([a,e])=>{let i=BigInt(128-e),r=(BigInt(1)<>i<!Number.isFinite(g)||g<0||g>255))throw new Error("bad v4 suffix");let r=(A[0]<<8|A[1]).toString(16),s=(A[2]<<8|A[3]).toString(16);t=t.slice(0,t.length-o[1].length)+`${r}:${s}`}let a=t.split("::");if(a.length>2)throw new Error('multiple "::"');let e;if(a.length===2){let A=a[0]?a[0].split(":"):[],r=a[1]?a[1].split(":"):[],s=8-A.length-r.length;if(s<0)throw new Error("too many groups");e=[...A,...Array(s).fill("0"),...r]}else e=t.split(":");if(e.length!==8)throw new Error("wrong group count");let i=BigInt(0);for(let A of e){if(!/^[0-9a-f]{0,4}$/.test(A))throw new Error("bad group");i=i<0&&!(yield Promise.all(r.map(d=>h(this,void 0,void 0,function*(){let B=LC.resolve(d);try{return yield it.promises.realpath(B)}catch{return B}})))).some(d=>g===d||g.startsWith(d+LC.sep)))throw new Kt("upload_failed",`file path is outside allowed directories: ${g}`);return yield it.promises.readFile(g)}catch(g){throw g instanceof Kt?g:new Kt("upload_failed",`source is neither an http(s) URL nor a readable local file: ${t}`,{cause:g})}}let e=(a=this.config)===null||a===void 0?void 0:a.ssrfGuard,i=e!==!1,A;if(i){let r=typeof e=="object"&&e?{allowlist:e.allowlist}:{};try{({resolvedIp:A}=yield cve(t,r))}catch(s){throw new Kt("ssrf_blocked",`URL blocked: ${String(s)}`,{cause:s})}}try{let r={url:t,method:"GET",responseType:"arraybuffer",timeout:15e3,maxContentLength:a5,maxBodyLength:a5};if(A){let g=fve(t,A);r.httpAgent=g,r.httpsAgent=g}let s=yield this.client.httpInstance.request(r);return Buffer.from(s)}catch(r){throw new Kt("upload_failed","fetch source URL failed",{cause:r})}})}assertNotOnPosixBlocklist(t){if(process.platform!=="win32"&&Bve.some(o=>t===o.slice(0,-1)||t.startsWith(o)))throw new Kt("upload_failed",`file path is not allowed: ${t}`)}resolveDuration(t,o){if(t.duration!=null&&t.duration>0)return t.duration;let a=t.kind==="audio"?nve(o):t.kind==="video"?sve(o):void 0;if(a!=null)return a;throw new Kt("upload_failed",`duration could not be determined for ${t.kind}; pass it explicitly`)}uploadImage(t){var o,a;return h(this,void 0,void 0,function*(){try{let e=yield this.client.im.v1.image.create({data:{image_type:"message",image:t}}),i=(o=e?.image_key)!==null&&o!==void 0?o:(a=e?.data)===null||a===void 0?void 0:a.image_key;if(!i)throw new Error("image_key missing in upload response");return{kind:"image",fileKey:i}}catch(e){throw new Kt("upload_failed","image upload failed",{cause:e})}})}uploadFile(t,o,a,e){var i,A;return h(this,void 0,void 0,function*(){try{let r={file_type:o,file_name:a,file:t};e!=null&&(r.duration=e);let s=yield this.client.im.v1.file.create({data:r}),g=(i=s?.file_key)!==null&&i!==void 0?i:(A=s?.data)===null||A===void 0?void 0:A.file_key;if(!g)throw new Error("file_key missing in upload response");return{kind:o==="opus"?"audio":o==="mp4"?"video":"file",fileKey:g,durationMs:e}}catch(r){throw r instanceof Kt?r:new Kt("upload_failed","file upload failed",{cause:r})}})}};function fve(n,t){let o=n.startsWith("https:")?pke.Agent:dke.Agent,a=new o,e=t.includes(":")?6:4,i=(r,s,g)=>{g(null,t,e)},A=a.createConnection.bind(a);return a.createConnection=(r,s)=>A(Object.assign(Object.assign({},r),{lookup:i}),s),a}function b5(n){var t;if(!n?.length)return"";let o=[];for(let a of n){if(!a.openId)continue;let e=(t=a.name)!==null&&t!==void 0?t:"";o.push(`${e}`)}return o.length>0?o.join(" ")+" ":""}function Qve(n,t=1){try{return yve(n,t)}catch{return n}}function yve(n,t){let o="___CB_",a=[],e=n.replace(/(^|\n)(`{3,})([^\n]*)\n[\s\S]*?\n\2(?=\n|$)/g,(A,r="")=>{let s=A.slice(String(r).length);return`${r}${o}${a.push(s)-1}___`});return/^#{1,3} /m.test(n)&&(e=e.replace(/^#{2,6} (.+)$/gm,"##### $1"),e=e.replace(/^# (.+)$/gm,"#### $1")),t>=2?(e=e.replace(/^(#{4,5} .+)\n{1,2}(#{4,5} )/gm,`$1
$2`),e=e.replace(/^([^|\n].*)\n(\|.+\|)/gm,`$1 @@ -295,148 +295,148 @@ ${A}
`)})):a.forEach((A,r)=>{e=e.replace(`${o}${r}___`,A)}),e=e.replace(/\n{3,}/g,` -`),e}function Cve(n,t){var o,a;let e=w5((o=t?.mentions)!==null&&o!==void 0?o:[]),i=Eve(e+n,1);return{zh_cn:{title:(a=t?.title)!==null&&a!==void 0?a:"",content:[[{tag:"md",text:i}]]}}}function Bve(n){var t;let o=n?.zh_cn;if(!o?.content)return"";let a=[];for(let e of o.content){if(!Array.isArray(e))continue;let i=[];for(let A of e)switch(A.tag){case"md":case"text":case"a":i.push((t=A.text)!==null&&t!==void 0?t:"");break;case"at":i.push(A.user_name?`@${A.user_name}`:"");break;case"img":i.push(A.image_key?"[image]":"");break}a.push(i.join(""))}return a.join(` -`).trim()}function r5(n){if(!n)throw new Error("empty receive_id");return n.startsWith("oc_")?"chat_id":n.startsWith("ou_")?"open_id":n.startsWith("on_")?"union_id":n.includes("@")?"email":"user_id"}function rG(n,t){if(n instanceof Kt)return n;let o=fve(n),a=Qve(n);return new Kt(o,a,{cause:n,context:t})}function fve(n){var t,o,a,e,i,A,r,s;let g=n,c=(o=(t=g?.response)===null||t===void 0?void 0:t.status)!==null&&o!==void 0?o:g?.status,I=(r=(i=(e=(a=g?.response)===null||a===void 0?void 0:a.data)===null||e===void 0?void 0:e.code)!==null&&i!==void 0?i:(A=g?.data)===null||A===void 0?void 0:A.code)!==null&&r!==void 0?r:g?.code,d=String((s=g?.message)!==null&&s!==void 0?s:"").toLowerCase();if(typeof I=="number"){if(I===230020||I===230017)return"target_revoked";if(I===99991400||I===99991401)return"permission_denied";if(I===230002||I===230001)return"format_error"}return c===429?"rate_limited":c===401||c===403?"permission_denied":c===400?"format_error":c===404?"target_revoked":d.startsWith("ssrf_blocked")?"ssrf_blocked":d.includes("timeout")||g?.code==="ETIMEDOUT"||g?.code==="ECONNABORTED"?"send_timeout":"unknown"}function Qve(n){var t,o,a,e;let i=n;return((o=(t=i?.response)===null||t===void 0?void 0:t.data)===null||o===void 0?void 0:o.msg)||((e=(a=i?.response)===null||a===void 0?void 0:a.data)===null||e===void 0?void 0:e.message)||i?.message||String(n)}function yve(n){return n.code==="rate_limited"||n.code==="unknown"}function mve(n){return n.code==="format_error"}function Sve(n){return n.code==="target_revoked"}function wve(n,t={}){var o,a;return h(this,void 0,void 0,function*(){let e=(o=t.maxAttempts)!==null&&o!==void 0?o:3,i=(a=t.baseDelayMs)!==null&&a!==void 0?a:500,A;for(let r=1;r<=e;r++)try{return yield n(r)}catch(s){let g=rG(s,{attempt:r});if(A=g,r>=e||!yve(g))throw g;let c=i*Math.pow(3,r-1);yield Dve(c)}throw A})}function Dve(n){return new Promise(t=>setTimeout(t,n))}var Ove=3500,HP=class{constructor(t,o,a){var e;this.client=t,this.config=o,this.logger=a,this.uploader=new UP(t,o),this.chunkLimit=(e=o.textChunkLimit)!==null&&e!==void 0?e:Ove}send(t,o,a={}){return h(this,void 0,void 0,function*(){let e=r5(t);if("markdown"in o)return this.sendMarkdown(t,e,o.markdown,a);if("text"in o)return this.sendText(t,e,o.text,a);if("post"in o)return this.sendPost(t,e,o.post,a);if("image"in o)return this.sendImage(t,e,o.image,a);if("file"in o)return this.sendFile(t,e,o.file,a);if("audio"in o)return this.sendAudio(t,e,o.audio,a);if("video"in o)return this.sendVideo(t,e,o.video,a);if("card"in o)return this.sendCard(t,e,o.card,a);if("shareChat"in o)return this.sendShareChat(t,e,o.shareChat.chatId,a);if("shareUser"in o)return this.sendShareUser(t,e,o.shareUser.userId,a);if("sticker"in o)return this.sendSticker(t,e,o.sticker.fileKey,a);throw new Kt("format_error","unrecognized SendInput shape")})}stream(t,o,a={}){return h(this,void 0,void 0,function*(){let e=r5(t);if("markdown"in o)return new GP(this,t,e,a).run(o.markdown);if("card"in o)return new LP(this,t,e,a,o.card.initial).run(o.card.producer);throw new Kt("format_error","unrecognized StreamInput shape")})}sendMarkdown(t,o,a,e){return h(this,void 0,void 0,function*(){let i=m5(a,this.chunkLimit),A=[];for(let r=0;rthis.rawSend(t),this.config.retry)})}rawSend(t){var o,a;return h(this,void 0,void 0,function*(){let e={receive_id:t.to,msg_type:t.msgType,content:JSON.stringify(t.content)};if(t.replyTo){let s=(o=(yield this.client.im.v1.message.reply({path:{message_id:t.replyTo},data:{content:e.content,msg_type:t.msgType,reply_in_thread:t.replyInThread}})).data)===null||o===void 0?void 0:o.message_id;if(!s)throw new Kt("unknown","message_id missing from reply response");return s}let A=(a=(yield this.client.im.v1.message.create({params:{receive_id_type:t.idType},data:e})).data)===null||a===void 0?void 0:a.message_id;if(!A)throw new Kt("unknown","message_id missing from create response");return A})}patchCard(t,o){return h(this,void 0,void 0,function*(){yield this.client.im.v1.message.patch({path:{message_id:t},data:{content:JSON.stringify(o)}})})}createCardInstance(t){var o;return h(this,void 0,void 0,function*(){let e=(o=(yield this.client.cardkit.v1.card.create({data:{type:"card_json",data:JSON.stringify(t)}})).data)===null||o===void 0?void 0:o.card_id;if(!e)throw new Kt("unknown","cardkit.card.create returned no card_id");return e})}sendCardByReference(t,o,a,e){return h(this,void 0,void 0,function*(){return this.rawSendWithRetry({to:t,idType:o,msgType:"interactive",content:{type:"card",data:{card_id:a}},replyTo:e.replyTo,replyInThread:e.replyInThread})})}updateCardElementContent(t,o,a,e){return h(this,void 0,void 0,function*(){yield this.client.cardkit.v1.cardElement.content({path:{card_id:t,element_id:o},data:{content:a,sequence:e,uuid:`c_${t}_${e}`}})})}finishStreamingCard(t,o,a){return h(this,void 0,void 0,function*(){let e={streaming_mode:!1};a!==void 0&&(e.summary={content:a}),yield this.client.cardkit.v1.card.settings({path:{card_id:t},data:{settings:JSON.stringify({config:e}),sequence:o,uuid:`s_${t}_${o}`}})})}makeResult(t){return{messageId:t[0],chunkIds:t.length>1?t:void 0}}};function bve(n,t){if(n.length<=t)return[n];let o=[];for(let a=0;a=this.config.maxMessages||this.bufferChars>=this.config.maxChars){this.clearTimer(),this.enqueueFlush();return}if(this.config.delayMs<=0||this.serialOnly){this.clearTimer(),this.enqueueFlush();return}this.clearTimer();let e=this.bufferChars>=this.config.longThresholdChars?this.config.longDelayMs:this.config.delayMs;this.timer=setTimeout(()=>{this.timer=void 0,this.enqueueFlush()},e)}run(t){this.buffer.length>0&&(this.clearTimer(),this.enqueueFlush());let o=this.tail.then(t,t);return this.tail=o.then(()=>{},()=>{}),o}flushNow(){return h(this,void 0,void 0,function*(){this.buffer.length>0&&(this.clearTimer(),this.enqueueFlush()),yield this.tail})}isIdle(){return this.buffer.length===0&&!this.timer}dispose(){this.clearTimer(),this.buffer=[],this.pendingHandler=void 0}clearTimer(){this.timer&&(clearTimeout(this.timer),this.timer=void 0)}enqueueFlush(){if(this.buffer.length===0)return;let t=this.buffer,o=this.pendingHandler;if(this.buffer=[],this.bufferChars=0,this.pendingHandler=void 0,!o)return;let a={message:Mve(t),sourceIds:t.map(A=>A.messageId)},e=()=>o(a),i=this.tail.then(e,e);this.tail=i.then(()=>{},()=>{})}},xP=class{constructor(t){this.config=t,this.pipelines=new Map}push(t,o,a){this.getOrCreate(t,!1).push(o,a)}run(t,o){return this.getOrCreate(t,!0).run(o)}getOrCreate(t,o){let a=this.pipelines.get(t);return a||(a=new KP(this.config,o),this.pipelines.set(t,a)),a}flushAll(){return h(this,void 0,void 0,function*(){yield Promise.all([...this.pipelines.values()].map(t=>t.flushNow()))})}dispose(){return h(this,void 0,void 0,function*(){yield this.flushAll();for(let t of this.pipelines.values())t.dispose();this.pipelines.clear()})}};function Mve(n){if(n.length===1)return n[0];let t=n[n.length-1],o=n.map(i=>i.content).filter(i=>i&&i.length>0).join(` +`),e}function mve(n,t){var o,a;let e=b5((o=t?.mentions)!==null&&o!==void 0?o:[]),i=Qve(e+n,1);return{zh_cn:{title:(a=t?.title)!==null&&a!==void 0?a:"",content:[[{tag:"md",text:i}]]}}}function Sve(n){var t;let o=n?.zh_cn;if(!o?.content)return"";let a=[];for(let e of o.content){if(!Array.isArray(e))continue;let i=[];for(let A of e)switch(A.tag){case"md":case"text":case"a":i.push((t=A.text)!==null&&t!==void 0?t:"");break;case"at":i.push(A.user_name?`@${A.user_name}`:"");break;case"img":i.push(A.image_key?"[image]":"");break}a.push(i.join(""))}return a.join(` +`).trim()}function o5(n){if(!n)throw new Error("empty receive_id");return n.startsWith("oc_")?"chat_id":n.startsWith("ou_")?"open_id":n.startsWith("on_")?"union_id":n.includes("@")?"email":"user_id"}function rG(n,t){if(n instanceof Kt)return n;let o=wve(n),a=Dve(n);return new Kt(o,a,{cause:n,context:t})}function wve(n){var t,o,a,e,i,A,r,s;let g=n,c=(o=(t=g?.response)===null||t===void 0?void 0:t.status)!==null&&o!==void 0?o:g?.status,I=(r=(i=(e=(a=g?.response)===null||a===void 0?void 0:a.data)===null||e===void 0?void 0:e.code)!==null&&i!==void 0?i:(A=g?.data)===null||A===void 0?void 0:A.code)!==null&&r!==void 0?r:g?.code,d=String((s=g?.message)!==null&&s!==void 0?s:"").toLowerCase();if(typeof I=="number"){if(I===230020||I===230017)return"target_revoked";if(I===99991400||I===99991401)return"permission_denied";if(I===230002||I===230001)return"format_error"}return c===429?"rate_limited":c===401||c===403?"permission_denied":c===400?"format_error":c===404?"target_revoked":d.startsWith("ssrf_blocked")?"ssrf_blocked":d.includes("timeout")||g?.code==="ETIMEDOUT"||g?.code==="ECONNABORTED"?"send_timeout":"unknown"}function Dve(n){var t,o,a,e;let i=n;return((o=(t=i?.response)===null||t===void 0?void 0:t.data)===null||o===void 0?void 0:o.msg)||((e=(a=i?.response)===null||a===void 0?void 0:a.data)===null||e===void 0?void 0:e.message)||i?.message||String(n)}function Ove(n){return n.code==="rate_limited"||n.code==="unknown"}function bve(n){return n.code==="format_error"}function Mve(n){return n.code==="target_revoked"}function _ve(n,t={}){var o,a;return h(this,void 0,void 0,function*(){let e=(o=t.maxAttempts)!==null&&o!==void 0?o:3,i=(a=t.baseDelayMs)!==null&&a!==void 0?a:500,A;for(let r=1;r<=e;r++)try{return yield n(r)}catch(s){let g=rG(s,{attempt:r});if(A=g,r>=e||!Ove(g))throw g;let c=i*Math.pow(3,r-1);yield Tve(c)}throw A})}function Tve(n){return new Promise(t=>setTimeout(t,n))}var Nve=3500,HP=class{constructor(t,o,a){var e;this.client=t,this.config=o,this.logger=a,this.uploader=new UP(t,o),this.chunkLimit=(e=o.textChunkLimit)!==null&&e!==void 0?e:Nve}send(t,o,a={}){return h(this,void 0,void 0,function*(){let e=o5(t);if("markdown"in o)return this.sendMarkdown(t,e,o.markdown,a);if("text"in o)return this.sendText(t,e,o.text,a);if("post"in o)return this.sendPost(t,e,o.post,a);if("image"in o)return this.sendImage(t,e,o.image,a);if("file"in o)return this.sendFile(t,e,o.file,a);if("audio"in o)return this.sendAudio(t,e,o.audio,a);if("video"in o)return this.sendVideo(t,e,o.video,a);if("card"in o)return this.sendCard(t,e,o.card,a);if("shareChat"in o)return this.sendShareChat(t,e,o.shareChat.chatId,a);if("shareUser"in o)return this.sendShareUser(t,e,o.shareUser.userId,a);if("sticker"in o)return this.sendSticker(t,e,o.sticker.fileKey,a);throw new Kt("format_error","unrecognized SendInput shape")})}stream(t,o,a={}){return h(this,void 0,void 0,function*(){let e=o5(t);if("markdown"in o)return new GP(this,t,e,a).run(o.markdown);if("card"in o)return new LP(this,t,e,a,o.card.initial).run(o.card.producer);throw new Kt("format_error","unrecognized StreamInput shape")})}sendMarkdown(t,o,a,e){return h(this,void 0,void 0,function*(){let i=D5(a,this.chunkLimit),A=[];for(let r=0;rthis.rawSend(t),this.config.retry)})}rawSend(t){var o,a;return h(this,void 0,void 0,function*(){let e={receive_id:t.to,msg_type:t.msgType,content:JSON.stringify(t.content)};if(t.replyTo){let s=(o=(yield this.client.im.v1.message.reply({path:{message_id:t.replyTo},data:{content:e.content,msg_type:t.msgType,reply_in_thread:t.replyInThread}})).data)===null||o===void 0?void 0:o.message_id;if(!s)throw new Kt("unknown","message_id missing from reply response");return s}let A=(a=(yield this.client.im.v1.message.create({params:{receive_id_type:t.idType},data:e})).data)===null||a===void 0?void 0:a.message_id;if(!A)throw new Kt("unknown","message_id missing from create response");return A})}patchCard(t,o){return h(this,void 0,void 0,function*(){yield this.client.im.v1.message.patch({path:{message_id:t},data:{content:JSON.stringify(o)}})})}createCardInstance(t){var o;return h(this,void 0,void 0,function*(){let e=(o=(yield this.client.cardkit.v1.card.create({data:{type:"card_json",data:JSON.stringify(t)}})).data)===null||o===void 0?void 0:o.card_id;if(!e)throw new Kt("unknown","cardkit.card.create returned no card_id");return e})}sendCardByReference(t,o,a,e){return h(this,void 0,void 0,function*(){return this.rawSendWithRetry({to:t,idType:o,msgType:"interactive",content:{type:"card",data:{card_id:a}},replyTo:e.replyTo,replyInThread:e.replyInThread})})}updateCardElementContent(t,o,a,e){return h(this,void 0,void 0,function*(){yield this.client.cardkit.v1.cardElement.content({path:{card_id:t,element_id:o},data:{content:a,sequence:e,uuid:`c_${t}_${e}`}})})}finishStreamingCard(t,o,a){return h(this,void 0,void 0,function*(){let e={streaming_mode:!1};a!==void 0&&(e.summary={content:a}),yield this.client.cardkit.v1.card.settings({path:{card_id:t},data:{settings:JSON.stringify({config:e}),sequence:o,uuid:`s_${t}_${o}`}})})}makeResult(t){return{messageId:t[0],chunkIds:t.length>1?t:void 0}}};function Rve(n,t){if(n.length<=t)return[n];let o=[];for(let a=0;a=this.config.maxMessages||this.bufferChars>=this.config.maxChars){this.clearTimer(),this.enqueueFlush();return}if(this.config.delayMs<=0||this.serialOnly){this.clearTimer(),this.enqueueFlush();return}this.clearTimer();let e=this.bufferChars>=this.config.longThresholdChars?this.config.longDelayMs:this.config.delayMs;this.timer=setTimeout(()=>{this.timer=void 0,this.enqueueFlush()},e)}run(t){this.buffer.length>0&&(this.clearTimer(),this.enqueueFlush());let o=this.tail.then(t,t);return this.tail=o.then(()=>{},()=>{}),o}flushNow(){return h(this,void 0,void 0,function*(){this.buffer.length>0&&(this.clearTimer(),this.enqueueFlush()),yield this.tail})}isIdle(){return this.buffer.length===0&&!this.timer}dispose(){this.clearTimer(),this.buffer=[],this.pendingHandler=void 0}clearTimer(){this.timer&&(clearTimeout(this.timer),this.timer=void 0)}enqueueFlush(){if(this.buffer.length===0)return;let t=this.buffer,o=this.pendingHandler;if(this.buffer=[],this.bufferChars=0,this.pendingHandler=void 0,!o)return;let a={message:kve(t),sourceIds:t.map(A=>A.messageId)},e=()=>o(a),i=this.tail.then(e,e);this.tail=i.then(()=>{},()=>{})}},xP=class{constructor(t){this.config=t,this.pipelines=new Map}push(t,o,a){this.getOrCreate(t,!1).push(o,a)}run(t,o){return this.getOrCreate(t,!0).run(o)}getOrCreate(t,o){let a=this.pipelines.get(t);return a||(a=new KP(this.config,o),this.pipelines.set(t,a)),a}flushAll(){return h(this,void 0,void 0,function*(){yield Promise.all([...this.pipelines.values()].map(t=>t.flushNow()))})}dispose(){return h(this,void 0,void 0,function*(){yield this.flushAll();for(let t of this.pipelines.values())t.dispose();this.pipelines.clear()})}};function kve(n){if(n.length===1)return n[0];let t=n[n.length-1],o=n.map(i=>i.content).filter(i=>i&&i.length>0).join(` -`),a=i5(n.flatMap(i=>i.resources),i=>i.fileKey),e=i5(n.flatMap(i=>i.mentions),i=>{var A;return(A=i.openId)!==null&&A!==void 0?A:i.key});return Object.assign(Object.assign({},t),{content:o,resources:a,mentions:e,mentionAll:n.some(i=>i.mentionAll),mentionedBot:n.some(i=>i.mentionedBot)})}function i5(n,t){let o=new Set,a=[];for(let e of n){let i=t(e);if(i==null){a.push(e);continue}o.has(i)||(o.add(i),a.push(e))}return a}var GC={delayMs:600,longThresholdChars:1e3,longDelayMs:2e3,maxMessages:8,maxChars:4e3},fS={ttl:12*36e5,maxEntries:5e3,sweepIntervalMs:5*6e4,namespace:"channel:seen"},D5=30*6e4,_ve=5*6e4;function Tve(n){var t,o,a,e,i,A,r;let s=(o=(t=n?.batch)===null||t===void 0?void 0:t.text)!==null&&o!==void 0?o:{};return{delayMs:(a=s.delayMs)!==null&&a!==void 0?a:GC.delayMs,longThresholdChars:(e=s.longThresholdChars)!==null&&e!==void 0?e:GC.longThresholdChars,longDelayMs:(i=s.longDelayMs)!==null&&i!==void 0?i:GC.longDelayMs,maxMessages:(A=s.maxMessages)!==null&&A!==void 0?A:GC.maxMessages,maxChars:(r=s.maxChars)!==null&&r!==void 0?r:GC.maxChars}}var YP=class{constructor(t,o={}){var a,e,i,A,r,s;this.cache=t,this.memory=new Map,this.ttlMs=(a=o.ttlMs)!==null&&a!==void 0?a:fS.ttl,this.maxMem=(e=o.maxMemEntries)!==null&&e!==void 0?e:fS.maxEntries,this.ns=(i=o.namespace)!==null&&i!==void 0?i:fS.namespace;let g=(A=o.sweepMs)!==null&&A!==void 0?A:fS.sweepIntervalMs;this.sweeper=setInterval(()=>this.sweep(),g),(s=(r=this.sweeper).unref)===null||s===void 0||s.call(r)}has(t){return h(this,void 0,void 0,function*(){let o=Date.now(),a=this.memory.get(t);return a&&a>o?(this.memory.delete(t),this.memory.set(t,a),!0):(yield this.cache.get(t,{namespace:this.ns}))?(this.memory.set(t,o+this.ttlMs),this.evictIfNeeded(),!0):!1})}add(t){return h(this,void 0,void 0,function*(){let o=Date.now()+this.ttlMs;this.memory.set(t,o),this.evictIfNeeded();try{yield this.cache.set(t,"1",o,{namespace:this.ns})}catch{}})}evictIfNeeded(){for(;this.memory.size>this.maxMem;){let t=this.memory.keys().next().value;if(t===void 0)break;this.memory.delete(t)}}sweep(){let t=Date.now();for(let[o,a]of this.memory)a<=t&&this.memory.delete(o)}dispose(){clearInterval(this.sweeper),this.memory.clear()}},jP=class{constructor(t,o){this.cfg=Object.assign({},t??{}),this.bot=o}evaluate(t){return t.chatType==="group"?this.evaluateGroup(t):this.evaluateDm(t)}evaluateGroup(t){var o,a;let e=this.cfg.groupAllowlist;return e&&e.length>0&&!e.includes(t.chatId)?{allowed:!1,reason:"group_not_allowed"}:((o=this.cfg.requireMention)!==null&&o!==void 0?o:!0)&&!t.mentionedBot?{allowed:!1,reason:"no_mention"}:t.mentionAll&&!((a=this.cfg.respondToMentionAll)!==null&&a!==void 0&&a)?{allowed:!1,reason:"mention_all_blocked"}:{allowed:!0}}evaluateDm(t){var o,a;let e=(o=this.cfg.dmMode)!==null&&o!==void 0?o:"open";return e==="disabled"?{allowed:!1,reason:"dm_disabled"}:e==="allowlist"&&!((a=this.cfg.dmAllowlist)!==null&&a!==void 0?a:[]).includes(t.senderId)?{allowed:!1,reason:"sender_not_allowed"}:{allowed:!0}}updateConfig(t){this.cfg=Object.assign(Object.assign({},this.cfg),t)}getConfig(){return this.cfg}setBotIdentity(t){this.bot=t}getBotIdentity(){return this.bot}},JP=class{constructor(t=_ve,o=6e4){var a,e;this.ttlMs=t,this.locks=new Map,this.sweeper=setInterval(()=>this.sweep(),o),(e=(a=this.sweeper).unref)===null||e===void 0||e.call(a)}acquire(t){let o=Date.now(),a=this.locks.get(t);return a&&a>o?!1:(this.locks.set(t,o+this.ttlMs),!0)}release(t){this.locks.delete(t)}sweep(){let t=Date.now();for(let[o,a]of this.locks)a<=t&&this.locks.delete(o)}dispose(){clearInterval(this.sweeper),this.locks.clear()}};function Nve(n,t=D5){return!n||!Number.isFinite(n)?!1:Date.now()-n>t}var qP=class{constructor(t){var o,a,e,i,A,r,s,g,c,I,d;this.logger=t.logger,this.onReject=t.onReject,this.onMessage=t.onMessage,this.staleWindow=(a=(o=t.config)===null||o===void 0?void 0:o.staleMessageWindowMs)!==null&&a!==void 0?a:D5,this.queueEnabled=(A=(i=(e=t.config)===null||e===void 0?void 0:e.chatQueue)===null||i===void 0?void 0:i.enabled)!==null&&A!==void 0?A:!0,this.seenCache=new YP(t.cache,{ttlMs:(s=(r=t.config)===null||r===void 0?void 0:r.dedup)===null||s===void 0?void 0:s.ttl,maxMemEntries:(c=(g=t.config)===null||g===void 0?void 0:g.dedup)===null||c===void 0?void 0:c.maxEntries,sweepMs:(d=(I=t.config)===null||I===void 0?void 0:I.dedup)===null||d===void 0?void 0:d.sweepIntervalMs}),this.lock=new JP,this.policy=new jP(t.policy,t.botIdentity),this.manager=new xP(Tve(t.config))}pushMessage(t){var o,a,e,i,A,r,s;return h(this,void 0,void 0,function*(){if(Nve(t.createTime,this.staleWindow)){(a=(o=this.logger).debug)===null||a===void 0||a.call(o,`safety: drop stale message ${t.messageId}`);return}if(yield this.seenCache.has(t.messageId)){(i=(e=this.logger).debug)===null||i===void 0||i.call(e,`safety: drop duplicate message ${t.messageId}`);return}let g=this.policy.evaluate(t);if(!g.allowed){this.onReject({messageId:t.messageId,chatId:t.chatId,senderId:t.senderId,reason:(A=g.reason)!==null&&A!==void 0?A:"group_not_allowed"});return}if(!this.lock.acquire(t.messageId)){(s=(r=this.logger).debug)===null||s===void 0||s.call(r,`safety: drop in-flight message ${t.messageId}`);return}let c=I=>h(this,void 0,void 0,function*(){var d,B;try{yield this.onMessage(I.message)}catch(f){(B=(d=this.logger).error)===null||B===void 0||B.call(d,"safety: message handler threw",f)}finally{for(let f of I.sourceIds){try{yield this.seenCache.add(f)}catch{}this.lock.release(f)}}});this.queueEnabled?this.manager.push(t.chatId,t,c):c({message:t,sourceIds:[t.messageId]})})}pushAction(t,o,a){var e,i,A,r;return h(this,void 0,void 0,function*(){if(yield this.seenCache.has(t)){(i=(e=this.logger).debug)===null||i===void 0||i.call(e,`safety: drop duplicate action ${t}`);return}if(!this.lock.acquire(t)){(r=(A=this.logger).debug)===null||r===void 0||r.call(A,`safety: drop in-flight action ${t}`);return}let s=()=>h(this,void 0,void 0,function*(){var g,c;try{yield a()}catch(I){(c=(g=this.logger).error)===null||c===void 0||c.call(g,"safety: action handler threw",I)}finally{try{yield this.seenCache.add(t)}catch{}this.lock.release(t)}});this.queueEnabled?yield this.manager.run(o,s):yield s()})}pushLight(t,o){var a,e;return h(this,void 0,void 0,function*(){if(!(yield this.seenCache.has(t))){yield this.seenCache.add(t);try{yield o()}catch(i){(e=(a=this.logger).warn)===null||e===void 0||e.call(a,"safety: light handler threw",i)}}})}updatePolicy(t){this.policy.updateConfig(t)}getPolicy(){return this.policy.getConfig()}setBotIdentity(t){this.policy.setBotIdentity(t)}dispose(){return h(this,void 0,void 0,function*(){yield this.manager.dispose(),this.seenCache.dispose(),this.lock.dispose()})}};function Rve(n){return n.key==="@_all"}function kve(n,t){var o,a,e;let i=new Map,A=new Map,r=[],s=!1,g=!1;for(let c of n??[]){if(Rve(c)){s=!0,i.set(c.key,{key:c.key,name:c.name,isBot:!1});continue}let I=(a=(o=c.id)===null||o===void 0?void 0:o.open_id)!==null&&a!==void 0?a:"",d=(e=c.id)===null||e===void 0?void 0:e.user_id,B=!!(t&&I===t);B&&(g=!0);let f={key:c.key,openId:I||void 0,userId:d,name:c.name,isBot:B};i.set(c.key,f),I&&A.set(I,f),r.push(f)}return{mentions:i,mentionsByOpenId:A,mentionList:r,mentionAll:s,mentionedBot:g}}function vve(n,t){if(!n||t.mentions.size===0)return n;let o=n;for(let[a,e]of t.mentions){if(e.isBot&&t.stripBotMentions){let A=new RegExp(`\\s?${Pve(a)}\\s?`,"g");o=o.replace(A," ");continue}let i=e.name?`@${e.name}`:a;o=o.split(a).join(i)}return o.replace(/[ \t]{2,}/g," ").trim()}function Pve(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Jr(n){if(n)try{return JSON.parse(n)}catch{return}}function Gve(n,t){if(!t||t.length===0)return n;let o=n;return t.includes("bold")&&(o=`**${o}**`),t.includes("italic")&&(o=`*${o}*`),t.includes("underline")&&(o=`${o}`),(t.includes("lineThrough")||t.includes("strikethrough"))&&(o=`~~${o}~~`),(t.includes("codeInline")||t.includes("code"))&&(o=`\`${o}\``),o}var Fve=["zh_cn","en_us","ja_jp"];function Lve(n){if("title"in n||"content"in n)return n;for(let o of Fve){let a=n[o];if(a!=null&&typeof a=="object")return a}let t=Object.keys(n)[0];if(t){let o=n[t];if(o!=null&&typeof o=="object")return o}}function O5(n){if(!(n==null||!Number.isFinite(n)||n<0))return n<1e3?`${Math.round(n)}ms`:n%1e3===0?`${n/1e3}s`:`${(n/1e3).toFixed(1)}s`}function vS(n){if(n==null)return;let t=typeof n=="string"?parseInt(n,10):n;if(!Number.isFinite(t)||t<=0)return;let o=new Date(t+8*36e5),a=o.getUTCFullYear(),e=String(o.getUTCMonth()+1).padStart(2,"0"),i=String(o.getUTCDate()).padStart(2,"0"),A=String(o.getUTCHours()).padStart(2,"0"),r=String(o.getUTCMinutes()).padStart(2,"0");return`${a}-${e}-${i} ${A}:${r}`}function Uve(n){let t=new Date(n+288e5),o=t.getUTCFullYear(),a=String(t.getUTCMonth()+1).padStart(2,"0"),e=String(t.getUTCDate()).padStart(2,"0"),i=String(t.getUTCHours()).padStart(2,"0"),A=String(t.getUTCMinutes()).padStart(2,"0"),r=String(t.getUTCSeconds()).padStart(2,"0");return`${o}-${a}-${e}T${i}:${A}:${r}+08:00`}function Hve(n,t){return n.split(` +`),a=n5(n.flatMap(i=>i.resources),i=>i.fileKey),e=n5(n.flatMap(i=>i.mentions),i=>{var A;return(A=i.openId)!==null&&A!==void 0?A:i.key});return Object.assign(Object.assign({},t),{content:o,resources:a,mentions:e,mentionAll:n.some(i=>i.mentionAll),mentionedBot:n.some(i=>i.mentionedBot)})}function n5(n,t){let o=new Set,a=[];for(let e of n){let i=t(e);if(i==null){a.push(e);continue}o.has(i)||(o.add(i),a.push(e))}return a}var GC={delayMs:600,longThresholdChars:1e3,longDelayMs:2e3,maxMessages:8,maxChars:4e3},QS={ttl:12*36e5,maxEntries:5e3,sweepIntervalMs:5*6e4,namespace:"channel:seen"},M5=30*6e4,vve=5*6e4;function Pve(n){var t,o,a,e,i,A,r;let s=(o=(t=n?.batch)===null||t===void 0?void 0:t.text)!==null&&o!==void 0?o:{};return{delayMs:(a=s.delayMs)!==null&&a!==void 0?a:GC.delayMs,longThresholdChars:(e=s.longThresholdChars)!==null&&e!==void 0?e:GC.longThresholdChars,longDelayMs:(i=s.longDelayMs)!==null&&i!==void 0?i:GC.longDelayMs,maxMessages:(A=s.maxMessages)!==null&&A!==void 0?A:GC.maxMessages,maxChars:(r=s.maxChars)!==null&&r!==void 0?r:GC.maxChars}}var YP=class{constructor(t,o={}){var a,e,i,A,r,s;this.cache=t,this.memory=new Map,this.ttlMs=(a=o.ttlMs)!==null&&a!==void 0?a:QS.ttl,this.maxMem=(e=o.maxMemEntries)!==null&&e!==void 0?e:QS.maxEntries,this.ns=(i=o.namespace)!==null&&i!==void 0?i:QS.namespace;let g=(A=o.sweepMs)!==null&&A!==void 0?A:QS.sweepIntervalMs;this.sweeper=setInterval(()=>this.sweep(),g),(s=(r=this.sweeper).unref)===null||s===void 0||s.call(r)}has(t){return h(this,void 0,void 0,function*(){let o=Date.now(),a=this.memory.get(t);return a&&a>o?(this.memory.delete(t),this.memory.set(t,a),!0):(yield this.cache.get(t,{namespace:this.ns}))?(this.memory.set(t,o+this.ttlMs),this.evictIfNeeded(),!0):!1})}add(t){return h(this,void 0,void 0,function*(){let o=Date.now()+this.ttlMs;this.memory.set(t,o),this.evictIfNeeded();try{yield this.cache.set(t,"1",o,{namespace:this.ns})}catch{}})}evictIfNeeded(){for(;this.memory.size>this.maxMem;){let t=this.memory.keys().next().value;if(t===void 0)break;this.memory.delete(t)}}sweep(){let t=Date.now();for(let[o,a]of this.memory)a<=t&&this.memory.delete(o)}dispose(){clearInterval(this.sweeper),this.memory.clear()}},jP=class{constructor(t,o){this.cfg=Object.assign({},t??{}),this.bot=o}evaluate(t){return t.chatType==="group"?this.evaluateGroup(t):this.evaluateDm(t)}evaluateGroup(t){var o,a;let e=this.cfg.groupAllowlist;return e&&e.length>0&&!e.includes(t.chatId)?{allowed:!1,reason:"group_not_allowed"}:((o=this.cfg.requireMention)!==null&&o!==void 0?o:!0)&&!t.mentionedBot?{allowed:!1,reason:"no_mention"}:t.mentionAll&&!((a=this.cfg.respondToMentionAll)!==null&&a!==void 0&&a)?{allowed:!1,reason:"mention_all_blocked"}:{allowed:!0}}evaluateDm(t){var o,a;let e=(o=this.cfg.dmMode)!==null&&o!==void 0?o:"open";return e==="disabled"?{allowed:!1,reason:"dm_disabled"}:e==="allowlist"&&!((a=this.cfg.dmAllowlist)!==null&&a!==void 0?a:[]).includes(t.senderId)?{allowed:!1,reason:"sender_not_allowed"}:{allowed:!0}}updateConfig(t){this.cfg=Object.assign(Object.assign({},this.cfg),t)}getConfig(){return this.cfg}setBotIdentity(t){this.bot=t}getBotIdentity(){return this.bot}},JP=class{constructor(t=vve,o=6e4){var a,e;this.ttlMs=t,this.locks=new Map,this.sweeper=setInterval(()=>this.sweep(),o),(e=(a=this.sweeper).unref)===null||e===void 0||e.call(a)}acquire(t){let o=Date.now(),a=this.locks.get(t);return a&&a>o?!1:(this.locks.set(t,o+this.ttlMs),!0)}release(t){this.locks.delete(t)}sweep(){let t=Date.now();for(let[o,a]of this.locks)a<=t&&this.locks.delete(o)}dispose(){clearInterval(this.sweeper),this.locks.clear()}};function Gve(n,t=M5){return!n||!Number.isFinite(n)?!1:Date.now()-n>t}var qP=class{constructor(t){var o,a,e,i,A,r,s,g,c,I,d;this.logger=t.logger,this.onReject=t.onReject,this.onMessage=t.onMessage,this.staleWindow=(a=(o=t.config)===null||o===void 0?void 0:o.staleMessageWindowMs)!==null&&a!==void 0?a:M5,this.queueEnabled=(A=(i=(e=t.config)===null||e===void 0?void 0:e.chatQueue)===null||i===void 0?void 0:i.enabled)!==null&&A!==void 0?A:!0,this.seenCache=new YP(t.cache,{ttlMs:(s=(r=t.config)===null||r===void 0?void 0:r.dedup)===null||s===void 0?void 0:s.ttl,maxMemEntries:(c=(g=t.config)===null||g===void 0?void 0:g.dedup)===null||c===void 0?void 0:c.maxEntries,sweepMs:(d=(I=t.config)===null||I===void 0?void 0:I.dedup)===null||d===void 0?void 0:d.sweepIntervalMs}),this.lock=new JP,this.policy=new jP(t.policy,t.botIdentity),this.manager=new xP(Pve(t.config))}pushMessage(t){var o,a,e,i,A,r,s;return h(this,void 0,void 0,function*(){if(Gve(t.createTime,this.staleWindow)){(a=(o=this.logger).debug)===null||a===void 0||a.call(o,`safety: drop stale message ${t.messageId}`);return}if(yield this.seenCache.has(t.messageId)){(i=(e=this.logger).debug)===null||i===void 0||i.call(e,`safety: drop duplicate message ${t.messageId}`);return}let g=this.policy.evaluate(t);if(!g.allowed){this.onReject({messageId:t.messageId,chatId:t.chatId,senderId:t.senderId,reason:(A=g.reason)!==null&&A!==void 0?A:"group_not_allowed"});return}if(!this.lock.acquire(t.messageId)){(s=(r=this.logger).debug)===null||s===void 0||s.call(r,`safety: drop in-flight message ${t.messageId}`);return}let c=I=>h(this,void 0,void 0,function*(){var d,B;try{yield this.onMessage(I.message)}catch(f){(B=(d=this.logger).error)===null||B===void 0||B.call(d,"safety: message handler threw",f)}finally{for(let f of I.sourceIds){try{yield this.seenCache.add(f)}catch{}this.lock.release(f)}}});this.queueEnabled?this.manager.push(t.chatId,t,c):c({message:t,sourceIds:[t.messageId]})})}pushAction(t,o,a){var e,i,A,r;return h(this,void 0,void 0,function*(){if(yield this.seenCache.has(t)){(i=(e=this.logger).debug)===null||i===void 0||i.call(e,`safety: drop duplicate action ${t}`);return}if(!this.lock.acquire(t)){(r=(A=this.logger).debug)===null||r===void 0||r.call(A,`safety: drop in-flight action ${t}`);return}let s=()=>h(this,void 0,void 0,function*(){var g,c;try{yield a()}catch(I){(c=(g=this.logger).error)===null||c===void 0||c.call(g,"safety: action handler threw",I)}finally{try{yield this.seenCache.add(t)}catch{}this.lock.release(t)}});this.queueEnabled?yield this.manager.run(o,s):yield s()})}pushLight(t,o){var a,e;return h(this,void 0,void 0,function*(){if(!(yield this.seenCache.has(t))){yield this.seenCache.add(t);try{yield o()}catch(i){(e=(a=this.logger).warn)===null||e===void 0||e.call(a,"safety: light handler threw",i)}}})}updatePolicy(t){this.policy.updateConfig(t)}getPolicy(){return this.policy.getConfig()}setBotIdentity(t){this.policy.setBotIdentity(t)}dispose(){return h(this,void 0,void 0,function*(){yield this.manager.dispose(),this.seenCache.dispose(),this.lock.dispose()})}};function Fve(n){return n.key==="@_all"}function Lve(n,t){var o,a,e;let i=new Map,A=new Map,r=[],s=!1,g=!1;for(let c of n??[]){if(Fve(c)){s=!0,i.set(c.key,{key:c.key,name:c.name,isBot:!1});continue}let I=(a=(o=c.id)===null||o===void 0?void 0:o.open_id)!==null&&a!==void 0?a:"",d=(e=c.id)===null||e===void 0?void 0:e.user_id,B=!!(t&&I===t);B&&(g=!0);let f={key:c.key,openId:I||void 0,userId:d,name:c.name,isBot:B};i.set(c.key,f),I&&A.set(I,f),r.push(f)}return{mentions:i,mentionsByOpenId:A,mentionList:r,mentionAll:s,mentionedBot:g}}function Uve(n,t){if(!n||t.mentions.size===0)return n;let o=n;for(let[a,e]of t.mentions){if(e.isBot&&t.stripBotMentions){let A=new RegExp(`\\s?${Hve(a)}\\s?`,"g");o=o.replace(A," ");continue}let i=e.name?`@${e.name}`:a;o=o.split(a).join(i)}return o.replace(/[ \t]{2,}/g," ").trim()}function Hve(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Jr(n){if(n)try{return JSON.parse(n)}catch{return}}function Kve(n,t){if(!t||t.length===0)return n;let o=n;return t.includes("bold")&&(o=`**${o}**`),t.includes("italic")&&(o=`*${o}*`),t.includes("underline")&&(o=`${o}`),(t.includes("lineThrough")||t.includes("strikethrough"))&&(o=`~~${o}~~`),(t.includes("codeInline")||t.includes("code"))&&(o=`\`${o}\``),o}var xve=["zh_cn","en_us","ja_jp"];function Yve(n){if("title"in n||"content"in n)return n;for(let o of xve){let a=n[o];if(a!=null&&typeof a=="object")return a}let t=Object.keys(n)[0];if(t){let o=n[t];if(o!=null&&typeof o=="object")return o}}function _5(n){if(!(n==null||!Number.isFinite(n)||n<0))return n<1e3?`${Math.round(n)}ms`:n%1e3===0?`${n/1e3}s`:`${(n/1e3).toFixed(1)}s`}function PS(n){if(n==null)return;let t=typeof n=="string"?parseInt(n,10):n;if(!Number.isFinite(t)||t<=0)return;let o=new Date(t+8*36e5),a=o.getUTCFullYear(),e=String(o.getUTCMonth()+1).padStart(2,"0"),i=String(o.getUTCDate()).padStart(2,"0"),A=String(o.getUTCHours()).padStart(2,"0"),r=String(o.getUTCMinutes()).padStart(2,"0");return`${a}-${e}-${i} ${A}:${r}`}function jve(n){let t=new Date(n+288e5),o=t.getUTCFullYear(),a=String(t.getUTCMonth()+1).padStart(2,"0"),e=String(t.getUTCDate()).padStart(2,"0"),i=String(t.getUTCHours()).padStart(2,"0"),A=String(t.getUTCMinutes()).padStart(2,"0"),r=String(t.getUTCSeconds()).padStart(2,"0");return`${o}-${a}-${e}T${i}:${A}:${r}+08:00`}function Jve(n,t){return n.split(` `).map(o=>`${t}${o}`).join(` -`)}function qC(n){return n.replace(/"/g,""")}var Kve=(n,t)=>h(void 0,void 0,void 0,function*(){let o=Jr(n),a=o?.file_key;if(!a)return{content:"[audio]",resources:[]};let e=o?.duration,i=O5(e),A=i?` duration="${i}"`:"";return{content:`