PageSourceSearch

https://globaltradealert.org/_nuxt/DqKQw2f12.js

js globaltradealert.org collected 2026-09-24 08:37:29 UTC 6,835 bytes, 2 lines download raw bytes

1import{t as e}from"./DDdyfk2q.js";var t=()=>e(),n=`gta:site-assistant-open`,r=Object.freeze({working:`Working on your question…`,looking_up:`Looking up GTA interventions…`,calculating:`Calculating totals…`,checking_sources:`Checking GTA sources…`,finding_pages:`Finding relevant GTA pages…`,preparing_answer:`Preparing your answer…`,building_chart:`Building your chart…`}),i=e=>typeof e==`string`&&Object.hasOwn(r,e)?r[e]:``,a=(e,t)=>t.error||t.done===!0?null:i(t.progress)?t.progress:e,o=async()=>{try{let e=await fetch(`/api/site-assistant/status`,{signal:AbortSignal.timeout(5e3)}),t=await e.json();return e.ok&&t?.available===!0?{available:!0}:{available:!1,code:typeof t?.code==`string`?t.code:`assistant_unavailable`}}catch{return{available:!1,code:`assistant_unavailable`}}},s=(e,t=globalThis)=>{let r=typeof e==`string`?e.trim():``;return!r||r.length>4e3||!t?.dispatchEvent?null:(t.dispatchEvent(new CustomEvent(n,{detail:{message:r,source:`home`}})),r)},c=e=>e===`assistant_timeout`?`The chat availability check timed out. Select “Check availability” to try again.`:e===`assistant_endpoint_missing`?`The connected backend does not provide website chat at the configured address.`:e===`assistant_incompatible`?`The website and chat backend versions are incompatible. The services need to be updated.`:e===`assistant_service_auth_failed`?`The chat service connection could not be authenticated. This needs a service configuration fix, not another account login.`:e===`assistant_unconfigured`?`Website chat is not enabled or fully configured on the connected service.`:`Chat availability could not be confirmed. Select “Check availability” to try again.`,l=(e,t)=>t===`request_interrupted`?`The answer connection was interrupted or timed out. Your question is saved. Retry to recover this same request without starting duplicate work. Only intervention records already read count toward your record allowance.`:t===`assistant_endpoint_missing`?`The connected backend does not provide website chat at the configured address. Your draft is saved; please try again after the service is restored.`:t===`assistant_incompatible`?`The website and chat backend versions are incompatible. Your draft is saved; please try again after the services are updated.`:t===`assistant_service_auth_failed`?`The chat service connection could not be authenticated. This needs a service configuration fix, not another account login. Your draft is saved.`:t===`assistant_unconfigured`?`Website chat is not enabled or fully configured on the connected service. Your draft is saved.`:t===`identity_unavailable`?`Your sign-in could not be verified because the account service is unavailable. Please try again later; your draft is saved.`:t===`assistant_timeout`||e===504?`The chat service timed out. Your question is saved. Retry to recover this same request. Only intervention records already read count toward your record allowance.`:e===401?`Sign in to ask GTA. Your question is still here.`:t===`allowance_exhausted`?`Your monthly website chat spending allowance cannot cover another request. You can still browse GTA. This is separate from your intervention record allowance; an MCP plan does not increase this chat spending limit.`:t===`record_allowance_exhausted`?`These records would exceed your intervention allowance. Try a smaller selection, metadata search or aggregate statistics. Website chat and GTA MCP share the same record allowance; switching does not reset it. See Usage limits and Plans and pricing below.`:t===`service_budget_exhausted`?`Website chat has reached its service budget. Please try again later.`:t===`service_busy`?`Website chat is at capacity. Please try again shortly. No new model request was started.`:t===`request_rate_limited`?`You are sending messages too quickly. Please wait a minute and try again. This is separate from your intervention allowance.`:t===`record_meter_unavailable`?`Your intervention allowance could not be verified. Please try again later.`:t===`conversation_history_unverifiable`?`Saved record results in this conversation could not be verified. Start a new conversation to continue safely.`:t===`record_result_unverifiable`?`The data service returned record results that could not be verified. Those results were withheld. Please try again later.`:t===`answer_
1context_limit`?`The conversation and retrieved data exceeded this chat’s context limit. Start a new conversation with a narrower question.`:t===`answer_request_limit`?`This question reached the chat’s processing limit before an answer was ready. Try a narrower question; starting a new conversation alone may not help.`:t===`account_busy`||t===`request_in_progress`?`An answer is already running for your account. Please wait before retrying.`:t===`conversation_not_found`?`This conversation is unavailable. Start a new conversation to continue.`:t===`request_conflict`?`This request cannot be reused. Start a new conversation to continue.`:`The assistant is unavailable. Your question is still here; retrying will not start duplicate work.`,u=async(e,t)=>{if(!e.ok){let t;try{t=await e.json()}catch{}let n=t?.data?.code||t?.detail;throw Object.assign(Error(l(e.status,n)),{status:e.status,code:n})}if(!e.body)throw Error(`The response was empty.`);let n=e.body.getReader(),r=new TextDecoder,i=``,a=!1,o=e=>{if(!e.trim())return;let n=JSON.parse(e);if(!n||typeof n!=`object`||Array.isArray(n))throw Error(`Invalid assistant response.`);n.done===!0&&(a=!0),t(n)};try{for(;;){let e=await n.read();if(i+=r.decode(e.value,{stream:!e.done}),i.length>2e5)throw Error(`Assistant response exceeded its size limit.`);let t;for(;(t=i.indexOf(`
2`))!==-1;)o(i.slice(0,t)),i=i.slice(t+1);if(e.done||a)break}if(o(i),!a)throw Error(`The response was interrupted. Retry to recover this request.`)}catch(e){throw e.name===`AbortError`?e:Object.assign(Error(l(null,`request_interrupted`)),{code:`request_interrupted`})}finally{await n.cancel().catch(()=>{}),n.releaseLock()}},d=`gta.site-assistant.draft.v2`,f=(e,t,n=globalThis.sessionStorage)=>{try{n?.setItem(d,JSON.stringify({text:e,account:t,expires:Date.now()+18e5}))}catch{}},p=(e,t=globalThis)=>{let n=t.visualViewport;if(!n)return()=>{};let r=()=>{n.scale===1&&e({height:n.height,bottom:Math.max(0,t.innerHeight-n.height-n.offsetTop)})};return r(),n.addEventListener(`resize`,r),n.addEventListener(`scroll`,r),()=>{n.removeEventListener(`resize`,r),n.removeEventListener(`scroll`,r)}},m=(e,t=globalThis.sessionStorage)=>{try{let n=JSON.parse(t?.getItem(d)||`null`);if(e===null&&n?.account!=null&&n?.expires>Date.now())return``;if(t?.removeItem(d),n?.expires>Date.now()&&(n.account===null||n.account===e)&&typeof n.text==`string`&&n.text.length<=4e3)return n.text}catch{}return``};export{o as a,s as c,f as d,a as f,i,u as l,c as n,t as o,l as r,p as s,n as t,m as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.